class js.html.CSSStyleDeclaration

Available on js

A CSSStyleDeclaration is an interface to the declaration block returned by the style property of a cssRule in a stylesheet, when the rule is a CSSStyleRule.

CSSStyleDeclaration is also a read-only interface to the result of getComputedStyle.



Documentation for this class was provided by MDN.

Instance Fields

var animationDelay:String

The animation-delay CSS property specifies when the animation should start. This lets the animation sequence begin some time after it's applied to an element.

var animationDirection:String

The animation-direction CSS property indicates whether the animation should play in reverse on alternate cycles.

var animationDuration:String

The animation-duration CSS property specifies the length of time that an animation should take to complete one cycle.

var animationIterationCount:String

The animation-iteration-count CSS property defines the number of times an animation cycle should be played before stopping.

var animationName:String

The animation-name CSS property specifies a list of animations that should be applied to the selected element. Each name indicates a @keyframes at-rule that defines the property values for the animation sequence.

var animationPlayState:String

The animation-play-state CSS property determines whether an animation is running or paused. You can query this property's value to determine whether or not the animation is currently running; in addition, you can set its value to pause and resume playback of an animation.

var animationTimingFunction:String

The animation-timing-function CSS property specifies how a CSS animation should progress over the duration of each cycle. The possible values are one or several <timing-function> .

var azimuth:String

In combination with elevation, azimuth enables different audio sources to be positioned spatially for aural presentation. This is important in that it provides a natural way to tell several voices apart, as each can be positioned to originate at a different location on the sound stage. Stereo output produce a lateral sound stage, while binaural headphones and multi-speaker setups allow for a fully three-dimensional stage.

var backfaceVisibility:String

The backface-visibility CSS property determines whether or not the back face of the element is visible when facing the user. The back face of an element always is a transparent background, letting, when visible, a mirror image of the front face be displayed.

var background:String

The background CSS property is a shorthand for setting the individual background values in a single place in the style sheet. background can be used to set the values for one or more of: background-color , background-image , background-position , background-repeat , background-size , and background-attachment .

var backgroundAttachment:String

If a background-image is specified, the background-attachment CSS property determines whether that image's position is fixed within the viewport, or scrolls along with its containing block.

var backgroundClip:String

The background-clip CSS property specifies whether an element's background, either the color or image, extends underneath its border.

var backgroundColor:String

The background-color CSS property sets the background color of an element, either through a color value or the keyword transparent.

var backgroundImage:String

The background-image CSS property sets the background images for an element. The images are drawn on successive stacking context layers, with the first specified being drawn as if it is the closest to the user. The borders of the element are then drawn on top of them, and the background-color is drawn beneath them.

var backgroundOrigin:String

The background-origin CSS property determines the background positioning area, that is the position of the origin of an image specified using the background-image CSS property.

var backgroundPosition:String

The background-position CSS property sets the initial position, relative to the background position layer defined by background-origin for each defined background image.

var backgroundRepeat:String

The background-repeat CSS property defines how background images are repeated. A background image can be repeated along the horizontal axis, the vertical axis, both, or not repeated at all. When the repetition of the image tiles doesn't let them exactly cover the background, the way adjustments are done can be controlled by the author: by default, the last image is clipped, but the different tiles can instead be re-sized, or space can be inserted between the tiles.

var backgroundSize:String

The background-size CSS property specifies the size of the background images.

var bleed:String

This property specifies the extent of the page bleed area outside the page box. This property only has effect if crop marks are enabled.

var border:String

The border CSS property is a shorthand property for setting the individual border property values in a single place in the style sheet. border can be used to set the values for one or more of: border-width , border-style , border-color .

var borderBottom:String

The border-bottom CSS property is a shorthand that sets the values of border-bottom-color , border-bottom-style , and border-bottom-width . These properties describe the bottom border of elements.

var borderBottomColor:String

The border-bottom-color CSS property sets the color of the bottom border of an element. Note that in many cases the shorthand CSS properties  border-color or border-bottom are more convenient and preferable.

var borderBottomLeftRadius:String

The border-bottom-left-radius CSS property sets the rounding of the bottom-left corner of the element. The rounding can be a circle or an ellipse, or if one of the value is 0 no rounding is done and the corner is square.

var borderBottomRightRadius:String

The border-bottom-right-radius CSS property sets the rounding of the bottom-right corner of the element. The rounding can be a circle or an ellipse, or if one of the value is 0 no rounding is done and the corner is square.

var borderBottomStyle:String

The border-bottom-style CSS property sets the line style of the bottom border of a box.

var borderBottomWidth:String

The border-bottom-width CSS property sets the width of the bottom border of a box.

var borderCollapse:String

The border-collapse CSS property selects a table's border model. This has a big influence on the look and style of the table cells.

var borderColor:String

The border-color CSS property is a shorthand for setting the color of the four sides of an element's border: border-top-color , border-right-color , border-bottom-color , border-left-color

var borderImage:String

The border-image CSS property allows drawing an image on the borders of elements. This makes drawing complex looking widgets much simpler than it has been and removes the need for nine boxes in some cases.

var borderImageOutset:String

The border-image-outset property describes, by which amount border image area extends beyond the border box.

var borderImageRepeat:String

The border-image-repeat CSS property defines how the middle part of a border image is handled to match the size of the border. It has a one-value syntax which describes the behavior for all sides, and a two-value syntax that sets a different value for the horizontal and vertical behavior.

var borderImageSource:String

The border-image-source CSS property defines the <image> to use instead of the style of the border. If this property is set to none, the style defined by border-style is used instead.

var borderImageWidth:String

The border-image-width CSS property defines the offset to use for dividing the border image in nine parts, the top-left corner, central top edge, top-right-corner, central right edge, bottom-right corner, central bottom edge, bottom-left corner, and central right edge. They represent inward distance from the top, right, bottom and right edges.

var borderLeft:String

The border-left CSS property is a shorthand that sets the values of border-left-color , border-left-style , and border-left-width . These properties describe the left border of elements.

var borderLeftColor:String

The border-left-color CSS property sets the color of the bottom border of an element. Note that in many cases the shorthand CSS properties  border-color or border-left are more convenient and preferable.

var borderLeftStyle:String

The border-left-style CSS property sets the line style of the left border of a box.

var borderLeftWidth:String

The border-left-width CSS property sets the width of the left border of a box.

var borderRadius:String

The border-radius CSS property allows Web authors to define how rounded border corners are. The curve of each corner is defined using one or two radii, defining its shape: circle or ellipse.

var borderRight:String

The border-right CSS property is a shorthand that sets the values of border-right-color , border-right-style , and border-right-width . These properties describe the right border of elements.

var borderRightColor:String

The border-right-color CSS property sets the color of the bottom border of an element. Note that in many cases the shorthand CSS properties  border-color or border-right are more convenient and preferable.

var borderRightStyle:String

The border-right-style CSS property sets the line style of the right border of a box.

var borderRightWidth:String

The border-right-width CSS property sets the width of the right border of a box.

var borderSpacing:String

The border-spacing CSS property specifies the distance between the borders of adjacent cells (only for the separated borders model). This is equivalent to the cellspacing attribute in presentational HTML, but an optional second value can be used to set different horizontal and vertical spacing.

var borderStyle:String

The border-style CSS property is a shorthand property for setting the line style for all four sides of the elements border.

var borderTop:String

The border-top CSS property is a shorthand that sets the values of border-top-color , border-top-style , and border-top-width . These properties describe the top border of elements.

var borderTopColor:String

The border-top-color CSS property sets the color of the top border of an element. Note that in many cases the shorthand CSS properties  border-color or border-top are more convenient and preferable.

var borderTopLeftRadius:String

The border-top-left-radius CSS property sets the rounding of the top-left corner of the element. The rounding can be a circle or an ellipse, or if one of the value is 0 no rounding is done and the corner is square.

var borderTopRightRadius:String

The border-top-right-radius CSS property sets the rounding of the top-right corner of the element. The rounding can be a circle or an ellipse, or if one of the value is 0 no rounding is done and the corner is square.

var borderTopStyle:String

The border-top-style CSS property sets the line style of the top border of a box.

var borderTopWidth:String

The border-top-width CSS property sets the width of the top border of a box.

var borderWidth:String

The border-width CSS property sets the width of the border of a box. Using the shorthand property border is often more convenient.

var bottom:String

The bottom CSS property participates in specifying the position of positioned elements.

var boxShadow:String

The box-shadow CSS property accepts one or more shadow effects as a comma-separated list. It allows casting a drop shadow from the frame of almost any element. If a border-radius is specified on the element with a box shadow, the box shadow takes on the same rounded corners. The z-ordering of multiple box shadows is the same as multiple text shadows (the first specified shadow is on top).

var boxSizing:String

The box-sizing CSS property is used to alter the default CSS box model used to calculate widths and heights of elements. It is possible to use this property to emulate the behavior of browsers that do not correctly support the CSS box model specification.

var captionSide:String

The caption-side CSS property positions the content of a table's <caption> on the specified side.

var clear:String

The clear CSS property specifies whether an element can be next to floating elements that precede it or must be moved down (cleared) below them.

var clip:String

The clip CSS property defines what portion of an element is visible. The clip property applies only to elements with position:absolute .

var color:String

The color CSS property sets the foreground color of an element's text content

var columnCount:String

The column-count CSS property describes the number of columns of the element.

var columnFill:String

The column-fill CSS property controls how contents are partitioned into columns. Contents are either balanced, which means that contents in all columns will have the same height or, when using auto, just take up the room the content needs.

var columnGap:String

The column-gap CSS property sets the size of the gap between columns for elements which are specified to display as a multi-column element.

var columnRule:String

In multi-column layouts, the column-rule CSS property specifies a straight line, or "rule", to be drawn between each column. It is a convenient shorthand to avoid setting each of the individual column-rule-* properties separately : column-rule-width , column-rule-style and column-rule-color .

var columnRuleColor:String

The column-rule-color CSS property lets you set the color of the rule drawn between columns in multi-column layouts.

var columnRuleStyle:String

The column-rule-style CSS property lets you set the style of the rule drawn between columns in multi-column layouts.

var columnRuleWidth:String

The column-rule-width CSS property lets you set the width of the rule drawn between columns in multi-column layouts.

var columnSpan:String

The column-span CSS property makes it possible for an element to span across all columns when its value is set to all. An element that spans more than one column is called a spanning element.

var columnWidth:String

The column-width CSS property suggests an optimal column width. This is not a absolute value but a mere hint. Browser will adjust the width of the column around that suggested value, allowing to achieve scalable designs that fit different screen size. Especially in presence of the column-count CSS property which has precedence, to set an exact column width, all length values must be specified. In horizontal text these are width , column-width , column-gap , and column-rule-width .

var columns:String

The columns CSS property is a shorthand property allowing to set both the column-width and the column-count properties at the same time.

var content:String

The content CSS property is used with the :before and :after pseudo-elements to generate content in an element.

var counterIncrement:String

The counter-increment CSS property is used to increase the value of CSS Counters by a given value. The counter's value can be reset using the counter-reset CSS property.

var counterReset:String

The counter-reset CSS property is used to reset CSS Counters to a given value.

var cssText:String

Textual representation of the declaration block. Setting this attribute changes the style. Setter throws DOMException.

var cursor:String

The cursor CSS property specifies the mouse cursor displayed when the mouse pointer is over an element.

var direction:String

The direction CSS property should be set to match the direction of the text: rtl for Hebrew or Arabic text and ltr for other scripts. This should normally be done as part of the document (e.g., using the dir attribute in HTML) rather than through direct use of CSS.

var display:String

The display CSS property specifies the type of rendering box used for an element. In HTML, default display property values are taken from behaviors described in the HTML specifications or from the browser/user default stylesheet. The default value in XML is inline.

var emptyCells:String

The empty-cells CSS property specifies how user agent should render borders and backgrounds around cells that have no visible content.

var float:String

The float CSS property specifies that an element should be taken from the normal flow and placed along the left or right side of its container, where text and inline elements will wrap around it.

var font:String

The font CSS property is either a shorthand property for setting font-style , font-variant , font-weight , font-size , line-height and font-family , or a way to set the element's font to a system font, using specific keywords.

var fontFamily:String

The font-family CSS property allows for a prioritized list of font family names and/or generic family names to be specified for the selected element. Unlike most other CSS properties, values are separated by a comma to indicate that they are alternatives. The browser will select the first font on the list that is installed on the computer, or that can be downloaded using the information provided by a @font-face at-rule.

var fontSize:String

The font-size CSS property specifies the size of the font. The font size may, in turn, change the size of other items, since it is used to compute the value of em and ex length units.

var fontSizeAdjust:String

The font-size-adjust CSS property specifies that font size should be chosen based on the height of lowercase letters rather than the height of capital letters.

var fontStretch:String

The font-stretch CSS property selects a normal, condensed, or extended face from a font family.

var fontStyle:String

The font-style CSS property allows italic or oblique faces to be selected within a font-family .

var fontVariant:String

The font-variant CSS property selects a normal, or small-caps face from a font family. Setting font-variant is also possible by using the font shorthand.

var fontWeight:String

The font-weight CSS property specifies the weight or boldness of the font. However, some fonts are not available in all weights; some are available only on normal and bold.

var height:String

The height CSS property specifies the height of the content area of an element. The content area is inside the padding, border, and margin of the element.

var hyphens:String

The hyphens CSS property tells the browser how to go about splitting words to improve the layout of text when line-wrapping.

var imageRendering:String

The image-rendering CSS property provides a hint to the user agent about how to handle its image rendering.
image-rendering applies to scaled images (and other elements, see below). For example, if the natural size of the image is 100×100px but the page author specifies the dimensions to 200×200px (or50×50px), then the image will be upscaled (or downscaled) to the new dimensions using the specified algorithm. Scaling may also apply due to user interaction (zooming).

var left:String

The left CSS property specifies part of the position of positioned elements.

var length:Int

The number of properties. See the item method below.

var letterSpacing:String

The letter-spacing CSS property specifies spacing behavior between text characters.

var lineHeight:String

On inline elements, the line-height CSS property specifies the height that is used in the calculation of the line box height.
On block level elements, line-height specifies the minimal height of line boxes within the element.

var listStyle:String

The list-style CSS property is a shorthand property for setting list-style-type , list-style-image and list-style-position .

var listStyleImage:String

The list-style-image CSS property sets the image that will be used as the list item marker. It is often more convenient to use the shortcut list-style .

var listStylePosition:String

The list-style-position CSS property specifies the position of the marker box in the principal block box. It is often more convenient to use the shortcut list-style .

var listStyleType:String

The list-style-type CSS property specifies appearance of a list item element. As it is the only one who defaults to display:list-item, this is usually a <li> element, but can be any element with this display value.

var margin:String

The margin CSS property sets the margin for all four sides. It is a shorthand to avoid setting each side separately with the other margin properties:
margin-top , margin-right , margin-bottom and margin-left .
Negative value are also allowed.

var marginBottom:String

The margin-bottom CSS property of an element sets the margin space required on the bottom of an element. A negative value is also allowed.

var marginLeft:String

The margin-left CSS property of an element sets the margin space required on the left side of an element. A negative value is also allowed.

var marginRight:String

The margin-right CSS property of an element sets the margin space required on the right side of an element. A negative value is also allowed.

var marginTop:String

The margin-top CSS property of an element sets the margin space required on the top of an element. A negative value is also allowed.

var marks:String

The marks CSS property adds crop and/or cross marks to the presentation of the document. Crop marks indicate where the page should be cut. Cross marks are used to align sheets.

var maxHeight:String

The max-height CSS property is used to set the maximum height of a given element. It prevents the used value of the height property from becoming larger than the value specified for max-height.

var maxWidth:String

The max-width CSS property is used to set the maximum width of a given element. It prevents the used value of the width property from becoming larger than the value specified for max-width.

var minHeight:String

The min-height CSS property is used to set the minimum height of a given element. It prevents the used value of the height property from becoming smaller than the value specified for min-height.

var minWidth:String

The min-width CSS property is used to set the minimum width of a given element. It prevents the used value of the width property from becoming smaller than the value specified for min-width.

var opacity:String

The opacity CSS property specifies the transparency of an element, that is, the degree to which the background behind the element is overlaid.

var orphans:String

The orphans CSS property refers to the minimum number of lines in a block container that must be left at the bottom of the page.  This property is normally used to control how page breaks occur.

var outline:String

The outline CSS property is a shorthand property for setting one or more of the individual outline properties outline-style , outline-width and outline-color in a single rule. In most cases the use of this shortcut is preferable and more convenient.

var outlineColor:String

The outline-color CSS property sets the color of the outline of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out.

var outlineOffset:String

The outline-offset CSS property is used to set space between an outline and the edge or border of an element. An outline is a line that is drawn around elements, outside the border edge.

var outlineStyle:String

The outline-style CSS property is used to set the style of the outline of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out.

var outlineWidth:String

The outline-width CSS property is used to set the width of the outline of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out:

var overflow:String

The overflow CSS property specifies whether to clip content, render scroll bars or display overflow content of a block-level element.

var overflowX:String

The overflow-x CSS property specifies whether to clip content, render a scroll bar, or display overflow content of a block-level element, when it overflows at the left and right edges.

var overflowY:String

The overflow-y CSS property specifies whether to clip content, render a scroll bar, or display overflow content of a block-level element, when it overflows at the top and bottom edges.

var padding:String

The padding CSS property sets the required padding space on all sides of an element. The padding area is the space between the content of the element and its border. Negative values are not allowed.

var paddingBottom:String

The padding-bottom CSS property of an element sets the padding space required on the bottom of an element. The padding area is the space between the content of the element and it's border. A negative value is not allowed.

var paddingLeft:String

The padding-left CSS property of an element sets the padding space required on the left side of an element. The padding area is the space between the content of the element and it's border. A negative value is not allowed.

var paddingRight:String

The padding-right CSS property of an element sets the padding space required on the right side of an element. The padding area is the space between the content of the element and its border. Negative values are not allowed.

var paddingTop:String

The padding-top CSS property of an element sets the padding space required on the top of an element. The padding area is the space between the content of the element and it's border. A negative values is not allowed.

var pageBreakAfter:String

The page-break-after CSS property adjusts page breaks after the current element.

var pageBreakBefore:String

The page-break-before CSS property adjusts page breaks before the current element.

var pageBreakInside:String

The page-break-inside CSS property adjusts page breaks inside the current element.

var parentRule:CSSRule

The containing cssRule.

var perspective:String

The perspective CSS property determines the distance between the z=0 plane and the user in order to give to the 3D-positioned element some perspective. Each 3D element that is placed between the z=0 and the user is enlarged, each 3D-element with z<0 is shrinked. How much deformation is defined by the value of this property.

var perspectiveOrigin:String

The perspective-origin CSS property determines the position the viewer is looking at. It is used as the vanishing point by the perspective property.

var position:String

The position CSS property chooses alternative rules for positioning elements, designed to be useful for scripted animation effects.

var quotes:String

The quotes CSS property indicates how user agents should render quotation marks.

var resize:String

The resize CSS property lets you control the resizability of an element.

var right:String

The right CSS property specifies part of the position of positioned elements.

var tabSize:String

The tab-size CSS property is used to customize the width of a tab (U+0009) character.

var tableLayout:String

The table-layout CSS property defines the algorithm to be used to layout the table cells, rows, and columns.

var textAlign:String

The text-align CSS property describes how inline content like text is aligned in its parent block element. text-align does not control the alignment of block elements itself, only their inline content.

var textAlignLast:String

The text-align-last CSS property describes how the last line of a block or a line right before a forced line break is aligned.

var textDecoration:String

The text-decoration CSS property is used to set the text formattings underline, overline, line-through and blink.

var textDecorationColor:String

The text-decoration-color CSS property sets the color used when drawing underlines, overlines, or strike-throughs specified by text-decoration-line . This is the preferred way to color these text decorations, rather than using combinations of other HTML elements.

var textDecorationLine:String

The text-decoration-line CSS property sets what kind of line decorations are added to an element.

var textDecorationStyle:String

The text-decoration-style CSS property defines the style of the lines specified by text-decoration-line . The style applies to all lines, there is no way to define different style for each of the line defined by text-decoration-line.

var textIndent:String

The text-indent CSS property specifies how much horizontal space should be left before beginning of the first line of the text content of an element. Horizontal spacing is with respect to the left (or right, for right-to-left layout) edge of the containing block element's box.

var textShadow:String

The text-shadow CSS property adds shadows to text. It accepts a comma-separated list of shadows to be applied to the text and text-decorations of the element.

var textTransform:String

The text-transform CSS property specifies how to capitalize an element's text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized.

var top:String

The top CSS property specifies part of the position of positioned elements. It has no effect on non-positioned elements.

var transform:String

The transform CSS property lets you modify the coordinate space of the CSS visual formatting model. Using it, elements can be translated, rotated, scaled, and skewed according to the values set.

var transformOrigin:String

The transform-origin CSS property lets you modify the origin for transformations of an element. For example, the transform-origin of the rotate() function is the centre of rotation. (This property is applied by first translating the element by the negated value of the property, then applying the element's transform, then translating by the property value.)

var transformStyle:String

The transform-style CSS property determines if the children of the element are positioned in the 3D-space or are flattened in the plane of the element.

var transition:String

The transition CSS property is a shorthand property for transition-property , transition-duration , transition-timing-function , and transition-delay .

var transitionDelay:String

The transition-delay CSS property specifies the amount of time to wait between a change being requested to a property that is to be transitioned and the start of the transition effect.

var transitionDuration:String

The transition-duration CSS property specifies the number of seconds or milliseconds a transition animation should take to complete. By default, the value is 0s, meaning that no animation will occur.

var transitionProperty:String

The transition-property CSS property is used to specify the names of CSS properties to which a transition effect should be applied.

var transitionTimingFunction:String

The transition-timing-function CSS property is used to describe how the intermediate values of the CSS properties being affected by a transition effect are calculated. This in essence lets you establish an acceleration curve, so that the speed of the transition can vary over its duration.

var verticalAlign:String

The vertical-align CSS property specifies the vertical alignment of an inline or table-cell element.

var visibility:String

The visibility CSS property is used for two things:

var whiteSpace:String

The white-space CSS property is used to to describe how whitespace inside the element is handled.

var widows:String

where:

var width:String

The width CSS property specifies the width of the content area of an element. The content area is inside the padding, border, and margin of the element.

var wordSpacing:String

The word-spacing CSS property specifies spacing behavior between tags and words.

var wordWrap:String

The word-wrap CSS property is used to to specify whether or not the browser is allowed to break lines within words in order to prevent overflow when an otherwise unbreakable string is too long to fit.

var zIndex:String

The z-index CSS property specifies the z-order of an element and its descendants. When elements overlap, z-order determines which one covers the other. An element with a larger z-index generally covers an element with a lower one.

function getPropertyCSSValue(propertyName:String):CSSValue

function getPropertyPriority(propertyName:String):String

function getPropertyShorthand(propertyName:String):String

function getPropertyValue(propertyName:String):String

function isPropertyImplicit(propertyName:String):Bool

function item(index:Int):String

function removeProperty(propertyName:String):String

function setProperty(propertyName:String, ?value:String, priority:String):Void