The
CSS2Properties
interface represents a convenience
mechanism for retrieving and setting properties within a
CSSStyleDeclaration
. The attributes of this interface
correspond to all the properties specified in CSS2. Getting an attribute
of this interface is equivalent to calling the
getPropertyValue
method of the
CSSStyleDeclaration
interface. Setting an attribute of this
interface is equivalent to calling the
setProperty
method of
the
CSSStyleDeclaration
interface.
A conformant implementation of the CSS module is not required to
implement the
CSS2Properties
interface. If an implementation
does implement this interface, the expectation is that language-specific
methods can be used to cast from an instance of the
CSSStyleDeclaration
interface to the
CSS2Properties
interface.
If an implementation does implement this interface, it is expected to
understand the specific syntax of the shorthand properties, and apply
their semantics; when the
margin
property is set, for
example, the
marginTop
,
marginRight
,
marginBottom
and
marginLeft
properties are
actually being set by the underlying implementation.
When dealing with CSS "shorthand" properties, the shorthand properties
should be decomposed into their component longhand properties as
appropriate, and when querying for their value, the form returned should
be the shortest form exactly equivalent to the declarations made in the
ruleset. However, if there is no shorthand declaration that could be
added to the ruleset without changing in any way the rules already
declared in the ruleset (i.e., by adding longhand rules that were
previously not declared in the ruleset), then the empty string should be
returned for the shorthand property.
For example, querying for the
font
property should not
return "normal normal normal 14pt/normal Arial, sans-serif", when "14pt
Arial, sans-serif" suffices. (The normals are initial values, and are
implied by use of the longhand property.)
If the values for all the longhand properties that compose a particular
string are the initial values, then a string consisting of all the
initial values should be returned (e.g. a
border-width
value
of "medium" should be returned as such, not as "").
For some shorthand properties that take missing values from other
sides, such as the
margin
,
padding
, and
border-[width|style|color]
properties, the minimum number of
sides possible should be used; i.e., "0px 10px" will be returned instead
of "0px 10px 0px 10px".
If the value of a shorthand property can not be decomposed into its
component longhand properties, as is the case for the
font
property with a value of "menu", querying for the values of the component
longhand properties should return the empty string.
See also the
Document Object Model (DOM) Level 2 Style Specification.
getAzimuth
public String getAzimuth()
See the azimuth property definition in CSS2.
getBackground
public String getBackground()
See the background property definition in CSS2.
getBackgroundAttachment
public String getBackgroundAttachment()
See the background-attachment property definition in CSS2.
getBackgroundColor
public String getBackgroundColor()
See the background-color property definition in CSS2.
getBackgroundImage
public String getBackgroundImage()
See the background-image property definition in CSS2.
getBackgroundPosition
public String getBackgroundPosition()
See the background-position property definition in CSS2.
getBackgroundRepeat
public String getBackgroundRepeat()
See the background-repeat property definition in CSS2.
getBorder
public String getBorder()
See the border property definition in CSS2.
getBorderBottom
public String getBorderBottom()
See the border-bottom property definition in CSS2.
getBorderBottomColor
public String getBorderBottomColor()
See the border-bottom-color property definition in CSS2.
getBorderBottomStyle
public String getBorderBottomStyle()
See the border-bottom-style property definition in CSS2.
getBorderBottomWidth
public String getBorderBottomWidth()
See the border-bottom-width property definition in CSS2.
getBorderCollapse
public String getBorderCollapse()
See the border-collapse property definition in CSS2.
getBorderColor
public String getBorderColor()
See the border-color property definition in CSS2.
getBorderLeft
public String getBorderLeft()
See the border-left property definition in CSS2.
getBorderLeftColor
public String getBorderLeftColor()
See the border-left-color property definition in CSS2.
getBorderLeftStyle
public String getBorderLeftStyle()
See the border-left-style property definition in CSS2.
getBorderLeftWidth
public String getBorderLeftWidth()
See the border-left-width property definition in CSS2.
getBorderRight
public String getBorderRight()
See the border-right property definition in CSS2.
getBorderRightColor
public String getBorderRightColor()
See the border-right-color property definition in CSS2.
getBorderRightStyle
public String getBorderRightStyle()
See the border-right-style property definition in CSS2.
getBorderRightWidth
public String getBorderRightWidth()
See the border-right-width property definition in CSS2.
getBorderSpacing
public String getBorderSpacing()
See the border-spacing property definition in CSS2.
getBorderStyle
public String getBorderStyle()
See the border-style property definition in CSS2.
getBorderTop
public String getBorderTop()
See the border-top property definition in CSS2.
getBorderTopColor
public String getBorderTopColor()
See the border-top-color property definition in CSS2.
getBorderTopStyle
public String getBorderTopStyle()
See the border-top-style property definition in CSS2.
getBorderTopWidth
public String getBorderTopWidth()
See the border-top-width property definition in CSS2.
getBorderWidth
public String getBorderWidth()
See the border-width property definition in CSS2.
getBottom
public String getBottom()
See the bottom property definition in CSS2.
getCaptionSide
public String getCaptionSide()
See the caption-side property definition in CSS2.
getClear
public String getClear()
See the clear property definition in CSS2.
getClip
public String getClip()
See the clip property definition in CSS2.
getColor
public String getColor()
See the color property definition in CSS2.
getContent
public String getContent()
See the content property definition in CSS2.
getCounterIncrement
public String getCounterIncrement()
See the counter-increment property definition in CSS2.
getCounterReset
public String getCounterReset()
See the counter-reset property definition in CSS2.
getCssFloat
public String getCssFloat()
See the float property definition in CSS2.
getCue
public String getCue()
See the cue property definition in CSS2.
getCueAfter
public String getCueAfter()
See the cue-after property definition in CSS2.
getCueBefore
public String getCueBefore()
See the cue-before property definition in CSS2.
getCursor
public String getCursor()
See the cursor property definition in CSS2.
getDirection
public String getDirection()
See the direction property definition in CSS2.
getDisplay
public String getDisplay()
See the display property definition in CSS2.
getElevation
public String getElevation()
See the elevation property definition in CSS2.
getEmptyCells
public String getEmptyCells()
See the empty-cells property definition in CSS2.
getFont
public String getFont()
See the font property definition in CSS2.
getFontFamily
public String getFontFamily()
See the font-family property definition in CSS2.
getFontSize
public String getFontSize()
See the font-size property definition in CSS2.
getFontSizeAdjust
public String getFontSizeAdjust()
See the font-size-adjust property definition in CSS2.
getFontStretch
public String getFontStretch()
See the font-stretch property definition in CSS2.
getFontStyle
public String getFontStyle()
See the font-style property definition in CSS2.
getFontVariant
public String getFontVariant()
See the font-variant property definition in CSS2.
getFontWeight
public String getFontWeight()
See the font-weight property definition in CSS2.
getHeight
public String getHeight()
See the height property definition in CSS2.
getLeft
public String getLeft()
See the left property definition in CSS2.
getLetterSpacing
public String getLetterSpacing()
See the letter-spacing property definition in CSS2.
getLineHeight
public String getLineHeight()
See the line-height property definition in CSS2.
getListStyle
public String getListStyle()
See the list-style property definition in CSS2.
getListStyleImage
public String getListStyleImage()
See the list-style-image property definition in CSS2.
getListStylePosition
public String getListStylePosition()
See the list-style-position property definition in CSS2.
getListStyleType
public String getListStyleType()
See the list-style-type property definition in CSS2.
getMargin
public String getMargin()
See the margin property definition in CSS2.
getMarginBottom
public String getMarginBottom()
See the margin-bottom property definition in CSS2.
getMarginLeft
public String getMarginLeft()
See the margin-left property definition in CSS2.
getMarginRight
public String getMarginRight()
See the margin-right property definition in CSS2.
getMarginTop
public String getMarginTop()
See the margin-top property definition in CSS2.
getMarkerOffset
public String getMarkerOffset()
See the marker-offset property definition in CSS2.
getMarks
public String getMarks()
See the marks property definition in CSS2.
getMaxHeight
public String getMaxHeight()
See the max-height property definition in CSS2.
getMaxWidth
public String getMaxWidth()
See the max-width property definition in CSS2.
getMinHeight
public String getMinHeight()
See the min-height property definition in CSS2.
getMinWidth
public String getMinWidth()
See the min-width property definition in CSS2.
getOrphans
public String getOrphans()
See the orphans property definition in CSS2.
getOutline
public String getOutline()
See the outline property definition in CSS2.
getOutlineColor
public String getOutlineColor()
See the outline-color property definition in CSS2.
getOutlineStyle
public String getOutlineStyle()
See the outline-style property definition in CSS2.
getOutlineWidth
public String getOutlineWidth()
See the outline-width property definition in CSS2.
getOverflow
public String getOverflow()
See the overflow property definition in CSS2.
getPadding
public String getPadding()
See the padding property definition in CSS2.
getPaddingBottom
public String getPaddingBottom()
See the padding-bottom property definition in CSS2.
getPaddingLeft
public String getPaddingLeft()
See the padding-left property definition in CSS2.
getPaddingRight
public String getPaddingRight()
See the padding-right property definition in CSS2.
getPaddingTop
public String getPaddingTop()
See the padding-top property definition in CSS2.
getPage
public String getPage()
See the page property definition in CSS2.
getPageBreakAfter
public String getPageBreakAfter()
See the page-break-after property definition in CSS2.
getPageBreakBefore
public String getPageBreakBefore()
See the page-break-before property definition in CSS2.
getPageBreakInside
public String getPageBreakInside()
See the page-break-inside property definition in CSS2.
getPause
public String getPause()
See the pause property definition in CSS2.
getPauseAfter
public String getPauseAfter()
See the pause-after property definition in CSS2.
getPauseBefore
public String getPauseBefore()
See the pause-before property definition in CSS2.
getPitch
public String getPitch()
See the pitch property definition in CSS2.
getPitchRange
public String getPitchRange()
See the pitch-range property definition in CSS2.
getPlayDuring
public String getPlayDuring()
See the play-during property definition in CSS2.
getPosition
public String getPosition()
See the position property definition in CSS2.
getQuotes
public String getQuotes()
See the quotes property definition in CSS2.
getRichness
public String getRichness()
See the richness property definition in CSS2.
getRight
public String getRight()
See the right property definition in CSS2.
getSize
public String getSize()
See the size property definition in CSS2.
getSpeak
public String getSpeak()
See the speak property definition in CSS2.
getSpeakHeader
public String getSpeakHeader()
See the speak-header property definition in CSS2.
getSpeakNumeral
public String getSpeakNumeral()
See the speak-numeral property definition in CSS2.
getSpeakPunctuation
public String getSpeakPunctuation()
See the speak-punctuation property definition in CSS2.
getSpeechRate
public String getSpeechRate()
See the speech-rate property definition in CSS2.
getStress
public String getStress()
See the stress property definition in CSS2.
getTableLayout
public String getTableLayout()
See the table-layout property definition in CSS2.
getTextAlign
public String getTextAlign()
See the text-align property definition in CSS2.
getTextDecoration
public String getTextDecoration()
See the text-decoration property definition in CSS2.
getTextIndent
public String getTextIndent()
See the text-indent property definition in CSS2.
getTextShadow
public String getTextShadow()
See the text-shadow property definition in CSS2.
getTextTransform
public String getTextTransform()
See the text-transform property definition in CSS2.
getTop
public String getTop()
See the top property definition in CSS2.
getUnicodeBidi
public String getUnicodeBidi()
See the unicode-bidi property definition in CSS2.
getVerticalAlign
public String getVerticalAlign()
See the vertical-align property definition in CSS2.
getVisibility
public String getVisibility()
See the visibility property definition in CSS2.
getVoiceFamily
public String getVoiceFamily()
See the voice-family property definition in CSS2.
getVolume
public String getVolume()
See the volume property definition in CSS2.
getWhiteSpace
public String getWhiteSpace()
See the white-space property definition in CSS2.
getWidows
public String getWidows()
See the widows property definition in CSS2.
getWidth
public String getWidth()
See the width property definition in CSS2.
getWordSpacing
public String getWordSpacing()
See the word-spacing property definition in CSS2.
getZIndex
public String getZIndex()
See the z-index property definition in CSS2.
setAzimuth
public void setAzimuth(String azimuth)
throws DOMException
setBackground
public void setBackground(String background)
throws DOMException
setBackgroundAttachment
public void setBackgroundAttachment(String backgroundAttachment)
throws DOMException
setBackgroundColor
public void setBackgroundColor(String backgroundColor)
throws DOMException
setBackgroundImage
public void setBackgroundImage(String backgroundImage)
throws DOMException
setBackgroundPosition
public void setBackgroundPosition(String backgroundPosition)
throws DOMException
setBackgroundRepeat
public void setBackgroundRepeat(String backgroundRepeat)
throws DOMException
setBorder
public void setBorder(String border)
throws DOMException
setBorderBottom
public void setBorderBottom(String borderBottom)
throws DOMException
setBorderBottomColor
public void setBorderBottomColor(String borderBottomColor)
throws DOMException
setBorderBottomStyle
public void setBorderBottomStyle(String borderBottomStyle)
throws DOMException
setBorderBottomWidth
public void setBorderBottomWidth(String borderBottomWidth)
throws DOMException
setBorderCollapse
public void setBorderCollapse(String borderCollapse)
throws DOMException
setBorderColor
public void setBorderColor(String borderColor)
throws DOMException
setBorderLeft
public void setBorderLeft(String borderLeft)
throws DOMException
setBorderLeftColor
public void setBorderLeftColor(String borderLeftColor)
throws DOMException
setBorderLeftStyle
public void setBorderLeftStyle(String borderLeftStyle)
throws DOMException
setBorderLeftWidth
public void setBorderLeftWidth(String borderLeftWidth)
throws DOMException
setBorderRight
public void setBorderRight(String borderRight)
throws DOMException
setBorderRightColor
public void setBorderRightColor(String borderRightColor)
throws DOMException
setBorderRightStyle
public void setBorderRightStyle(String borderRightStyle)
throws DOMException
setBorderRightWidth
public void setBorderRightWidth(String borderRightWidth)
throws DOMException
setBorderSpacing
public void setBorderSpacing(String borderSpacing)
throws DOMException
setBorderStyle
public void setBorderStyle(String borderStyle)
throws DOMException
setBorderTop
public void setBorderTop(String borderTop)
throws DOMException
setBorderTopColor
public void setBorderTopColor(String borderTopColor)
throws DOMException
setBorderTopStyle
public void setBorderTopStyle(String borderTopStyle)
throws DOMException
setBorderTopWidth
public void setBorderTopWidth(String borderTopWidth)
throws DOMException
setBorderWidth
public void setBorderWidth(String borderWidth)
throws DOMException
setBottom
public void setBottom(String bottom)
throws DOMException
setCaptionSide
public void setCaptionSide(String captionSide)
throws DOMException
setClear
public void setClear(String clear)
throws DOMException
setClip
public void setClip(String clip)
throws DOMException
setColor
public void setColor(String color)
throws DOMException
setContent
public void setContent(String content)
throws DOMException
setCounterIncrement
public void setCounterIncrement(String counterIncrement)
throws DOMException
setCounterReset
public void setCounterReset(String counterReset)
throws DOMException
setCssFloat
public void setCssFloat(String cssFloat)
throws DOMException
setCue
public void setCue(String cue)
throws DOMException
setCueAfter
public void setCueAfter(String cueAfter)
throws DOMException
setCueBefore
public void setCueBefore(String cueBefore)
throws DOMException
setCursor
public void setCursor(String cursor)
throws DOMException
setDirection
public void setDirection(String direction)
throws DOMException
setDisplay
public void setDisplay(String display)
throws DOMException
setElevation
public void setElevation(String elevation)
throws DOMException
setEmptyCells
public void setEmptyCells(String emptyCells)
throws DOMException
setFont
public void setFont(String font)
throws DOMException
setFontFamily
public void setFontFamily(String fontFamily)
throws DOMException
setFontSize
public void setFontSize(String fontSize)
throws DOMException
setFontSizeAdjust
public void setFontSizeAdjust(String fontSizeAdjust)
throws DOMException
setFontStretch
public void setFontStretch(String fontStretch)
throws DOMException
setFontStyle
public void setFontStyle(String fontStyle)
throws DOMException
setFontVariant
public void setFontVariant(String fontVariant)
throws DOMException
setFontWeight
public void setFontWeight(String fontWeight)
throws DOMException
setHeight
public void setHeight(String height)
throws DOMException
setLeft
public void setLeft(String left)
throws DOMException
setLetterSpacing
public void setLetterSpacing(String letterSpacing)
throws DOMException
setLineHeight
public void setLineHeight(String lineHeight)
throws DOMException
setListStyle
public void setListStyle(String listStyle)
throws DOMException
setListStyleImage
public void setListStyleImage(String listStyleImage)
throws DOMException
setListStylePosition
public void setListStylePosition(String listStylePosition)
throws DOMException
setListStyleType
public void setListStyleType(String listStyleType)
throws DOMException
setMargin
public void setMargin(String margin)
throws DOMException
setMarginBottom
public void setMarginBottom(String marginBottom)
throws DOMException
setMarginLeft
public void setMarginLeft(String marginLeft)
throws DOMException
setMarginRight
public void setMarginRight(String marginRight)
throws DOMException
setMarginTop
public void setMarginTop(String marginTop)
throws DOMException
setMarkerOffset
public void setMarkerOffset(String markerOffset)
throws DOMException
setMarks
public void setMarks(String marks)
throws DOMException
setMaxHeight
public void setMaxHeight(String maxHeight)
throws DOMException
setMaxWidth
public void setMaxWidth(String maxWidth)
throws DOMException
setMinHeight
public void setMinHeight(String minHeight)
throws DOMException
setMinWidth
public void setMinWidth(String minWidth)
throws DOMException
setOrphans
public void setOrphans(String orphans)
throws DOMException
setOutline
public void setOutline(String outline)
throws DOMException
setOutlineColor
public void setOutlineColor(String outlineColor)
throws DOMException
setOutlineStyle
public void setOutlineStyle(String outlineStyle)
throws DOMException
setOutlineWidth
public void setOutlineWidth(String outlineWidth)
throws DOMException
setOverflow
public void setOverflow(String overflow)
throws DOMException
setPadding
public void setPadding(String padding)
throws DOMException
setPaddingBottom
public void setPaddingBottom(String paddingBottom)
throws DOMException
setPaddingLeft
public void setPaddingLeft(String paddingLeft)
throws DOMException
setPaddingRight
public void setPaddingRight(String paddingRight)
throws DOMException
setPaddingTop
public void setPaddingTop(String paddingTop)
throws DOMException
setPage
public void setPage(String page)
throws DOMException
setPageBreakAfter
public void setPageBreakAfter(String pageBreakAfter)
throws DOMException
setPageBreakBefore
public void setPageBreakBefore(String pageBreakBefore)
throws DOMException
setPageBreakInside
public void setPageBreakInside(String pageBreakInside)
throws DOMException
setPause
public void setPause(String pause)
throws DOMException
setPauseAfter
public void setPauseAfter(String pauseAfter)
throws DOMException
setPauseBefore
public void setPauseBefore(String pauseBefore)
throws DOMException
setPitch
public void setPitch(String pitch)
throws DOMException
setPitchRange
public void setPitchRange(String pitchRange)
throws DOMException
setPlayDuring
public void setPlayDuring(String playDuring)
throws DOMException
setPosition
public void setPosition(String position)
throws DOMException
setQuotes
public void setQuotes(String quotes)
throws DOMException
setRichness
public void setRichness(String richness)
throws DOMException
setRight
public void setRight(String right)
throws DOMException
setSize
public void setSize(String size)
throws DOMException
setSpeak
public void setSpeak(String speak)
throws DOMException
setSpeakHeader
public void setSpeakHeader(String speakHeader)
throws DOMException
setSpeakNumeral
public void setSpeakNumeral(String speakNumeral)
throws DOMException
setSpeakPunctuation
public void setSpeakPunctuation(String speakPunctuation)
throws DOMException
setSpeechRate
public void setSpeechRate(String speechRate)
throws DOMException
setStress
public void setStress(String stress)
throws DOMException
setTableLayout
public void setTableLayout(String tableLayout)
throws DOMException
setTextAlign
public void setTextAlign(String textAlign)
throws DOMException
setTextDecoration
public void setTextDecoration(String textDecoration)
throws DOMException
setTextIndent
public void setTextIndent(String textIndent)
throws DOMException
setTextShadow
public void setTextShadow(String textShadow)
throws DOMException
setTextTransform
public void setTextTransform(String textTransform)
throws DOMException
setTop
public void setTop(String top)
throws DOMException
setUnicodeBidi
public void setUnicodeBidi(String unicodeBidi)
throws DOMException
setVerticalAlign
public void setVerticalAlign(String verticalAlign)
throws DOMException
setVisibility
public void setVisibility(String visibility)
throws DOMException
setVoiceFamily
public void setVoiceFamily(String voiceFamily)
throws DOMException
setVolume
public void setVolume(String volume)
throws DOMException
setWhiteSpace
public void setWhiteSpace(String whiteSpace)
throws DOMException
setWidows
public void setWidows(String widows)
throws DOMException
setWidth
public void setWidth(String width)
throws DOMException
setWordSpacing
public void setWordSpacing(String wordSpacing)
throws DOMException
setZIndex
public void setZIndex(String zIndex)
throws DOMException