Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cssom-1] Avoid validating declarations twice #9831

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions cssom-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2233,19 +2233,8 @@ the DOM a <a>CSS declaration block</a> is a
the <a for="CSSStyleDeclaration">owner node</a>'s <code>style</code> attribute.
</dl>

To <dfn export>parse a CSS declaration block</dfn> from a string <var>string</var>, follow these steps:

<ol>
<li>Let <var>declarations</var> be the returned declarations from invoking <a>parse a block's contents</a> with <var>string</var>.
<li>Let <var>parsed declarations</var> be a new empty list.
<li>For each item <var>declaration</var> in <var>declarations</var>, follow these substeps:
<ol>
<li>Let <var>parsed declaration</var> be the result of parsing <var>declaration</var> according to the appropriate CSS specifications, dropping parts that
are said to be ignored. If the whole declaration is dropped, let <var>parsed declaration</var> be null.
<li>If <var>parsed declaration</var> is not null, append it to <var>parsed declarations</var>.
</ol>
<li>Return <var>parsed declarations</var>.
</ol>
To <dfn export>parse a CSS declaration block</dfn> from a string <var>string</var>,
return the declarations from invoking <a>parse a block's contents</a> with <var>string</var>.

To <dfn export>serialize a CSS declaration</dfn> with property name <var>property</var>, value <var>value</var> and optionally an <i>important</i> flag set, follow
these steps:
Expand Down