Skip to content

Commit 927a970

Browse files
committed
[css-typed-om] Add first CSSOM serialization. 1 down, ~480 to go.
1 parent 59786fd commit 927a970

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

css-typed-om/Overview.bs

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2688,7 +2688,7 @@ The way that a {{CSSStyleValue}} serializes is dependent on how the value was co
26882688
: otherwise, if the value was constructed using an IDL constructor
26892689
:: the serialization is specified in the sections below.
26902690
: otherwise, if the value was extracted from the CSSOM
2691-
:: the serialization matches the CSSOM serialization of the corresponding value.
2691+
:: the serialization is specified in [[#cssom-serialization]] below.
26922692

26932693
<div class='example'>
26942694

@@ -2801,6 +2801,36 @@ of serializations of the contained {{CSSTransformComponent}} objects.
28012801
{{CSSFontFaceValue}} objects are serialized to the value of their contained
28022802
{{CSSFontFaceValue/fontFamilyName}}.
28032803

2804+
Serialization from CSSOM Values {#cssom-serialization}
2805+
------------------------------------------------------
2806+
2807+
{{CSSStyleValue}} objects produced by the user agent from values in the CSSOM,
2808+
rather than directly constructed by the author,
2809+
are serialized according to the following rules,
2810+
depending on the property they came from:
2811+
2812+
: 'border-image'
2813+
::
2814+
1. Let |values| initially be the empty [=list=].
2815+
2. If 'border-image-source' is not ''border-image-source/none'',
2816+
serialize 'border-image-source' and append it to |values|.
2817+
3. If 'border-image-slice' does not specify ''100%'' for all sides and omits the ''border-image-slice/fill'' keyword,
2818+
serialize 'border-image-slice' and append it to |values|.
2819+
4. If 'border-image-width' does not specify ''1'' for all sides,
2820+
append "/ " (U+002F FORWARD SLASH followed by U+0020 SPACE)
2821+
to the result of serializing 'border-image-width' and append it to |values|.
2822+
5. If 'border-image-outset' does not specify ''0'' for all sides,
2823+
append "/ " (U+002F FORWARD SLASH followed by U+0020 SPACE)
2824+
to the result of serializing 'border-image-outset' and append it to |values|.
2825+
6. If 'border-image-repeat' is not ''border-image-repeat/stretch'' in both axises,
2826+
serialize 'border-image-repeat' and append it to |values|.
2827+
7. If |values| is [=list/empty=],
2828+
serialize the keyword <css>none</css> and append it to |values|.
2829+
8. Return the result of concatenating all the items in |values|,
2830+
separated by " " (U+0020 SPACE).
2831+
2832+
2833+
28042834
Security Considerations {#security-considerations}
28052835
==================================================
28062836

0 commit comments

Comments
 (0)