Re: [css-fonts] is font variant a list?

Why would you need a list unless you need to express the same component
multiple times? The '||' operator allows you to express multiple components
(but no more than one instance) in any order with LWSP separator, e.g.,

font-variant: discretionary-ligatures character-variant(...) ruby
small-caps ...

>From CSS2.1:
1.4.2.1 Value

Component values may be arranged into property values as follows:

   - A double bar (||) separates two or more options: one or more of them
   must occur, in any order.


On Fri, Oct 24, 2014 at 1:03 PM, David Warring <david.warring@gmail.com>
wrote:

> A quibble about this example versus the property definition from the
> css-fonts draft:
>
> p {
>   font-variant: discretionary-ligatures,
>                 character-variant(leo-B, leo-M, leo-N, leo-T, leo-U);
> }
>
> The property definition for font-variant
> <http://dev.w3.org/csswg/css-fonts/#descdef-font-variant> doesn't seem to
> allow lists.
>
> Name:font-variantValue:normal
> <http://dev.w3.org/csswg/css-fonts/#font-variant-normal-value> | none
> <http://dev.w3.org/csswg/css-fonts/#font-variant-none-value> | [
> <common-lig-values> <http://dev.w3.org/csswg/css-fonts/#common-lig-values>
>  || <discretionary-lig-values>
> <http://dev.w3.org/csswg/css-fonts/#discretionary-lig-values> ||
> <historical-lig-values>
> <http://dev.w3..org/csswg/css-fonts/#historical-lig-values> ||
> <contextual-alt-values>
> <http://dev.w3.org/csswg/css-fonts/#contextual-alt-values> ||
> stylistic(<feature-value-name>)
> <http://dev.w3.org/csswg/css-fonts/#stylistic> || historical-forms
> <http://dev.w3.org/csswg/css-fonts/#historical-forms> || styleset(<feature-value-name>
> #) <http://dev.w3.org/csswg/css-fonts/#styleset> || character-variant(<feature-value-name>
> #) <http://dev.w3.org/csswg/css-fonts/#character-variant> ||
> swash(<feature-value-name>) <http://dev.w3.org/csswg/css-fonts/#swash> ||
> ornaments(<feature-value-name>)
> <http://dev.w3.org/csswg/css-fonts/#ornaments> ||
> annotation(<feature-value-name>)
> <http://dev.w3.org/csswg/css-fonts/#annotation> || [ small-caps
> <http://dev.w3.org/csswg/css-fonts/#small-caps> | all-small-caps
> <http://dev.w3.org/csswg/css-fonts/#all-small-caps> |petite-caps
> <http://dev.w3.org/csswg/css-fonts/#petite-caps> | all-petite-caps
> <http://dev.w3.org/csswg/css-fonts/#all-petite-caps> | unicase
> <http://dev.w3.org/csswg/css-fonts/#unicase> | titling-caps
> <http://dev.w3.org/csswg/css-fonts/#titling-caps> ] ||
> <numeric-figure-values>
> <http://dev.w3.org/csswg/css-fonts/#numeric-figure-values> ||
> <numeric-spacing-values>
> <http://dev.w3.org/csswg/css-fonts/#numeric-spacing-values> ||
> <numeric-fraction-values>
> <http://dev.w3.org/csswg/css-fonts/#numeric-fraction-values> || ordinal
> <http://dev.w3.org/csswg/css-fonts/#ordinal> || slashed-zero
> <http://dev.w3.org/csswg/css-fonts/#slashed-zero> ||
> <east-asian-variant-values>
> <http://dev.w3.org/csswg/css-fonts/#east-asian-variant-values> ||
> <east-asian-width-values>
> <http://dev.w3.org/csswg/css-fonts/#east-asian-width-values> || ruby
> <http://dev.w3.org/csswg/css-fonts/#ruby> ]Should the definition allow
> lists? I.E. 'Value: normal | none | [ <common-lig-values || ... || ruby ]#
>
> - David
>

Received on Saturday, 25 October 2014 15:53:54 UTC