@@ -14,7 +14,7 @@ Editor: Naina Raisinghani, Google, nainar@google.com, w3cid 100915
1414Repository : w3c/css-houdini-drafts
1515Inline Github Issues : title
1616Ignored Vars : type, unit
17- Ignored Terms : Drawable, paint image definition, list-valued property, list-valued property iteration, parse a CSSStyleValue, values to iterate over, CSS
17+ Ignored Terms : Drawable, paint image definition, list-valued property, list-valued property iteration, parse a CSSStyleValue, values to iterate over, CSS, PseudoElement
1818Markup Shorthands : markdown yes
1919</pre>
2020
@@ -80,6 +80,11 @@ spec:css-syntax-3;
8080spec:css-values-4;
8181 type:type; text:<position>
8282 type:value; text:in
83+ type:dfn; text:relative length
84+ spec:cssom;
85+ type: dfn;
86+ text: resolved value
87+ text: origin-clean flag; for: CSSStyleSheet
8388spec:infra;
8489 type: dfn;
8590 text: list
@@ -480,16 +485,34 @@ partial interface Element {
480485};
481486</pre>
482487
483- <dfn>Computed StylePropertyMap</dfn> objects represent the computed style of an
484- {{Element}} or pseudo element, and are accessed by calling the
485- {{Element/computedStyleMap()}} method.
488+ <dfn>Computed StylePropertyMap</dfn> objects
489+ represent the [=computed values=] of an {{Element}} ,
490+ and are accessed by calling the {{Element/computedStyleMap()}} method.
491+
492+ <div algorithm>
493+ The <dfn method for="Element">computedStyleMap()</dfn> method must,
494+ when called on an {{Element}} |this|,
495+ perform the following steps:
496+
497+ 1. Return a live {{StylePropertyMapReadOnly}} object,
498+ whose [=StylePropertyMap/map entries=] are the name and [=computed value=] of
499+ every longhand CSS property supported by the User Agent,
500+ every registered [=custom property=] ,
501+ and every non-registered [=custom property=] which is not set to its initial value.
502+ </div>
503+
504+ Note: like {{Window/getComputedStyle()|Window.getComputedStyle()}} ,
505+ this method can expose information from stylesheets with the [=CSSStyleSheet/origin-clean flag=] unset.
486506
487- When constructed, the [==] for [=computed StylePropertyMap=]
488- objects is initialized to contain an entry for every valid CSS property supported by the User Agent.
507+ Note: The {{StylePropertyMapReadOnly}} returned by this method represents the *actual* [=computed values=] ,
508+ not the [=resolved value=] concept used by {{Window/getComputedStyle()|Window.getComputedStyle()}} .
509+ It can thus return different values than {{Window/getComputedStyle()|Window.getComputedStyle()}}
510+ for some properties (such as 'width' ).
489511
490- Note: The StylePropertyMap returned by computedStyleMap represents computed style,
491- not resolved style. In this regard it provides different values than those
492- in objects returned by getComputedStyle.
512+ Note: Per [WG resolution] (https://github.com/w3c/css-houdini-drafts/issues/350#issuecomment-294690156),
513+ pseudo-element styles are intended to be obtainable
514+ by adding this method to the new {{PseudoElement}} interface
515+ (rather than using a `pseudoElt` argument like {{Window/getComputedStyle()|Window.getComputedStyle()}} does).
493516
494517Declared {{StylePropertyMap}} objects {#declared-stylepropertymap-objects}
495518----------------------------------------------------------------------------
0 commit comments