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

[css-fonts-4] HTML validation from Bikeshed #5955

Merged
merged 2 commits into from Feb 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 15 additions & 15 deletions css-fonts-4/Overview.bs
Expand Up @@ -582,7 +582,7 @@ Relative Weights</h4>
The computed weight is calculated based on the inherited 'font-weight!!property' value
using the chart below.

<table id="bolderlighter" class="data" summary="Bolder/lighter mappings">
<table id="bolderlighter" class="data">
<thead>
<tr>
<th>Inherited value (<var>w</var>)
Expand Down Expand Up @@ -3272,15 +3272,15 @@ if all font style properties were set to their initial value.
are checked in this stage.
5. If no match is found, oblique values less than or equal to 0deg are checked in descending order until a match is found.
6. If no match is found, italic values less than or equal to 0 are checked in descending order until a match is found.
</ol>

<div class="example">
Similar to the <a href="#ascendingstretch">previous example</a>, here is the conceptual distance graph for an element styled with "font-style: oblique 13deg":
<div class="example">
Similar to the <a href="#ascendingstretch">previous example</a>, here is the conceptual distance graph for an element styled with "font-style: oblique 13deg":

<img src="images/styledistance3.svg" alt="distance graph">
<img src="images/styledistance3.svg" alt="distance graph">

As you can see, because font D contains the minimum oblique value across the entire family, font D would be selected by this algorithm. However, if font D were somehow eliminated from the family, font C would then contain the lowest distance in the family, so it would be selected. If C were eliminated, E would be selected. If E were eliminated, font B would not be chosen immediately; instead, italic values would be consulted and an italic value might be chosen. However, if no italic value is chosen, font B would then be selected, followed by font A.
</div>
</ol>
As you can see, because font D contains the minimum oblique value across the entire family, font D would be selected by this algorithm. However, if font D were somehow eliminated from the family, font C would then contain the lowest distance in the family, so it would be selected. If C were eliminated, E would be selected. If E were eliminated, font B would not be chosen immediately; instead, italic values would be consulted and an italic value might be chosen. However, if no italic value is chosen, font B would then be selected, followed by font A.
</div>

If the value of 'font-style!!property' is ''oblique'' and the requested angle is less than 0deg and greater than -20deg, follow the steps <a href="#lesser-oblique-steps">above</a>, except with the negated values and opposite directions. If the value of 'font-style!!property' is ''oblique'' and the requested angle is less than or equal to -20deg, follow the steps <a href="#greater-oblique-steps">above</a>, except with the negated values and opposite directions.

Expand Down Expand Up @@ -3373,14 +3373,14 @@ if all font style properties were set to their initial value.
computations, e.g., by ''em'' values in other properties, are based on
the 'font-size' value that
is used, not the one that is specified.

Note that more than one font might be remaining in the matching set after performing
the above steps. If so, the user agent must choose a single font from
the matching set and continue these steps with it. The choice of which
font to choose can differ between multiple user agents and multiple operating
system platforms; however, it must not differ between two elements in the same document.
</ol>

Note that more than one font might be remaining in the matching set after performing
the above steps. If so, the user agent must choose a single font from
the matching set and continue these steps with it. The choice of which
font to choose can differ between multiple user agents and multiple operating
system platforms; however, it must not differ between two elements in the same document.

5. If the matched face is defined via ''@font-face''
rules, user agents must use the procedure below to select a single
font:
Expand Down Expand Up @@ -6584,12 +6584,12 @@ None.

<h3 id="sp213">How does this specification distinguish between behavior in first-party and third-party contexts?</h3>

<a href="#font-fetching-requirements">For font loads, user agents must use the
<a href="#font-fetching-requirements">For font loads</a>, user agents must use the
potentially CORS-enabled fetch method defined by the [[!HTML]] specification
svgeesus marked this conversation as resolved.
Show resolved Hide resolved
for URL’s defined within @font-face rules.
When fetching, user agents must use "Anonymous" mode,
set the referrer source to the stylesheet’s URL
and set the origin to the URL of the containing document</a>.
and set the origin to the URL of the containing document.

Thus, fonts will typically not be loaded cross-origin
unless authors specifically takes steps to permit cross-origin loads.
Expand Down