Skip to content

Commit fca734b

Browse files
committed
[css-properties-values-api] Added <length-percentage>.
w3c#70
1 parent adcc4ee commit fca734b

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

css-properties-values-api/Overview.bs

+16-2
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ The following syntax strings are supported:
163163
:: <<number>> values
164164
: "&lt;percentage>"
165165
:: Any valid <<percentage>> value
166+
: "&lt;length-percentage>"
167+
:: Any valid <<length>> or <<percentage>> value, any valid <<calc()>>
168+
expression combining <<length>> and <<percentage>> components.
166169
: "&lt;custom-ident>"
167170
:: Any valid <<custom-ident>> value
168171
: Any string, the contents of which matches the <<ident>> production
@@ -175,6 +178,12 @@ The following syntax strings are supported:
175178
: "*"
176179
:: Any valid token stream
177180

181+
Note: [[css3-values]] maintains a distinction between properties that accept
182+
only a length, and properties that accept both a length and a percentage,
183+
however the distinction doesn't currently cleanly line up with the productions.
184+
Accordingly, this specification introduces the length-percentage production
185+
for the purpose of cleanly specifying this distinction.
186+
178187
Regardless of the syntax specified, all custom properties will accept
179188
<a>CSS-wide keywords</a> as well as ''revert'', and process these values
180189
appropriately.
@@ -188,8 +197,13 @@ For example, the following are all valid syntax strings.
188197
: <code>"&lt;length>"</code>
189198
:: accepts length values
190199
: <code>"&lt;length> | &lt;percentage>"</code>
191-
:: accepts lengths, or percentages, or length calc expressions, but not
192-
calc expressions containing a combination of length and percent values.
200+
:: accepts lengths, percentages, percentage calc expressions, and length calc
201+
expressions, but not calc expressions containing a combination of length
202+
and percentage values.
203+
: <code>"&lt;length-percentage>"</code>
204+
:: accepts all values that <code>"&lt;length> | &lt;percentage>"</code> would
205+
accept, as well as calc expresssions containing a combination of both length
206+
and percentage values.
193207
: <code>"big | bigger | BIGGER"</code>
194208
:: accepts the string "big", or the string "bigger", or the string "BIGGER".
195209
: <code>"&lt;'background-color'>"</code>

0 commit comments

Comments
 (0)