Skip to content

Commit 3f22de9

Browse files
committed
[css-values] Clarify short-circuiting behavior in an example closer to the prose that causes it (pulled from shorthand example).
1 parent 14ddb61 commit 3f22de9

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

css-values/Overview.bs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,6 +1689,12 @@ Toggling Between Values: ''toggle()''</h3>
16891689
or there was no match,
16901690
the computed value of ''toggle()'' is the computed value that the first argument represents.
16911691

1692+
1693+
Note: This means that repeating values in a ''toggle()'' short-circuits the list.
1694+
For example ''toggle(1em, 2em, 1em, 4em)'' will be equivalent to ''toggle(1em, 2em)''.
1695+
1696+
<!-- Issue: Should this short-circuiting affect the computed value? -->
1697+
16921698
Note: That ''toggle()'' explicitly looks at the computed value of the parent,
16931699
so it works even on non-inherited properties.
16941700
This is similar to the ''inherit'' keyword,
@@ -1736,6 +1742,8 @@ Toggling Between Values: ''toggle()''</h3>
17361742
margin-bottom: toggle(1px, 3px);
17371743
margin-left: toggle(2px, 4px, 5px);
17381744
</pre>
1745+
1746+
which may not be what was intended.
17391747
</div>
17401748

17411749
<!--

0 commit comments

Comments
 (0)