CSSStyleDeclaration

Module: JavaScript DOM API

The style of an element.

#include <CSSStyleDeclaration.idl>

Public Functions

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)

Public Attributes

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 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 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 DOMStringboxShadow
attribute DOMStringtextShadow
attribute DOMStringtextStrokeWidth
attribute DOMStringtextStrokeColor
attribute DOMStringtextStroke
attribute DOMStringtextAlign
attribute DOMStringletterSpacing
attribute DOMStringlineHeight
attribute DOMStringfilter
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 DOMStringoverflowWrap
attribute DOMStringwhiteSpace
attribute DOMStringtextOverflow
attribute DOMStringcohSdf
attribute DOMStringcssText
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 DOMStringzIndex
set the zIndex
attribute DOMStringopacity
Opacity value.
attribute DOMStringvisibility
attribute DOMStringtextDecorationLine
attribute DOMStringtextUnderlineOffset
attribute DOMStringtextUnderlinePosition
attribute DOMStringtextDecorationColor
attribute DOMStringtextDecorationThickness
attribute DOMStringtextDecorationStyle
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 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 DOMStringcohCustomEffectStringParam1
attribute DOMStringcohCustomEffectStringParam2
attribute DOMStringcohCompositionId
attribute DOMStringcohRenderingOption

Public Functions Documentation

function getPropertyValue

DOMString getPropertyValue(
    DomStatString prop
)

returns the value of the property

function setProperty

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

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

function removeProperty

DOMString removeProperty(
    DomStatString propName
)

Public Attributes Documentation

variable borderBottomWidth

attribute DOMString borderBottomWidth;

variable borderLeftWidth

attribute DOMString borderLeftWidth;

variable borderRightWidth

attribute DOMString borderRightWidth;

variable borderTopWidth

attribute DOMString borderTopWidth;

variable borderWidth

attribute DOMString borderWidth;

variable borderBottomColor

attribute DOMString borderBottomColor;

variable borderLeftColor

attribute DOMString borderLeftColor;

variable borderRightColor

attribute DOMString borderRightColor;

variable borderTopColor

attribute DOMString borderTopColor;

variable borderColor

attribute DOMString borderColor;

variable borderBottomStyle

attribute DOMString borderBottomStyle;

variable borderLeftStyle

attribute DOMString borderLeftStyle;

variable borderRightStyle

attribute DOMString borderRightStyle;

variable borderTopStyle

attribute DOMString borderTopStyle;

variable borderStyle

attribute DOMString borderStyle;

variable borderBottom

attribute DOMString borderBottom;

variable borderLeft

attribute DOMString borderLeft;

variable borderRight

attribute DOMString borderRight;

variable borderTop

attribute DOMString borderTop;

variable border

attribute DOMString border;

variable top

attribute DOMString top;

variable left

attribute DOMString left;

variable bottom

attribute DOMString bottom;

variable right

attribute DOMString right;

variable topPX

attribute long topPX;

set the top in pixels

variable leftPX

attribute long leftPX;

set the left in pixels

variable bottomPX

attribute long bottomPX;

set the bottom in pixels

variable rightPX

attribute long rightPX;

set the right in pixels

variable topVW

attribute long topVW;

variable leftVW

attribute long leftVW;

variable bottomVW

attribute long bottomVW;

variable rightVW

attribute long rightVW;

variable topVH

attribute long topVH;

variable leftVH

attribute long leftVH;

variable bottomVH

attribute long bottomVH;

variable rightVH

attribute long rightVH;

variable topREM

attribute long topREM;

variable leftREM

attribute long leftREM;

variable bottomREM

attribute long bottomREM;

variable rightREM

attribute long rightREM;

variable topPERCENT

attribute long topPERCENT;

variable leftPERCENT

attribute long leftPERCENT;

variable bottomPERCENT

attribute long bottomPERCENT;

variable rightPERCENT

attribute long rightPERCENT;

variable width

attribute DOMString width;

variable height

attribute DOMString height;

variable minWidth

attribute DOMString minWidth;

variable minHeight

attribute DOMString minHeight;

variable maxWidth

attribute DOMString maxWidth;

variable maxHeight

attribute DOMString maxHeight;

variable widthPX

attribute long widthPX;

variable heightPX

attribute long heightPX;

variable minWidthPX

attribute long minWidthPX;

variable minHeightPX

attribute long minHeightPX;

variable maxWidthPX

attribute long maxWidthPX;

variable maxHeightPX

attribute long maxHeightPX;

variable widthVW

attribute long widthVW;

variable heightVW

attribute long heightVW;

variable minWidthVW

attribute long minWidthVW;

variable minHeightVW

attribute long minHeightVW;

variable maxWidthVW

attribute long maxWidthVW;

variable maxHeightVW

attribute long maxHeightVW;

variable widthVH

attribute long widthVH;

variable heightVH

attribute long heightVH;

variable minWidthVH

attribute long minWidthVH;

variable minHeightVH

attribute long minHeightVH;

variable maxWidthVH

attribute long maxWidthVH;

variable maxHeightVH

attribute long maxHeightVH;

variable widthREM

attribute long widthREM;

variable heightREM

attribute long heightREM;

variable minWidthREM

attribute long minWidthREM;

variable minHeightREM

attribute long minHeightREM;

variable maxWidthREM

attribute long maxWidthREM;

variable maxHeightREM

attribute long maxHeightREM;

variable widthPERCENT

attribute long widthPERCENT;

variable heightPERCENT

attribute long heightPERCENT;

variable minWidthPERCENT

attribute long minWidthPERCENT;

variable minHeightPERCENT

attribute long minHeightPERCENT;

variable maxWidthPERCENT

attribute long maxWidthPERCENT;

variable maxHeightPERCENT

attribute long maxHeightPERCENT;

variable backgroundSize

attribute DOMString backgroundSize;

variable backgroundImage

attribute DOMString backgroundImage;

variable backgroundPositionX

attribute DOMString backgroundPositionX;

variable backgroundPositionY

attribute DOMString backgroundPositionY;

variable backgroundPosition

attribute DOMString backgroundPosition;

variable backgroundRepeat

attribute DOMString backgroundRepeat;

variable borderTopLeftRadius

attribute DOMString borderTopLeftRadius;

variable borderTopRightRadius

attribute DOMString borderTopRightRadius;

variable borderBottomLeftRadius

attribute DOMString borderBottomLeftRadius;

variable borderBottomRightRadius

attribute DOMString borderBottomRightRadius;

variable borderRadius

attribute DOMString borderRadius;

variable borderImageSource

attribute DOMString borderImageSource;

variable borderImageSlice

attribute DOMString borderImageSlice;

variable borderImageWidth

attribute DOMString borderImageWidth;

variable borderImageOutset

attribute DOMString borderImageOutset;

variable borderImageRepeat

attribute DOMString borderImageRepeat;

variable borderImage

attribute DOMString borderImage;

variable boxShadow

attribute DOMString boxShadow;

variable textShadow

attribute DOMString textShadow;

variable textStrokeWidth

attribute DOMString textStrokeWidth;

variable textStrokeColor

attribute DOMString textStrokeColor;

variable textStroke

attribute DOMString textStroke;

variable textAlign

attribute DOMString textAlign;

variable letterSpacing

attribute DOMString letterSpacing;

variable lineHeight

attribute DOMString lineHeight;

variable filter

attribute DOMString filter;

variable flexDirection

attribute DOMString flexDirection;

variable justifyContent

attribute DOMString justifyContent;

variable alignSelf

attribute DOMString alignSelf;

variable alignItems

attribute DOMString alignItems;

variable alignContent

attribute DOMString alignContent;

variable flexWrap

attribute DOMString flexWrap;

variable flex

attribute DOMString flex;

variable flexGrow

attribute DOMString flexGrow;

variable flexShrink

attribute DOMString flexShrink;

variable flexBasis

attribute DOMString flexBasis;

variable backfaceVisibility

attribute DOMString backfaceVisibility;

variable font

attribute DOMString font;

variable fontFamily

attribute DOMString fontFamily;

variable fontSize

attribute DOMString fontSize;

variable fontWeight

attribute DOMString fontWeight;

variable fontStyle

attribute DOMString fontStyle;

variable cohFontFitMode

attribute DOMString cohFontFitMode;

variable cohFontFitMaxSize

attribute DOMString cohFontFitMaxSize;

variable cohFontFitMinSize

attribute DOMString cohFontFitMinSize;

variable cohFontFit

attribute DOMString cohFontFit;

variable textTransform

attribute DOMString textTransform;

variable overflowWrap

attribute DOMString overflowWrap;

variable whiteSpace

attribute DOMString whiteSpace;

variable textOverflow

attribute DOMString textOverflow;

variable cohSdf

attribute DOMString cohSdf;

variable cssText

attribute DOMString cssText;

variable display

attribute DOMString display;

variable position

attribute DOMString position;

variable color

attribute DOMString color;

variable backgroundColor

attribute DOMString backgroundColor;

variable cursor

attribute DOMString cursor;

variable marginBottom

attribute DOMString marginBottom;

variable marginLeft

attribute DOMString marginLeft;

variable marginRight

attribute DOMString marginRight;

variable marginTop

attribute DOMString marginTop;

variable margin

attribute DOMString margin;

variable paddingBottom

attribute DOMString paddingBottom;

variable paddingLeft

attribute DOMString paddingLeft;

variable paddingRight

attribute DOMString paddingRight;

variable paddingTop

attribute DOMString paddingTop;

variable padding

attribute DOMString padding;

variable clipPath

attribute DOMString clipPath;

variable zIndex

attribute DOMString zIndex;

set the zIndex

variable opacity

attribute DOMString opacity;

Opacity value.

variable visibility

attribute DOMString visibility;

variable textDecorationLine

attribute DOMString textDecorationLine;

variable textUnderlineOffset

attribute DOMString textUnderlineOffset;

variable textUnderlinePosition

attribute DOMString textUnderlinePosition;

variable textDecorationColor

attribute DOMString textDecorationColor;

variable textDecorationThickness

attribute DOMString textDecorationThickness;

variable textDecorationStyle

attribute DOMString textDecorationStyle;

variable textDecoration

attribute DOMString textDecoration;

variable textUnderlineOffsetPX

attribute long textUnderlineOffsetPX;

variable textUnderlineOffsetVH

attribute long textUnderlineOffsetVH;

variable textUnderlineOffsetVW

attribute long textUnderlineOffsetVW;

variable textUnderlineOffsetPERCENT

attribute long textUnderlineOffsetPERCENT;

variable textUnderlineOffsetREM

attribute long textUnderlineOffsetREM;

variable textDecorationThicknessPX

attribute long textDecorationThicknessPX;

variable textDecorationThicknessVH

attribute long textDecorationThicknessVH;

variable textDecorationThicknessVW

attribute long textDecorationThicknessVW;

variable textDecorationThicknessPERCENT

attribute long textDecorationThicknessPERCENT;

variable textDecorationThicknessREM

attribute long textDecorationThicknessREM;

variable transform

attribute DOMString transform;

set transformation

variable transformOrigin

attribute DOMString transformOrigin;

variable animation

attribute DOMString animation;

variable animationName

attribute DOMString animationName;

variable animationDuration

attribute DOMString animationDuration;

variable animationIterationCount

attribute DOMString animationIterationCount;

variable animationTimingFunction

attribute DOMString animationTimingFunction;

variable animationPlayState

attribute DOMString animationPlayState;

variable animationFillMode

attribute DOMString animationFillMode;

variable animationDelay

attribute DOMString animationDelay;

variable animationDirection

attribute DOMString animationDirection;

variable contain

attribute DOMString contain;

variable content

attribute DOMString content;

variable overflowX

attribute DOMString overflowX;

variable overflowY

attribute DOMString overflowY;

variable overflow

attribute DOMString overflow;

variable maskPosition

attribute DOMString maskPosition;

variable maskSize

attribute DOMString maskSize;

variable background

attribute DOMString background;

variable maskImage

attribute DOMString maskImage;

variable maskMode

attribute DOMString maskMode;

variable maskClip

attribute DOMString maskClip;

variable maskRepeat

attribute DOMString maskRepeat;

variable mask

attribute DOMString mask;

variable perspective

attribute DOMString perspective;

variable perspectiveOrigin

attribute DOMString perspectiveOrigin;

variable isolation

attribute DOMString isolation;

variable mixBlendMode

attribute DOMString mixBlendMode;

variable transitionProperty

attribute DOMString transitionProperty;

variable transitionDuration

attribute DOMString transitionDuration;

variable transitionDelay

attribute DOMString transitionDelay;

variable transitionTimingFunction

attribute DOMString transitionTimingFunction;

variable transition

attribute DOMString transition;

variable caretColor

attribute DOMString caretColor;

variable userSelect

attribute DOMString userSelect;

variable pointerEvents

attribute DOMString pointerEvents;

variable imageRendering

attribute DOMString imageRendering;

variable fill

attribute DOMString fill;

SVG properties.

variable fillOpacity

attribute DOMString fillOpacity;

variable stroke

attribute DOMString stroke;

variable strokeOpacity

attribute DOMString strokeOpacity;

variable strokeWidth

attribute DOMString strokeWidth;

variable strokeLinecap

attribute DOMString strokeLinecap;

variable strokeLinejoin

attribute DOMString strokeLinejoin;

variable strokeMiterlimit

attribute DOMString strokeMiterlimit;

variable stopOpacity

attribute DOMString stopOpacity;

variable stopColor

attribute DOMString stopColor;

variable fillRule

attribute DOMString fillRule;

variable clipRule

attribute DOMString clipRule;

variable maskType

attribute DOMString maskType;

variable strokeDasharray

attribute DOMString strokeDasharray;

variable strokeDashoffset

attribute DOMString strokeDashoffset;

variable cohCustomEffectName

attribute DOMString cohCustomEffectName;

Custom properties.

variable cohCustomEffectFloatParam1

attribute DOMString cohCustomEffectFloatParam1;

variable cohCustomEffectFloatParam2

attribute DOMString cohCustomEffectFloatParam2;

variable cohCustomEffectFloatParam3

attribute DOMString cohCustomEffectFloatParam3;

variable cohCustomEffectFloatParam4

attribute DOMString cohCustomEffectFloatParam4;

variable cohCustomEffectFloatParam5

attribute DOMString cohCustomEffectFloatParam5;

variable cohCustomEffectFloatParam6

attribute DOMString cohCustomEffectFloatParam6;

variable cohCustomEffectFloatParam7

attribute DOMString cohCustomEffectFloatParam7;

variable cohCustomEffectFloatParam8

attribute DOMString cohCustomEffectFloatParam8;

variable cohCustomEffectFloatParam9

attribute DOMString cohCustomEffectFloatParam9;

variable cohCustomEffectFloatParam10

attribute DOMString cohCustomEffectFloatParam10;

variable cohCustomEffectFloatParam11

attribute DOMString cohCustomEffectFloatParam11;

variable cohCustomEffectFloatParam12

attribute DOMString cohCustomEffectFloatParam12;

variable cohCustomEffectStringParam1

attribute DOMString cohCustomEffectStringParam1;

variable cohCustomEffectStringParam2

attribute DOMString cohCustomEffectStringParam2;

variable cohCompositionId

attribute DOMString cohCompositionId;

variable cohRenderingOption

attribute DOMString cohRenderingOption;