ICSSStyleDeclaration class

ICSSStyleDeclaration class

The CSSStyleDeclaration interface represents a single CSS declaration block. This interface may be used to determine the style properties currently set in a block or to set style properties explicitly within the block.

The ICSSStyleDeclaration type exposes the following members:

Properties

PropertyDescription
css_textThe parsable textual representation of the declaration block (excluding the surrounding curly braces). Setting this attribute will result in the parsing of the new value and resetting of all the properties in the declaration block including the removal or addition of properties.
lengthThe number of properties that have been explicitly set in this declaration block. The range of valid indices is 0 to length-1 inclusive.
parent_ruleThe CSS rule that contains this declaration block or null if this CSSStyleDeclaration is not attached to a CSSRule.
azimuthSee the azimuth property definition in CSS2.
backgroundSee the background property definition in CSS2.
background_attachmentSee the background-attachment property definition in CSS2.
background_colorSee the background-color property definition in CSS2.
background_imageSee the background-image property definition in CSS2.
background_positionSee the background-position property definition in CSS2.
background_repeatSee the background-repeat property definition in CSS2.
borderSee the border property definition in CSS2.
border_collapseSee the border-collapse property definition in CSS2.
border_colorSee the border-color property definition in CSS2.
border_spacingSee the border-spacing property definition in CSS2.
border_styleSee the border-style property definition in CSS2.
border_topSee the border-top property definition in CSS2.
border_rightSee the border-right property definition in CSS2.
border_bottomSee the border-bottom property definition in CSS2.
border_leftSee the border-left property definition in CSS2.
border_top_colorSee the border-top-color property definition in CSS2.
border_right_colorSee the border-right-color property definition in CSS2.
border_bottom_colorSee the border-bottom-color property definition in CSS2.
border_left_colorSee the border-left-color property definition in CSS2.
border_top_styleSee the border-top-style property definition in CSS2.
border_right_styleSee the border-right-style property definition in CSS2.
border_bottom_styleSee the border-bottom-style property definition in CSS2.
border_left_styleSee the border-left-style property definition in CSS2.
border_top_widthSee the border-top-width property definition in CSS2.
border_right_widthSee the border-right-width property definition in CSS2.
border_bottom_widthSee the border-bottom-width property definition in CSS2.
border_left_widthSee the border-left-width property definition in CSS2.
border_widthSee the border-width property definition in CSS2.
bottomSee the bottom property definition in CSS2.
caption_sideSee the caption-side property definition in CSS2.
clearSee the clear property definition in CSS2.
clipSee the clip property definition in CSS2.
colorSee the color property definition in CSS2.
contentSee the content property definition in CSS2.
counter_incrementSee the counter-increment property definition in CSS2.
counter_resetSee the counter-reset property definition in CSS2.
cueSee the cue property definition in CSS2.
cue_afterSee the cue-after property definition in CSS2.
cue_beforeSee the cue-before property definition in CSS2.
cursorSee the cursor property definition in CSS2.
directionSee the direction property definition in CSS2.
displaySee the display property definition in CSS2.
elevationSee the elevation property definition in CSS2.
empty_cellsSee the empty-cells property definition in CSS2.
floatSee the float property definition in CSS2.
fontSee the font property definition in CSS2.
font_familySee the font-family property definition in CSS2.
font_sizeSee the font-size property definition in CSS2.
font_size_adjustSee the font-size-adjust property definition in CSS2.
font_stretchSee the font-stretch property definition in CSS2.
font_styleSee the font-style property definition in CSS2.
font_variantSee the font-variant property definition in CSS2.
font_weightSee the font-weight property definition in CSS2.
heightSee the height property definition in CSS2.
leftSee the left property definition in CSS2.
letter_spacingSee the letter-spacing property definition in CSS2.
line_heightSee the line-height property definition in CSS2.
list_styleSee the list-style property definition in CSS2.
list_style_imageSee the list-style-image property definition in CSS2.
list_style_positionSee the list-style-position property definition in CSS2.
list_style_typeSee the list-style-type property definition in CSS2.
marginSee the margin property definition in CSS2.
margin_topSee the margin-top property definition in CSS2.
margin_rightSee the margin-right property definition in CSS2.
margin_bottomSee the margin-bottom property definition in CSS2.
margin_leftSee the margin-left property definition in CSS2.
marker_offsetSee the marker-offset property definition in CSS2.
marksSee the marks property definition in CSS2.
max_heightSee the max-height property definition in CSS2.
max_widthSee the max-width property definition in CSS2.
min_heightSee the min-height property definition in CSS2.
min_widthSee the min-width property definition in CSS2.
orphansSee the orphans property definition in CSS2.
outlineSee the outline property definition in CSS2.
outline_colorSee the outline-color property definition in CSS2.
outline_styleSee the outline-style property definition in CSS2.
outline_widthSee the outline-width property definition in CSS2.
overflowSee the overflow property definition in CSS2.
paddingSee the padding property definition in CSS2.
padding_topSee the padding-top property definition in CSS2.
padding_rightSee the padding-right property definition in CSS2.
padding_bottomSee the padding-bottom property definition in CSS2.
padding_leftSee the padding-left property definition in CSS2.
pageSee the page property definition in CSS2.
page_break_afterSee the page-break-after property definition in CSS2.
page_break_beforeSee the page-break-before property definition in CSS2.
page_break_insideSee the page-break-inside property definition in CSS2.
pauseSee the pause property definition in CSS2.
pause_afterSee the pause-after property definition in CSS2.
pause_beforeSee the pause-before property definition in CSS2.
pitchSee the pitch property definition in CSS2.
pitch_rangeSee the pitch-range property definition in CSS2.
play_duringSee the play-during property definition in CSS2.
positionSee the position property definition in CSS2.
quotesSee the quotes property definition in CSS2.
richnessSee the richness property definition in CSS2.
rightSee the right property definition in CSS2.
sizeSee the size property definition in CSS2.
speakSee the speak property definition in CSS2.
speak_headerSee the speak-header property definition in CSS2.
speak_numeralSee the speak-numeral property definition in CSS2.
speak_punctuationSee the speak-punctuation property definition in CSS2.
speech_rateSee the speech-rate property definition in CSS2.
stressSee the stress property definition in CSS2.
table_layoutSee the table-layout property definition in CSS2.
text_alignSee the text-align property definition in CSS2.
text_decorationSee the text-decoration property definition in CSS2.
text_indentSee the text-indent property definition in CSS2.
text_shadowSee the text-shadow property definition in CSS2.
text_transformSee the text-transform property definition in CSS2.
topSee the top property definition in CSS2.
unicode_bidiSee the unicode-bidi property definition in CSS2.
vertical_alignSee the vertical-align property definition in CSS2.
visibilitySee the visibility property definition in CSS2.
voice_familySee the voice-family property definition in CSS2.
volumeSee the volume property definition in CSS2.
white_spaceSee the white-space property definition in CSS2.
widowsSee the widows property definition in CSS2.
widthSee the width property definition in CSS2.
word_spacingSee the word-spacing property definition in CSS2.
z_indexSee the z-index property definition in CSS2.

Used to retrieve the properties that have been explicitly set in this declaration block. The order of the properties retrieved using this method does not have to be the order in which they were set. This method can be used to iterate over all properties in this declaration block.

Indexer

NameDescription
[index]The property index

Methods

MethodDescription
set_propertyUsed to set a property value with default priority within this declaration block.
Default priority is not “important” i.e. String.Empty
set_propertyUsed to set a property value and priority within this declaration block.
get_property_valueUsed to retrieve the value of a CSS property if it has been explicitly set within this declaration block.
get_property_css_valueUsed to retrieve the object representation of the value of a CSS property if it has been explicitly set within this declaration block. This method returns null if the property is a shorthand property. Shorthand property values can only be accessed and modified as strings, using the getPropertyValue and setProperty methods.
remove_propertyUsed to remove a CSS property if it has been explicitly set within this declaration block.
get_property_priorityUsed to retrieve the priority of a CSS property (e.g. the “important” qualifier) if the property has been explicitly set in this declaration block.

See Also