Skip to content

Commit d25a38c

Browse files
committed
ok lets try some more bikeshed syntax for property descriptor disambiguation
1 parent e36a910 commit d25a38c

1 file changed

Lines changed: 33 additions & 29 deletions

File tree

css-fonts-4/Overview.bs

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ the font family and other font properties that apply to a given element.
5757
other.
5858

5959
<h3 id="font-family-prop">
60-
Font family: the 'font-family' property</h3>
60+
Font family: the 'font-family!!property' property</h3>
6161

6262
<pre class="propdef">
6363
Name: font-family
@@ -324,7 +324,7 @@ This font family is intended for use with mathematical expressions.
324324

325325
This font family is used for fang song typefaces in Chinese.
326326

327-
<h3 id="font-weight-prop">Font weight: the 'font-weight' property</h3>
327+
<h3 id="font-weight-prop">Font weight: the 'font-weight!!property' property</h3>
328328

329329
<pre class="propdef">
330330
Name: font-weight
@@ -338,7 +338,7 @@ Media: visual
338338
Animatable: As <<number>>
339339
</pre>
340340

341-
The 'font-weight' property specifies the weight of glyphs in the font, their degree of blackness or stroke thickness.
341+
The 'font-weight!!property' property specifies the weight of glyphs in the font, their degree of blackness or stroke thickness.
342342

343343
This property accepts values of the following:
344344

@@ -428,7 +428,7 @@ by using the 'font-synthesis' property.
428428

429429
Specified values of ''bolder'' and ''lighter'' indicate weights
430430
relative to the weight of the parent element. The computed weight is
431-
calculated based on the inherited 'font-weight' value using the chart
431+
calculated based on the inherited 'font-weight!!property' value using the chart
432432
below.
433433

434434
<table id="bolderlighter" class="data" summary="Bolder/lighter mappings">
@@ -933,7 +933,7 @@ Shorthand font property: the 'font' property</h3>
933933

934934
<pre class="propdef">
935935
Name: font
936-
Value: [ [ <<'font-style'>> || <<font-variant-css21>> || <<'font-weight'>> || <<font-stretch-css3>> ]? <<'font-size'>> [ / <<'line-height'>> ]? <<'font-family!!property'>> ] | caption | icon | menu | message-box | small-caption | status-bar
936+
Value: [ [ <<'font-style'>> || <<font-variant-css21>> || <<'font-weight'>> || <<font-stretch-css3>> ]? <<'font-size'>> [ / <<'line-height'>> ]? <<'font-family'>> ] | caption | icon | menu | message-box | small-caption | status-bar
937937
Initial: see individual properties
938938
Applies to: all elements
939939
Inherited: yes
@@ -946,11 +946,13 @@ Animatable: see individual properties
946946
The 'font' property is,
947947
except as described below,
948948
a shorthand property for setting
949-
'font-style', 'font-variant', 'font-weight', 'font-stretch', 'font-size', 'line-height', 'font-family!!property'
949+
'font-style!!property', 'font-variant!!property', 'font-weight!!property', 'font-stretch!!property',
950+
'font-size!!property', 'line-height', 'font-family!!property'
950951
at the same place in the stylesheet.
951-
Values for the 'font-variant' property can also be included
952+
Values for the 'font-variant!!property' property can also be included
952953
but only those supported in CSS 2.1;
953-
none of the 'font-variant' values added in this specification can be used in the 'font' shorthand:
954+
none of the 'font-variant!!property' values added in this specification can be used in the
955+
'font!!property' shorthand:
954956

955957
<pre class="prod"><dfn id="font-variant-css21-values">&lt;font-variant-css21&gt;</dfn> = [normal | small-caps]</pre>
956958

@@ -994,7 +996,7 @@ shorthand property; instead, use the individual property.
994996
name ''"new century schoolbook"'', which contains spaces, is enclosed in
995997
quotes. The fourth rule sets the 'font-weight!!property' to ''bold'',
996998
the 'font-style!!property' to ''italic'', and implicitly sets
997-
'font-varian!!propertyt' to ''font-variant/normal''.
999+
'font-variant!!property' to ''font-variant/normal''.
9981000

9991001
The fifth rule sets the 'font-variant!!property' (''small-caps''), the 'font-size!!property' (120% of the
10001002
parent's font size), the 'line-height!!property' (120% of the font size) and the
@@ -1233,7 +1235,7 @@ which dictate the rendering behavior of any elements using the font face:
12331235
Otherwise, the font face is used normally.
12341236

12351237
To <dfn export>render with a fallback font face</dfn> for a given element,
1236-
the user agent must find the first font face specified in the element's 'font-family' list
1238+
the user agent must find the first font face specified in the element's 'font-family!!property' list
12371239
which is already loaded,
12381240
and use that for rendering text.
12391241
Doing this must not trigger loads of any of the fallback fonts.
@@ -1603,7 +1605,8 @@ families that cannot otherwise be referenced.
16031605
</div>
16041606

16051607
<h3 id="font-prop-desc">
1606-
Font property descriptors: the 'font-style', 'font-weight', and 'font-stretch' descriptors</h3>
1608+
Font property descriptors: the 'font-style!!descriptor', 'font-weight!!descriptor', and
1609+
'font-stretch!!descriptor' descriptors</h3>
16071610

16081611
<pre class='descdef'>
16091612
Name: font-style
@@ -1988,7 +1991,7 @@ defined in <code>@font-face</code> rules without considering whether
19881991
those fonts are in fact used within a page are considered
19891992
non-conformant. In cases where a font might be downloaded in character
19901993
fallback cases, user agents may download a font if it's contained within
1991-
the computed value of <span title="font-family!!property">'font-family'</span>
1994+
the computed value of 'font-family!!property'
19921995
for a given text run.
19931996

19941997
<pre>
@@ -2352,11 +2355,11 @@ if all font style properties were set to their initial value.
23522355
of font faces in that family and then narrows the set to a single
23532356
face using other font properties in the order given below. Fonts might be
23542357
present in this group which can support a range of
2355-
'font-stretch', 'font-style', or 'font-weight' properties. In
2358+
'font-stretch!!property', 'font-style!!property', or 'font-weight!!property' properties. In
23562359
this case, the algorithm proceeds as if each supported combination of
23572360
values are a unique font in the set. If such a font is ultimately
23582361
selected by this algorithm, particular values for
2359-
'font-stretch', 'font-style', and 'font-weight' must be applied
2362+
'font-stretch!!property', 'font-style!!property', and 'font-weight!!property' must be applied
23602363
before any layout or rendering occurs. The application of these values
23612364
must be applied in the <a href="#apply-font-matching-variations">Apply
23622365
font matching variations</a> step detailed in
@@ -2506,7 +2509,7 @@ if all font style properties were set to their initial value.
25062509
value of the 'font-synthesis' property.
25072510

25082511

2509-
3. 'font-weight' is matched next. If a font does not have any concept of varying strengths of weights, its weight is mapped according list in the <a href="#font-weight-numeric-values">property definition</a>. If bolder/lighter relative weights are used, the effective weight is calculated based on the inherited weight value, as described in the definition of the 'font-weight' property. If the matching set after performing the steps above includes faces with weight values containing the font-weight desired value, faces with weight values which do not include the desired font-weight value are removed from the matching set. If there is no face which contains the desired value, a weight value is chosen using the rules below:
2512+
3. 'font-weight!!property' is matched next. If a font does not have any concept of varying strengths of weights, its weight is mapped according list in the <a href="#font-weight-numeric-values">property definition</a>. If bolder/lighter relative weights are used, the effective weight is calculated based on the inherited weight value, as described in the definition of the 'font-weight!!property' property. If the matching set after performing the steps above includes faces with weight values containing the font-weight desired value, faces with weight values which do not include the desired font-weight value are removed from the matching set. If there is no face which contains the desired value, a weight value is chosen using the rules below:
25102513

25112514
* If the desired weight is inclusively between 400 and 500, weights greater than or equal to the target weight are checked in ascending order until 500 is hit and checked, followed by weights less than the target weight in descending order, followed by weights greater than 500, until a match is found.
25122515
* If the desired weight is less than 400, weights less than or equal to the
@@ -2844,8 +2847,8 @@ text run.
28442847

28452848
1. Font features enabled by default, including features required for a given script.
28462849

2847-
2. <span id="apply-font-matching-variations">Font variations as enabled by the 'font-weight',
2848-
'font-stretch', and 'font-style' properties.</span>
2850+
2. <span id="apply-font-matching-variations">Font variations as enabled by the 'font-weight!!property',
2851+
'font-stretch!!property', and 'font-style!!property' properties.</span>
28492852

28502853
The application of the value enabled by
28512854
'font-style' is affected by font selection, because this property might select an
@@ -2855,38 +2858,39 @@ text run.
28552858
not be set together.
28562859

28572860
If the selected font is defined in an ''@font-face'' rule, then the values applied at this step
2858-
should be clamped to the value of the 'font-weight', 'font-stretch', and 'font-style'
2861+
should be clamped to the value of the 'font-weight!!descriptor', 'font-stretch!!descriptor',
2862+
and 'font-style!!descriptor'
28592863
descriptors in that ''@font-face'' rule.
28602864

28612865
Then, the values applied in this step should be clamped (possibly again) to the values
28622866
that are supported by the font.
28632867

28642868
3. If the font is defined via an ''@font-face'' rule, the font variations
2865-
implied by the 'font-variation-settings' descriptor in the ''@font-face'' rule.
2869+
implied by the 'font-variation-settings!!descriptor' descriptor in the ''@font-face'' rule.
28662870

28672871
4. If the font is defined via an ''@font-face'' rule, the font features
28682872
implied by the 'font-feature-settings' descriptor in the ''@font-face'' rule.
28692873

28702874
5. If the font is defined via an ''@font-face'' rule, the font features
2871-
implied by the 'font-feature-settings' descriptor in the ''@font-face'' rule.
2875+
implied by the 'font-feature-settings!!descriptor' descriptor in the ''@font-face'' rule.
28722876

2873-
6. Font variations implied by the value of the 'font-optical-sizing' property.
2877+
6. Font variations implied by the value of the 'font-optical-sizing!!property' property.
28742878

2875-
7. Font features implied by the value of the 'font-variant' property,
2876-
the related 'font-variant' subproperties and any other CSS property
2877-
that uses OpenType features (e.g. the 'font-kerning' property).
2879+
7. Font features implied by the value of the 'font-variant!!property' property,
2880+
the related 'font-variant!!property' subproperties and any other CSS property
2881+
that uses OpenType features (e.g. the 'font-kerning!!property' property).
28782882

28792883
<!-- other CSS props override 'font-variant' but not 'font-feature-settings' -->
28802884
<!-- http://lists.w3.org/Archives/Public/www-style/2013Aug/0110.html -->
28812885

2882-
8. Feature settings determined by properties other than 'font-variant' or
2883-
'font-feature-settings'. For example, setting a
2886+
8. Feature settings determined by properties other than 'font-variant!!property' or
2887+
'font-feature-settings!!property'. For example, setting a
28842888
non-default value for the 'letter-spacing' property disables common ligatures.
28852889

2886-
9. Font variations implied by the value of the 'font-variation-settings' property.
2890+
9. Font variations implied by the value of the 'font-variation-settings!!property' property.
28872891
These values should be clamped to the values that are supported by the font.
28882892

2889-
10. Font features implied by the value of 'font-feature-settings' property.
2893+
10. Font features implied by the value of 'font-feature-settings!!property' property.
28902894

28912895
This ordering allows authors to set up a general set of defaults
28922896
for fonts within their ''@font-face'' rules, then override them with
@@ -3321,7 +3325,7 @@ or implement the ability to disable color fonts,
33213325
the behavior of individual descriptors as defined in this specification should not be altered.
33223326

33233327
<h3 id="font-family-2-desc">
3324-
Font family: the 'font-family' descriptor</h3>
3328+
Font family: the 'font-family!!descriptor' descriptor</h3>
33253329

33263330
<pre class='descdef'>
33273331
Name: font-family

0 commit comments

Comments
 (0)