Skip to content
SiteEmail

CSSStyleDeclaration

Module: JavaScript DOM API

The style of an element.

#include <CSSStyleDeclaration.idl>

Name
DOMStringgetPropertyValue(DomStatString prop)
returns the value of the property
voidsetProperty(DomStatString propName, CSSString value, optional DOMString? priority =null)
sets a new value for a property on a CSS style declaration object
DOMStringremoveProperty(DomStatString propName)
Name
attribute DOMStringborderBottomWidth
attribute DOMStringborderLeftWidth
attribute DOMStringborderRightWidth
attribute DOMStringborderTopWidth
attribute DOMStringborderWidth
attribute DOMStringborderBottomColor
attribute DOMStringborderLeftColor
attribute DOMStringborderRightColor
attribute DOMStringborderTopColor
attribute DOMStringborderColor
attribute DOMStringborderBottomStyle
attribute DOMStringborderLeftStyle
attribute DOMStringborderRightStyle
attribute DOMStringborderTopStyle
attribute DOMStringborderStyle
attribute DOMStringborderBottom
attribute DOMStringborderLeft
attribute DOMStringborderRight
attribute DOMStringborderTop
attribute DOMStringborder
attribute DOMStringtop
attribute DOMStringleft
attribute DOMStringbottom
attribute DOMStringright
attribute longtopPX
set the top in pixels
attribute longleftPX
set the left in pixels
attribute longbottomPX
set the bottom in pixels
attribute longrightPX
set the right in pixels
attribute longtopVW
attribute longleftVW
attribute longbottomVW
attribute longrightVW
attribute longtopVH
attribute longleftVH
attribute longbottomVH
attribute longrightVH
attribute longtopREM
attribute longleftREM
attribute longbottomREM
attribute longrightREM
attribute longtopPERCENT
attribute longleftPERCENT
attribute longbottomPERCENT
attribute longrightPERCENT
attribute DOMStringwidth
attribute DOMStringheight
attribute DOMStringminWidth
attribute DOMStringminHeight
attribute DOMStringmaxWidth
attribute DOMStringmaxHeight
attribute DOMStringrowGap
attribute DOMStringcolumnGap
attribute DOMStringgap
attribute longwidthPX
attribute longheightPX
attribute longminWidthPX
attribute longminHeightPX
attribute longmaxWidthPX
attribute longmaxHeightPX
attribute longwidthVW
attribute longheightVW
attribute longminWidthVW
attribute longminHeightVW
attribute longmaxWidthVW
attribute longmaxHeightVW
attribute longwidthVH
attribute longheightVH
attribute longminWidthVH
attribute longminHeightVH
attribute longmaxWidthVH
attribute longmaxHeightVH
attribute longwidthREM
attribute longheightREM
attribute longminWidthREM
attribute longminHeightREM
attribute longmaxWidthREM
attribute longmaxHeightREM
attribute longwidthPERCENT
attribute longheightPERCENT
attribute longminWidthPERCENT
attribute longminHeightPERCENT
attribute longmaxWidthPERCENT
attribute longmaxHeightPERCENT
attribute DOMStringbackgroundSize
attribute DOMStringaspectRatio
attribute DOMStringbackgroundImage
attribute DOMStringbackgroundPositionX
attribute DOMStringbackgroundPositionY
attribute DOMStringbackgroundPosition
attribute DOMStringbackgroundRepeat
attribute DOMStringborderTopLeftRadius
attribute DOMStringborderTopRightRadius
attribute DOMStringborderBottomLeftRadius
attribute DOMStringborderBottomRightRadius
attribute DOMStringborderRadius
attribute DOMStringborderImageSource
attribute DOMStringborderImageSlice
attribute DOMStringborderImageWidth
attribute DOMStringborderImageOutset
attribute DOMStringborderImageRepeat
attribute DOMStringborderImage
attribute DOMStringboxSizing
attribute DOMStringboxShadow
attribute DOMStringtextShadow
attribute DOMStringtextStrokeWidth
attribute DOMStringtextStrokeColor
attribute DOMStringtextStroke
attribute DOMStringtextAlign
attribute DOMStringverticalAlign
attribute DOMStringletterSpacing
attribute DOMStringlineHeight
attribute DOMStringfilter
attribute DOMStringbackdropFilter
attribute DOMStringcohEnableBackdropFilter
attribute DOMStringflexDirection
attribute DOMStringjustifyContent
attribute DOMStringalignSelf
attribute DOMStringalignItems
attribute DOMStringalignContent
attribute DOMStringflexWrap
attribute DOMStringflex
attribute DOMStringflexGrow
attribute DOMStringflexShrink
attribute DOMStringflexBasis
attribute DOMStringbackfaceVisibility
attribute DOMStringfont
attribute DOMStringfontFamily
attribute DOMStringfontSize
attribute DOMStringfontWeight
attribute DOMStringfontStyle
attribute DOMStringcohFontFitMode
attribute DOMStringcohFontFitMaxSize
attribute DOMStringcohFontFitMinSize
attribute DOMStringcohFontFit
attribute DOMStringtextTransform
attribute DOMStringfontVariantEastAsian
attribute DOMStringoverflowWrap
attribute DOMStringwhiteSpace
attribute DOMStringtextOverflow
attribute DOMStringcohSdf
attribute DOMStringcssText
attribute DOMStringall
attribute DOMStringdisplay
attribute DOMStringposition
attribute DOMStringcolor
attribute DOMStringbackgroundColor
attribute DOMStringcursor
attribute DOMStringmarginBottom
attribute DOMStringmarginLeft
attribute DOMStringmarginRight
attribute DOMStringmarginTop
attribute DOMStringmargin
attribute DOMStringpaddingBottom
attribute DOMStringpaddingLeft
attribute DOMStringpaddingRight
attribute DOMStringpaddingTop
attribute DOMStringpadding
attribute DOMStringclipPath
attribute DOMStringshapeRendering
attribute DOMStringzIndex
set the zIndex
attribute DOMStringopacity
Opacity value.
attribute DOMStringcohSimpleOpacity
attribute DOMStringvisibility
attribute DOMStringtextDecorationLine
attribute DOMStringtextUnderlineOffset
attribute DOMStringtextUnderlinePosition
attribute DOMStringtextDecorationColor
attribute DOMStringtextDecorationThickness
attribute DOMStringtextDecorationStyle
attribute DOMStringtextRendering
attribute DOMStringtextDecoration
attribute longtextUnderlineOffsetPX
attribute longtextUnderlineOffsetVH
attribute longtextUnderlineOffsetVW
attribute longtextUnderlineOffsetPERCENT
attribute longtextUnderlineOffsetREM
attribute longtextDecorationThicknessPX
attribute longtextDecorationThicknessVH
attribute longtextDecorationThicknessVW
attribute longtextDecorationThicknessPERCENT
attribute longtextDecorationThicknessREM
attribute DOMStringtransform
set transformation
attribute DOMStringtransformOrigin
attribute DOMStringanimation
attribute DOMStringanimationName
attribute DOMStringanimationDuration
attribute DOMStringanimationIterationCount
attribute DOMStringanimationTimingFunction
attribute DOMStringanimationPlayState
attribute DOMStringanimationFillMode
attribute DOMStringanimationDelay
attribute DOMStringanimationDirection
attribute DOMStringcontain
attribute DOMStringcontent
attribute DOMStringoverflowX
attribute DOMStringoverflowY
attribute DOMStringoverflow
attribute DOMStringmaskPosition
attribute DOMStringmaskSize
attribute DOMStringbackground
attribute DOMStringmaskImage
attribute DOMStringmaskMode
attribute DOMStringmaskClip
attribute DOMStringmaskRepeat
attribute DOMStringmask
attribute DOMStringperspective
attribute DOMStringperspectiveOrigin
attribute DOMStringisolation
attribute DOMStringmixBlendMode
attribute DOMStringtransitionBehavior
attribute DOMStringtransitionProperty
attribute DOMStringtransitionDuration
attribute DOMStringtransitionDelay
attribute DOMStringtransitionTimingFunction
attribute DOMStringtransition
attribute DOMStringcaretColor
attribute DOMStringuserSelect
attribute DOMStringpointerEvents
attribute DOMStringimageRendering
attribute DOMStringfill
SVG properties.
attribute DOMStringfillOpacity
attribute DOMStringstroke
attribute DOMStringstrokeOpacity
attribute DOMStringstrokeWidth
attribute DOMStringstrokeLinecap
attribute DOMStringstrokeLinejoin
attribute DOMStringstrokeMiterlimit
attribute DOMStringstopOpacity
attribute DOMStringstopColor
attribute DOMStringfillRule
attribute DOMStringclipRule
attribute DOMStringmaskType
attribute DOMStringstrokeDasharray
attribute DOMStringstrokeDashoffset
attribute DOMStringcohCustomEffectName
Custom properties.
attribute DOMStringcohCustomEffectFloatParam1
attribute DOMStringcohCustomEffectFloatParam2
attribute DOMStringcohCustomEffectFloatParam3
attribute DOMStringcohCustomEffectFloatParam4
attribute DOMStringcohCustomEffectFloatParam5
attribute DOMStringcohCustomEffectFloatParam6
attribute DOMStringcohCustomEffectFloatParam7
attribute DOMStringcohCustomEffectFloatParam8
attribute DOMStringcohCustomEffectFloatParam9
attribute DOMStringcohCustomEffectFloatParam10
attribute DOMStringcohCustomEffectFloatParam11
attribute DOMStringcohCustomEffectFloatParam12
attribute DOMStringcohCustomEffectFloatParam13
attribute DOMStringcohCustomEffectFloatParam14
attribute DOMStringcohCustomEffectFloatParam15
attribute DOMStringcohCustomEffectFloatParam16
attribute DOMStringcohCustomEffectStringParam1
attribute DOMStringcohCustomEffectStringParam2
attribute DOMStringcohCompositionId
attribute DOMStringcohPartitioned
attribute DOMStringcohRenderingOption
DOMString getPropertyValue(
DomStatString prop
)

returns the value of the property

void setProperty(
DomStatString propName,
CSSString value,
optional DOMString? priority =null
)

sets a new value for a property on a CSS style declaration object

DOMString removeProperty(
DomStatString propName
)
attribute DOMString borderBottomWidth;
attribute DOMString borderLeftWidth;
attribute DOMString borderRightWidth;
attribute DOMString borderTopWidth;
attribute DOMString borderWidth;
attribute DOMString borderBottomColor;
attribute DOMString borderLeftColor;
attribute DOMString borderRightColor;
attribute DOMString borderTopColor;
attribute DOMString borderColor;
attribute DOMString borderBottomStyle;
attribute DOMString borderLeftStyle;
attribute DOMString borderRightStyle;
attribute DOMString borderTopStyle;
attribute DOMString borderStyle;
attribute DOMString borderBottom;
attribute DOMString borderLeft;
attribute DOMString borderRight;
attribute DOMString borderTop;
attribute DOMString border;
attribute DOMString top;
attribute DOMString left;
attribute DOMString bottom;
attribute DOMString right;
attribute long topPX;

set the top in pixels

attribute long leftPX;

set the left in pixels

attribute long bottomPX;

set the bottom in pixels

attribute long rightPX;

set the right in pixels

attribute long topVW;
attribute long leftVW;
attribute long bottomVW;
attribute long rightVW;
attribute long topVH;
attribute long leftVH;
attribute long bottomVH;
attribute long rightVH;
attribute long topREM;
attribute long leftREM;
attribute long bottomREM;
attribute long rightREM;
attribute long topPERCENT;
attribute long leftPERCENT;
attribute long bottomPERCENT;
attribute long rightPERCENT;
attribute DOMString width;
attribute DOMString height;
attribute DOMString minWidth;
attribute DOMString minHeight;
attribute DOMString maxWidth;
attribute DOMString maxHeight;
attribute DOMString rowGap;
attribute DOMString columnGap;
attribute DOMString gap;
attribute long widthPX;
attribute long heightPX;
attribute long minWidthPX;
attribute long minHeightPX;
attribute long maxWidthPX;
attribute long maxHeightPX;
attribute long widthVW;
attribute long heightVW;
attribute long minWidthVW;
attribute long minHeightVW;
attribute long maxWidthVW;
attribute long maxHeightVW;
attribute long widthVH;
attribute long heightVH;
attribute long minWidthVH;
attribute long minHeightVH;
attribute long maxWidthVH;
attribute long maxHeightVH;
attribute long widthREM;
attribute long heightREM;
attribute long minWidthREM;
attribute long minHeightREM;
attribute long maxWidthREM;
attribute long maxHeightREM;
attribute long widthPERCENT;
attribute long heightPERCENT;
attribute long minWidthPERCENT;
attribute long minHeightPERCENT;
attribute long maxWidthPERCENT;
attribute long maxHeightPERCENT;
attribute DOMString backgroundSize;
attribute DOMString aspectRatio;
attribute DOMString backgroundImage;
attribute DOMString backgroundPositionX;
attribute DOMString backgroundPositionY;
attribute DOMString backgroundPosition;
attribute DOMString backgroundRepeat;
attribute DOMString borderTopLeftRadius;
attribute DOMString borderTopRightRadius;
attribute DOMString borderBottomLeftRadius;
attribute DOMString borderBottomRightRadius;
attribute DOMString borderRadius;
attribute DOMString borderImageSource;
attribute DOMString borderImageSlice;
attribute DOMString borderImageWidth;
attribute DOMString borderImageOutset;
attribute DOMString borderImageRepeat;
attribute DOMString borderImage;
attribute DOMString boxSizing;
attribute DOMString boxShadow;
attribute DOMString textShadow;
attribute DOMString textStrokeWidth;
attribute DOMString textStrokeColor;
attribute DOMString textStroke;
attribute DOMString textAlign;
attribute DOMString verticalAlign;
attribute DOMString letterSpacing;
attribute DOMString lineHeight;
attribute DOMString filter;
attribute DOMString backdropFilter;
attribute DOMString cohEnableBackdropFilter;
attribute DOMString flexDirection;
attribute DOMString justifyContent;
attribute DOMString alignSelf;
attribute DOMString alignItems;
attribute DOMString alignContent;
attribute DOMString flexWrap;
attribute DOMString flex;
attribute DOMString flexGrow;
attribute DOMString flexShrink;
attribute DOMString flexBasis;
attribute DOMString backfaceVisibility;
attribute DOMString font;
attribute DOMString fontFamily;
attribute DOMString fontSize;
attribute DOMString fontWeight;
attribute DOMString fontStyle;
attribute DOMString cohFontFitMode;
attribute DOMString cohFontFitMaxSize;
attribute DOMString cohFontFitMinSize;
attribute DOMString cohFontFit;
attribute DOMString textTransform;
attribute DOMString fontVariantEastAsian;
attribute DOMString overflowWrap;
attribute DOMString whiteSpace;
attribute DOMString textOverflow;
attribute DOMString cohSdf;
attribute DOMString cssText;
attribute DOMString all;
attribute DOMString display;
attribute DOMString position;
attribute DOMString color;
attribute DOMString backgroundColor;
attribute DOMString cursor;
attribute DOMString marginBottom;
attribute DOMString marginLeft;
attribute DOMString marginRight;
attribute DOMString marginTop;
attribute DOMString margin;
attribute DOMString paddingBottom;
attribute DOMString paddingLeft;
attribute DOMString paddingRight;
attribute DOMString paddingTop;
attribute DOMString padding;
attribute DOMString clipPath;
attribute DOMString shapeRendering;
attribute DOMString zIndex;

set the zIndex

attribute DOMString opacity;

Opacity value.

attribute DOMString cohSimpleOpacity;
attribute DOMString visibility;
attribute DOMString textDecorationLine;
attribute DOMString textUnderlineOffset;
attribute DOMString textUnderlinePosition;
attribute DOMString textDecorationColor;
attribute DOMString textDecorationThickness;
attribute DOMString textDecorationStyle;
attribute DOMString textRendering;
attribute DOMString textDecoration;
attribute long textUnderlineOffsetPX;
attribute long textUnderlineOffsetVH;
attribute long textUnderlineOffsetVW;
attribute long textUnderlineOffsetPERCENT;
attribute long textUnderlineOffsetREM;
attribute long textDecorationThicknessPX;
attribute long textDecorationThicknessVH;
attribute long textDecorationThicknessVW;
attribute long textDecorationThicknessPERCENT;
attribute long textDecorationThicknessREM;
attribute DOMString transform;

set transformation

attribute DOMString transformOrigin;
attribute DOMString animation;
attribute DOMString animationName;
attribute DOMString animationDuration;
attribute DOMString animationIterationCount;
attribute DOMString animationTimingFunction;
attribute DOMString animationPlayState;
attribute DOMString animationFillMode;
attribute DOMString animationDelay;
attribute DOMString animationDirection;
attribute DOMString contain;
attribute DOMString content;
attribute DOMString overflowX;
attribute DOMString overflowY;
attribute DOMString overflow;
attribute DOMString maskPosition;
attribute DOMString maskSize;
attribute DOMString background;
attribute DOMString maskImage;
attribute DOMString maskMode;
attribute DOMString maskClip;
attribute DOMString maskRepeat;
attribute DOMString mask;
attribute DOMString perspective;
attribute DOMString perspectiveOrigin;
attribute DOMString isolation;
attribute DOMString mixBlendMode;
attribute DOMString transitionBehavior;
attribute DOMString transitionProperty;
attribute DOMString transitionDuration;
attribute DOMString transitionDelay;
attribute DOMString transitionTimingFunction;
attribute DOMString transition;
attribute DOMString caretColor;
attribute DOMString userSelect;
attribute DOMString pointerEvents;
attribute DOMString imageRendering;
attribute DOMString fill;

SVG properties.

attribute DOMString fillOpacity;
attribute DOMString stroke;
attribute DOMString strokeOpacity;
attribute DOMString strokeWidth;
attribute DOMString strokeLinecap;
attribute DOMString strokeLinejoin;
attribute DOMString strokeMiterlimit;
attribute DOMString stopOpacity;
attribute DOMString stopColor;
attribute DOMString fillRule;
attribute DOMString clipRule;
attribute DOMString maskType;
attribute DOMString strokeDasharray;
attribute DOMString strokeDashoffset;
attribute DOMString cohCustomEffectName;

Custom properties.

attribute DOMString cohCustomEffectFloatParam1;
attribute DOMString cohCustomEffectFloatParam2;
attribute DOMString cohCustomEffectFloatParam3;
attribute DOMString cohCustomEffectFloatParam4;
attribute DOMString cohCustomEffectFloatParam5;
attribute DOMString cohCustomEffectFloatParam6;
attribute DOMString cohCustomEffectFloatParam7;
attribute DOMString cohCustomEffectFloatParam8;
attribute DOMString cohCustomEffectFloatParam9;
attribute DOMString cohCustomEffectFloatParam10;
attribute DOMString cohCustomEffectFloatParam11;
attribute DOMString cohCustomEffectFloatParam12;
attribute DOMString cohCustomEffectFloatParam13;
attribute DOMString cohCustomEffectFloatParam14;
attribute DOMString cohCustomEffectFloatParam15;
attribute DOMString cohCustomEffectFloatParam16;
attribute DOMString cohCustomEffectStringParam1;
attribute DOMString cohCustomEffectStringParam2;
attribute DOMString cohCompositionId;
attribute DOMString cohPartitioned;
attribute DOMString cohRenderingOption;