[2]
for .. in
で列挙されるもの:
https://suika.suikawiki.org/~wakaba/-temp/test/dom/style-declaration/enumerate-1.html
* 0 * 1 * length * cssText * getPropertyValue * getPropertyCSSValue * removeProperty * getPropertyPriority * setProperty * item * parentRule * azimuth * background * backgroundAttachment * backgroundColor * backgroundImage * backgroundPosition * backgroundRepeat * border * borderCollapse * borderColor * borderSpacing * borderStyle * borderTop * borderRight * borderBottom * borderLeft * borderTopColor * borderRightColor * borderBottomColor * borderLeftColor * borderTopStyle * borderRightStyle * borderBottomStyle * borderLeftStyle * borderTopWidth * borderRightWidth * borderBottomWidth * borderLeftWidth * borderWidth * bottom * captionSide * clear * clip * color * content * counterIncrement * counterReset * cue * cueAfter * cueBefore * cursor * direction * display * elevation * emptyCells * cssFloat * font * fontFamily * fontSize * fontSizeAdjust * fontStretch * fontStyle * fontVariant * fontWeight * height * left * letterSpacing * lineHeight * listStyle * listStyleImage * listStylePosition * listStyleType * margin * marginTop * marginRight * marginBottom * marginLeft * markerOffset * marks * maxHeight * maxWidth * minHeight * minWidth * orphans * outline * outlineColor * outlineStyle * outlineWidth * overflow * padding * paddingTop * paddingRight * paddingBottom * paddingLeft * page * pageBreakAfter * pageBreakBefore * pageBreakInside * pause * pauseAfter * pauseBefore * pitch * pitchRange * position * quotes * richness * right * size * speak * speakHeader * speakNumeral * speakPunctuation * speechRate * stress * tableLayout * textAlign * textDecoration * textIndent * textShadow * textTransform * top * unicodeBidi * verticalAlign * visibility * voiceFamily * volume * whiteSpace * widows * width * wordSpacing * zIndex * MozAppearance * MozBackgroundClip * MozBackgroundInlinePolicy * MozBackgroundOrigin * MozBinding * MozBorderBottomColors * MozBorderLeftColors * MozBorderRightColors * MozBorderTopColors * MozBorderRadius * MozBorderRadiusTopleft * MozBorderRadiusTopright * MozBorderRadiusBottomleft * MozBorderRadiusBottomright * MozBoxAlign * MozBoxDirection * MozBoxFlex * MozBoxOrient * MozBoxOrdinalGroup * MozBoxPack * MozBoxSizing * MozColumnCount * MozColumnWidth * MozColumnGap * MozFloatEdge * MozForceBrokenImageIcon * MozImageRegion * MozMarginEnd * MozMarginStart * MozOpacity * MozOutline * MozOutlineColor * MozOutlineRadius * MozOutlineRadiusTopleft * MozOutlineRadiusTopright * MozOutlineRadiusBottomleft * MozOutlineRadiusBottomright * MozOutlineStyle * MozOutlineWidth * MozOutlineOffset * MozPaddingEnd * MozPaddingStart * MozUserFocus * MozUserInput * MozUserModify * MozUserSelect * opacity * outlineOffset * overflowX * overflowY
scrollbar3dLightColor backgroundColor borderColor textDecorationLineThrough fontStyle styleFloat borderLeftColor scrollbarShadowColor scrollbarFaceColor unicodeBidi borderBottomWidth borderBottomStyle height layoutGridMode background listStylePosition textDecorationUnderline textOverflow marginLeft letterSpacing backgroundPositionX listStyle listStyleType clip margin backgroundPosition padding borderCollapse textJustifyTrim fontWeight paddingLeft wordSpacing scrollbarTrackColor marginTop textAlignLast imeMode zoom lineBreak verticalAlign right backgroundRepeat zIndex borderRightWidth textDecorationNone borderTopStyle fontVariant pageBreakBefore layoutGrid minHeight overflowX textDecorationBlink border paddingTop textJustify display textTransform cssText borderRightColor rubyPosition direction paddingBottom backgroundImage borderTop layoutGridChar layoutGridType posBottom scrollbarBaseColor textDecorationOverline paddingRight posRight borderTopWidth marginRight accelerator tableLayout textAlign filter writingMode borderBottomColor layoutFlow borderTopColor behavior lineHeight fontSize fontFamily pageBreakAfter scrollbarDarkShadowColor borderWidth borderLeft textUnderlinePosition borderRight borderStyle rubyOverhang cursor borderLeftStyle backgroundPositionY backgroundAttachment rubyAlign scrollbarHighlightColor listStyleImage layoutGridLine textKashida borderRightStyle width font wordBreak overflowY textDecoration scrollbarArrowColor wordWrap textAutospace overflow borderBottom visibility top marginBottom color left bottom borderLeftWidth textKashidaSpace position clear textIndent whiteSpace
background backgroundAttachment backgroundColor backgroundImage backgroundPosition backgroundRepeat border borderBottom borderBottomColor borderBottomStyle borderBottomWidth borderCollapse borderColor borderLeft borderLeftColor borderLeftStyle borderLeftWidth borderRight borderRightColor borderRightStyle borderRightWidth borderSpacing borderStyle borderTop borderTopColor borderTopStyle borderTopWidth borderWidth bottom captionSide clear clip color content counterIncrement counterReset cssFloat cssText cursor direction display emptyCells font fontFamily fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontWeight height left length letterSpacing lineHeight listStyle listStyleImage listStylePosition listStyleType margin marginBottom marginLeft marginRight marginTop markerOffset marks maxHeight maxWidth minHeight minWidth opPhonemes opVoicePitch opVoicePitchRange opVoiceRate opVoiceStress opVoiceVolume opacity orphans outline outlineColor outlineStyle outlineWidth overflow padding paddingBottom paddingLeft paddingRight paddingTop page pageBreakAfter pageBreakBefore pageBreakInside pause pauseAfter pauseBefore pitchRange pixelBottom pixelHeight pixelLeft pixelRight pixelTop pixelWidth posBottom posHeight posLeft posRight posTop posWidth position quotes right size speak speechRate styleFloat tableLayout textAlign textDecoration textIndent textShadow textTransform top unicodeBidi verticalAlign visibility voiceFamily volume whiteSpace widows width wordSpacing zIndex getPropertyValue getPropertyCSSValue getPropertyPriority setProperty removeProperty item
[6]
WinIE 6 も Opera 9 も、currentStyle
属性で得た
CSSStyleDeclaration
の属性を指定しようとするとエラーになります
(Opera では NO_MODIFICATION_ALLOWED_ERR
)。
https://suika.suikawiki.org/gate/2007/cssom/viewer?c=p%20%7B%0D%0A%20%20color%3A%20blue%3B%0D%0A%7D;h=%3Cinput%20type%3Dbutton%20value%3Dx%20onclick%3D%22%0D%0A%20%20var%20sd%20%3D%20document.getElementsByTagName%20('p')%5B0%5D.currentStyle%3B%0D%0A%20%20sd.color%20%3D%20'red'%3B%0D%0A%20%20w%20(sd.color)%3B%0D%0A%22%3E%0D%0A%0D%0A%3Cp%3EXXXXX%3C%2Fp%3E;p=n;x=style-element
(名無しさん)
[7]
Firefox 2 も Opera 9 も getComputedStyle
メソッドで得た
CSSStyleDeclaration
の属性を指定しようとすると
NO_MODIFICATION_ALLOWED_ERR
になります。
https://suika.suikawiki.org/gate/2007/cssom/viewer?c=p%20%7B%0A%20%20color%3A%20blue%3B%0A%7D;h=%3Cinput%20type%3Dbutton%20value%3Dx%20onclick%3D%22%0A%20%20var%20sd%20%3D%20getComputedStyle%20(document.getElementsByTagName%20('p')%5B0%5D%2C%20null)%3B%0A%20%20sd.color%20%3D%20'red'%3B%0A%20%20w%20(sd.color)%3B%0A%22%3E%0A%0A%3Cp%3EXXXXX%3C%2Fp%3E;p=n;x=style-element
(名無しさん)
[8]
Document Object Model CSS (2000-11-10 08:42:54 +09:00
版) http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/css.html#CSS-CSSStyleDeclaration
(名無しさん)
While an implementation may not recognize all CSS properties within a CSS declaration block, it is expected to provide access to all specified properties in the style sheet through the CSSStyleDeclaration interface.
でもこれを実装しているのは WinIE 6 だけか。。。 (名無しさん)
item
で列挙される順序は決まっていない。
(名無しさん)
item
で列挙される順序は決まっていない。
(名無しさん)
[12] shorthand はできるだけ短い表現にしないといけないらしい (ただし should)。
[13] Jorgen’s weblog about me - my thoughts - work » Blog Archive » Cross-browser CSSStyleDeclaration interface ( 版) http://jorgenhorstink.nl/2006/11/09/cross-browser-cssstyledeclaration-interface/
[14] IEのmin-heightは仲間はずれ, min-width, max-widthを実装するヒント - uupaaの開発日記 ( 版) http://d.hatena.ne.jp/uupaa/20080703/1215020703
currentStyle の隠しプロパティ(DontEnum属性付きのプロパティ)を列挙してみると素のCSS名のままで設定値が残されています。
[15] CSSStyleDeclaration#setProperty と CSSStyleDeclaration#removeProperty - @think49の日記 ( ( 版)) http://d.hatena.ne.jp/think49/20110528/1306578858
[16] IRC logs: freenode / #whatwg / 20130604 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20130604#l-624
[17] [cssom-view] extending CSSStyleDeclaration with the CSS properties defined in SVG 1.1 ( (Erik Dahlstrom 著, 版)) http://lists.w3.org/Archives/Public/www-style/2011Jul/0113.html
[18] Firefox は元の順序を尊重するようですが、 Chrome は !important
がついたものをあとに並べるようです。
[19] csswg: changeset 14531:26672b51dc80 ( ( 版)) https://dvcs.w3.org/hg/csswg/rev/26672b51dc809bce0f252535a45cabfbea97c33e
[20] IRC logs: freenode / #whatwg / 20150401 ( 版) http://krijnhoetmer.nl/irc-logs/whatwg/20150401#l-617
[21] [cssom] Support webkitFoo IDL attributes (in addition to WebkitFoo) · w3c/csswg-drafts@296f358 ( 版) https://github.com/w3c/csswg-drafts/commit/296f35860633521ecac2bb680b0963110c6046f8
[23] [css-logical-1] [css-cascade-3] The all shorthand probably shouldn't set logical properties. · Issue #1898 · w3c/csswg-drafts () https://github.com/w3c/csswg-drafts/issues/1898