diff --git a/README.markdown b/README.markdown index 68254b6e..2966e613 100755 --- a/README.markdown +++ b/README.markdown @@ -1,6 +1,6 @@ ### [CSS-TAG Houdini Task Force](https://wiki.css-houdini.org/) Specifications -This is the repository containing the [CSS/TAG Houdini Task Force specifications](https://drafts.css-houdini.org/). +This is the repository containing the [CSS/TAG Houdini Task Force specifications](https://drafts.css-houdini.org/). For an overview of current status, see [Is Houdini Ready Yet?](https://ishoudinireadyyet.com/) In addition to this git repository, a Mercurial mirror is maintained at `https://hg.css-houdini.org/drafts`, if for whatever reason you prefer Mercurial. diff --git a/css-layout-api/Overview.bs b/css-layout-api/Overview.bs index f7ece3bc..54a7bd83 100644 --- a/css-layout-api/Overview.bs +++ b/css-layout-api/Overview.bs @@ -51,6 +51,7 @@ spec:css22; type:property; text:min-height text:min-width spec:css2; type:property; text:max-width +spec:webidl; type:dfn; text:is a platform object
@@ -352,8 +353,9 @@ is called, the user agent must run the following steps: 5. Let |inputPropertiesIterable| be the result of [=Get=](|layoutCtor|, "inputProperties"). 6. If |inputPropertiesIterable| is not undefined, then set |inputProperties| to the result of - [=converting=] |inputPropertiesIterable| to asequence<DOMString>
. If an - exception is [=thrown=], rethrow the exception and abort all these steps. + [=converted to an IDL value|converting=] |inputPropertiesIterable| to a +sequence<DOMString>
. If an exception is [=thrown=], rethrow the exception + and abort all these steps. 7. Filter |inputProperties| so that it only contains [=supported CSS properties=] and [=custom properties=]. @@ -373,7 +375,7 @@ is called, the user agent must run the following steps: "childInputProperties"). 10. If |childInputPropertiesIterable| is not undefined, then set |childInputProperties| to the - result of [=converting=] |childInputPropertiesIterable| to a + result of [=converted to an IDL value|converting=] |childInputPropertiesIterable| to asequence<DOMString>
. If an exception is [=thrown=], rethrow the exception and abort all these steps. @@ -382,9 +384,9 @@ is called, the user agent must run the following steps: 12. Let |layoutOptionsValue| be the result of [=Get=](|layoutCtor|, "layoutOptions"). - 13. Let |layoutOptions| be the result of [=converting=] |layoutOptionsValue| to a - {{LayoutOptions}}. If an exception is [=thrown=], rethrow the exception and abort all these - steps. + 13. Let |layoutOptions| be the result of [=converted to an IDL value|converting=] + |layoutOptionsValue| to a {{LayoutOptions}}. If an exception is [=thrown=], rethrow the + exception and abort all these steps. 14. Let |prototype| be the result of [=Get=](|layoutCtor|, "prototype"). @@ -393,13 +395,14 @@ is called, the user agent must run the following steps: 16. Let |intrinsicSizesValue| be the result of [=Get=](|prototype|, "intrinsicSizes"). - 17. Let |intrinsicSizes| be the result of [=converting=] |intrinsicSizesValue| to the - [=Function=] [=callback function=] type. Rethrow any exceptions from the conversion. + 17. Let |intrinsicSizes| be the result of [=converted to an IDL value|converting=] + |intrinsicSizesValue| to the {{Function}} [=callback function=] type. Rethrow any + exceptions from the conversion. 18. Let |layoutValue| be the result of [=Get=](|prototype|,"layout"
). - 19. Let |layout| be the result of [=converting=] |layoutValue| to the [=Function=] [=callback - function=] type. Rethrow any exceptions from the conversion. + 19. Let |layout| be the result of [=converted to an IDL value|converting=] |layoutValue| to + the {{Function}} [=callback function=] type. Rethrow any exceptions from the conversion. 20. Let |definition| be a new [=layout definition=] with: @@ -1827,8 +1830,9 @@ When the user agent wants to invoke an intrinsic sizes callback given 10. Let |intrinsicSizesFunction| be |definition|'s [=intrinsic sizes function=]. - 11. Let |value| be the result of [=Invoke=](|intrinsicSizesFunction|, |layoutInstance|, - «|children|, |edges|, |styleMap|»). + 11. Let |value| be the result of [=invoking=] |intrinsicSizesFunction| with « |children|, + |edges|, |styleMap| » and "`rethrow`", and with |layoutInstance| as the [=callback this + value=]. If an exception is [=thrown=] the let |box| fallback to the [=flow layout=] and abort all these steps. @@ -1847,9 +1851,9 @@ When the user agent wants to invoke an intrinsic sizes callback given 1. Let |intrinsicSizesValue| be |value|. - 13. Let |intrinsicSizes| be the result of [=converting=] |intrinsicSizesValue| to a - {{IntrinsicSizesResultOptions}}. If an exception is [=thrown=], let |box| fallback to the - [=flow layout=] and abort all these steps. + 13. Let |intrinsicSizes| be the result of [=converted to an IDL value|converting=] + |intrinsicSizesValue| to a {{IntrinsicSizesResultOptions}}. If an exception is [=thrown=], + let |box| fallback to the [=flow layout=] and abort all these steps. 14. Set the [=intrinsic sizes=] of |box|: @@ -1950,8 +1954,9 @@ following steps: 13. Let |layoutFunction| be |definition|'s [=layout function=]. - 14. Let |value| be the result of [=Invoke=](|layoutFunction|, |layoutInstance|, «|children|, - |edges|, |layoutConstraints|, |styleMap|, |breakToken|»). + 14. Let |value| be the result of [=invoking =] |layoutFunction| with « |children|, |edges|, + |layoutConstraints|, |styleMap|, |breakToken| », and with |layoutInstance| as the [=callback + this value=]. If an exception is [=thrown=] the let |box| fallback to the [=flow layout=] and abort all these steps. @@ -1969,20 +1974,20 @@ following steps: 1. Let |fragmentResultValue| be |value|. - 16. If |fragmentResultValue| is a [=platform object=]: + 16. If |fragmentResultValue| [=is a platform object=]: - Then: - 1. Let |fragmentResult| be the result [=converting=] |fragmentResultValue| to a - {{FragmentResult}}. + 1. Let |fragmentResult| be the result [=converted to an IDL value|converting=] + |fragmentResultValue| to a {{FragmentResult}}. If an exception is [=thrown=], let |box| fallback to the [=flow layout=] and abort all these steps. - Otherwise: - 1. Let |fragmentResultOptions| be the result of [=converting=] |fragmentResultValue| to - a {{FragmentResultOptions}}. + 1. Let |fragmentResultOptions| be the result of [=converted to an IDL value|converting=] + |fragmentResultValue| to a {{FragmentResultOptions}}. If an exception is [=thrown=], let |box| fallback to the [=flow layout=] and abort all these steps. diff --git a/css-paint-api/Overview.bs b/css-paint-api/Overview.bs index 86f48645..833f4a1f 100644 --- a/css-paint-api/Overview.bs +++ b/css-paint-api/Overview.bs @@ -307,10 +307,10 @@ The <> function is an additional notation to be supported by the < @@ -664,7 +664,8 @@ When the user agent wants to invoke a paint callback given |name|, |i 11. Let |paintFunctionCallback| be |definition|'s [=paint function=]. 12. [=Invoke=] |paintFunctionCallback| with arguments «|renderingContext|, |paintSize|, - |styleMap|, |inputArguments|», and with |paintInstance| as the [=callback this value=]. + |styleMap|, |inputArguments|» and "`rethrow`", and with |paintInstance| as the + [=callback this value=]. If |paintFunctionCallback| does not complete within an acceptable time (as determined by the user agent, i.e. it is a "long running script") the user agent may terminate the diff --git a/css-properties-values-api/Overview.bs b/css-properties-values-api/Overview.bs index 6ded25b7..a14a4e5f 100644 --- a/css-properties-values-api/Overview.bs +++ b/css-properties-values-api/Overview.bs @@ -1,6 +1,7 @@- <style> + <style> .logo { background-image: paint(company-logo); } .chat-bubble { background-image: paint(chat-bubble, blue); } - </style> + </style>Title: CSS Properties and Values API Level 1 Status: ED +Prepare for TR: no Group: houdini ED: https://drafts.css-houdini.org/css-properties-values-api-1/ TR: https://www.w3.org/TR/css-properties-values-api-1/ @@ -13,10 +14,10 @@ Level: 1 Abstract: This CSS module defines an API for registering new CSS properties. Properties registered using this API are provided with a parse syntax that defines a type, inheritance behaviour, and an initial value. Editor: Tab Atkins-Bittner, Google, http://xanthir.com/contact/, w3cid 42199 Former Editor: Shane Stephens, shanestephens@google.com, w3cid 47691 -Editor: Daniel Glazman, daniel.glazman@disruptive-innovations.com, w3cid 13329 +Former Editor: Daniel Glazman, daniel.glazman@disruptive-innovations.com, w3cid 13329 Editor: Alan Stearns, stearns@adobe.com, w3cid 46659 Former Editor: Elliot Sprehn, esprehn@chromium.org -Editor: Greg Whitworth, gwhit@microsoft.com, w3cid 69511 +Editor: Greg Whitworth, gwhitworth@salesforce.com , w3cid 69511 Ignored Terms: boolean, Animatable, Map, Context, isolated worker, SyntaxError, Ignored Terms: InvalidModificationError, NotFoundError, StylePropertyMapReadOnly, Ignored Terms: worklet global scope @@ -236,8 +237,12 @@ and"<percentage>"
values: (such as a [=math function=]), the computed value is defined by that function. +For"<string>"
values, +the computed value is as specified. + For"<color>"
values, -the value is computed by [=resolving color values=]. +the value is computed by resolving color values, +per [[css-color-4#resolving-color-values]]. For"<custom-ident>"
, ident, or"*"
values, the computed value is as specified. @@ -277,7 +282,7 @@ the computed value is one of the following:<link href="/style/foo/foo.css" rel="stylesheet" type="text/css"> <link href="/style/bar/bar.css" rel="stylesheet" type="text/css"> - <div style="background-image: var(--url-foo), var(---url-bar);"> + <div style="background-image: var(--url-foo), var(--url-bar);"> </div>@@ -395,16 +400,6 @@ and [[css-syntax-3#tokenization|tokenizing]] the resulting string. a <> with a value of "80" and unit "px". -### Fallbacks In ''var()'' References ### {#fallbacks-in-var-references} - -References to registered custom properties using the ''var()'' function may -provide a fallback. However, the fallback value must match the -syntax definition of the custom property being referenced, otherwise the -declaration is invalid at computed-value time. - -Note: This applies regardless of whether or not the fallback is being used. - - ### Dependency Cycles via Relative Units ### {#dependency-cycles} [=Registered custom properties=] follow the same rules for dependency cycle resolution @@ -629,7 +624,7 @@ The '@property/initial-value' Descriptor {#initial-value-descriptor} Name: initial-value - Value: <@@ -735,7 +730,7 @@ as arguments of the same names. Otherwise, if |syntax definition| is the universal syntax definition, - [=CSS/parse=] |initialValue| as a <> + Value: < >? For: @property Initial: the [=guaranteed-invalid value=] (but see prose) >. + [=CSS/parse=] |initialValue| according to <
. If this fails, throw a {{SyntaxError}} and exit this algorithm. @@ -943,6 +938,8 @@ corresponding types accepted by the resulting syntax component. : "<length-percentage>" :: Any valid <>? > or < > value, any valid < > expression combining < > and < > components. +: "<string>" +:: Any valid < > value : "<color>" :: Any valid < > value : "<image>" @@ -1194,10 +1191,10 @@ The {{CSSPropertyRule}} interface represents an ''@property'' rule. [Exposed=Window] interface CSSPropertyRule : CSSRule { - readonly attribute CSSOMString name; - readonly attribute CSSOMString syntax; - readonly attribute boolean inherits; - readonly attribute CSSOMString? initialValue; + readonly attribute CSSOMString name; + readonly attribute CSSOMString syntax; + readonly attribute boolean inherits; + readonly attribute CSSOMString? initialValue; };@@ -1376,3 +1373,17 @@ Privacy Considerations {#privacy-considerations} ================================================== There are no known privacy issues introduced by these features. + +Changes {#changes} +================== + ++ Changes since the Working Draft of 13 October 2020 +
+ +/* to 20 March 2024 */ +* Made "initial-value" have a <declaration-value>?, same as custom properties. (#9078) +* Allowed @Property in shadow trees. (#1085) +* Added section explaining why property registration is global, rather than shadow-scoped. +* Exported the terms "registered custom property" and "universal syntax definition", for use in other specifications. (#1020) +* Used the term "invalid at computed-value time" rather than "guaranteed-invalid value". diff --git a/css-typed-om-2/Overview.bs b/css-typed-om-2/Overview.bs index e395dab0..151f2933 100644 --- a/css-typed-om-2/Overview.bs +++ b/css-typed-om-2/Overview.bs @@ -2,7 +2,7 @@ Title: CSS Typed OM Level 2 Status: DREAM Group: houdini -ED: https://drafts.css-houdini.org/css-typed-om-1/ +ED: https://drafts.css-houdini.org/css-typed-om-2/ Shortname: css-typed-om Level: 2 Abstract: diff --git a/css-typed-om/Overview.bs b/css-typed-om/Overview.bs index 9787351b..5c846d3e 100644 --- a/css-typed-om/Overview.bs +++ b/css-typed-om/Overview.bs @@ -1,9 +1,11 @@Title: CSS Typed OM Level 1 Status: ED +Prepare for TR: no Group: houdini ED: https://drafts.css-houdini.org/css-typed-om-1/ TR: https://www.w3.org/TR/css-typed-om-1/ +Previous Version: https://www.w3.org/TR/2024/WD-css-typed-om-1-20240321/ Previous Version: https://www.w3.org/TR/2018/WD-css-typed-om-1-20180410/ Previous Version: https://www.w3.org/TR/2017/WD-css-typed-om-1-20170801/ Previous Version: https://www.w3.org/TR/2016/WD-css-typed-om-1-20160607/ @@ -43,6 +45,9 @@ Markup Shorthands: markdown yes urlPrefix: http://www.ecma-international.org/ecma-262/6.0/#sec-; type: dfn; spec: ecma-262 text: RangeError; url: native-error-types-used-in-this-standard-rangeerror++ spec:vc-data-model-2.0 +spec:css-sizing; type:property; @@ -57,9 +62,55 @@ spec:cssom-1; text: CSS declaration block text: declarations; for: CSSStyleDeclaration spec:css-align-3; type:property; text:column-gap +spec:css-borders-4; + type:property; + text:border-block; + text:border-block-color; + text:border-block-end; + text:border-block-end-color; + text:border-block-end-style; + text:border-block-end-width; + text:border-block-start; + text:border-block-start-color; + text:border-block-start-style; + text:border-block-start-width; + text:border-block-style; + text:border-block-width; + text:border-bottom; + text:border-bottom-color; + text:border-bottom-style; + text:border-bottom-width; + text:border-color; + text:border-inline; + text:border-inline-color; + text:border-inline-end; + text:border-inline-end-color; + text:border-inline-end-style; + text:border-inline-end-style; + text:border-inline-end-width; + text:border-inline-start; + text:border-inline-start-color; + text:border-inline-start-style; + text:border-inline-start-width; + text:border-inline-style; + text:border-inline-width; + text:border-left; + text:border-left-color; + text:border-left-style; + text:border-left-width; + text:border-radius; + text:border-right; + text:border-right-color; + text:border-right-style; + text:border-right-width; + text:border-top; + text:border-top-color; + text:border-top-style; + text:border-top-width; spec:css-color-4; type:property; text:color; type:value; text:currentcolor; + type:function; text:color() spec:css-overflow-3; type: property; text: text-overflow; spec:css-position-3; @@ -99,6 +150,10 @@ spec:css-transforms-1; type:property; text:transform; text:transform-origin; +spec:css-typed-om-1; + type:dfn; for:CSSNumericValue; + text:type + text: types spec:css-ui-4; type: property; text: pointer-events; spec:css-values-4; @@ -1737,12 +1792,20 @@ The base types are and "percent". The ordering of a [=type=]’s entries always matches this [=base type=] ordering. The percent hint -is either null or a [=base type=] other than "percent". +is either null or a [=base type=]. Note: As new unit types are added to CSS, they'll be added to this list of [=base types=], and to the CSS [=math functions=]. +Note: A [=percent hint=] can be "percent", +indicating the percentage is used as itself +(or, equivalently, evaluated against a plain number), +but this is not produced by the Typed OM methods; +it only occurs when the type machinery +is used directly by CSS, +where a value's context is actually known. +To create a type from a string |unit|, follow the appropriate branch of the following: @@ -1843,13 +1906,17 @@ and to the CSS [=math functions=].- To apply the percent hint |hint| to a |type|, + To apply the percent hint |hint| + to a |type| without a [=percent hint=], perform the following steps: - 1. If |type| doesn't [=map/contain=] |hint|, set |type|[|hint|] to 0. - 2. If |type| [=map/contains=] "percent", add |type|["percent"] to |type|[|hint|], + 1. Set |type|’s [=percent hint=] to |hint|. + 2. If |type| doesn't [=map/contain=] |hint|, set |type|[|hint|] to 0. + 3. If |hint| is anything other than "percent", + and |type| [=map/contains=] "percent", + add |type|["percent"] to |type|[|hint|], then set |type|["percent"] to 0. - 4. Set |type|’s [=percent hint=] to |hint|. + 4. Return |type|.@@ -1890,38 +1957,63 @@ and to the CSS [=math functions=]. 1. Let |result| be a new [=type=] with an initially empty [=ordered map=] - and an initially null [=percent hint=] + and a [=percent hint=] matching that of |type|. 1. [=map/For each=] |unit| → |exponent| of |type|, set |result|[|unit|] to (-1 * |exponent|). 3. Return |result|.-A [=type=] is said to match a CSS production in some circumstances: - -* A [=type=] matches <> - if its only non-zero [=map/entry=] is «[ "length" → 1 ]» - and its [=percent hint=] is null. - Similarly for < >, <