Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[css-fonts] Move CSSFontFaceRule attributes to Level 4
  • Loading branch information
SimonSapin committed Apr 19, 2017
commit e18ba0541e49cc7c5901682ce6fe59ed518af61b
25 changes: 25 additions & 0 deletions css-fonts-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2686,6 +2686,31 @@ at least as dark as its predecessor. Only values greater than 0 and less than 10
</pre>
</div>

<h2 id="object-model">Object Model</h2>

The contents of <code>@font-face</code> rules can be accessed via
the following extensions to the CSS Object Model.

<h3 id="om-fontface">The <code>CSSFontFaceRule</code> interface</h3>

The <dfn>CSSFontFaceRule</dfn> interface represents a <<@font-face>> rule.

<pre class="idl">
interface CSSFontFaceRule : CSSRule {
attribute DOMString family;
attribute DOMString src;
attribute DOMString style;
attribute DOMString weight;
attribute DOMString stretch;
attribute DOMString unicodeRange;
attribute DOMString variant;
attribute DOMString featureSettings;
};</pre>

The DOM Level 2 Style specification [[DOM-LEVEL-2-STYLE]] defined
a different variant of this rule.
This definition supercedes that one.

<h2 id="platform-props-to-css" class="no-num">Appendix A: Mapping platform font properties to CSS properties</h2>

Issue: Import from level 3
Expand Down
22 changes: 10 additions & 12 deletions css-fonts/Fonts.html
Original file line number Diff line number Diff line change
Expand Up @@ -6005,20 +6005,18 @@ <h3 id=om-fontface><span class=secno>8.1. </span>The <a

<pre class=idl>
interface CSSFontFaceRule : CSSRule {
attribute DOMString family;
attribute DOMString src;
attribute DOMString style;
attribute DOMString weight;
attribute DOMString stretch;
attribute DOMString unicodeRange;
attribute DOMString variant;
attribute DOMString featureSettings;
// Intentionally left blank in this specification.
}</pre>

<p>The DOM Level 2 Style specification <a href="#ref-DOM-LEVEL-2-STYLE"
rel=biblioentry>[DOM-LEVEL-2-STYLE]<!--{{DOM-LEVEL-2-STYLE}}--></a>
defined a different variant of this rule. This definition supercedes that
one.
<p class=note>The CSS Working Group would like <a
href="#cssfontfacerule"><code>CSSFontFaceRule</code></a> to have one
attribute for each <a
href="#at-font-face-rule"><code>@font-face</code></a> descriptor, <a
href="../css-fonts-4/#om-fontface">as specified in CSS Fonts Level 4</a>.
As of this writing however, no implementation implements these attributes
and instead implement the <code>style</code> attribute defined in the DOM
Level 2 Style specification <a href="#ref-DOM-LEVEL-2-STYLE"
rel=biblioentry>[DOM-LEVEL-2-STYLE]<!--{{DOM-LEVEL-2-STYLE}}--></a>.

<h3 id=om-fontfeaturevalues><span class=secno>8.2. </span>The <a
href="#cssfontfeaturevaluesrule"><code>CSSFontFeatureValuesRule</code></a>
Expand Down
16 changes: 7 additions & 9 deletions css-fonts/Fonts.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -4469,17 +4469,15 @@ <h3 id="om-fontface">The <code>CSSFontFaceRule</code> interface</h3>

<pre class="idl">
interface CSSFontFaceRule : CSSRule {
attribute DOMString family;
attribute DOMString src;
attribute DOMString style;
attribute DOMString weight;
attribute DOMString stretch;
attribute DOMString unicodeRange;
attribute DOMString variant;
attribute DOMString featureSettings;
// Intentionally left blank in this specification.
}</pre>

<p>The DOM Level 2 Style specification [[DOM-LEVEL-2-STYLE]] defined a different variant of this rule. This definition supercedes that one.</p>
<p class="note">The CSS Working Group would like <code>CSSFontFaceRule</code> to have
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really want to describe the aspirations of the WG? Shouldn't we just state the reason there are no attributes in the object?

one attribute for each <code>@font-face</code> descriptor,
<a href="../css-fonts-4/#om-fontface">as specified in CSS Fonts Level 4</a>.
As of this writing however, no implementation implements these attributes
and instead implement the <code>style</code> attribute defined in
the DOM Level 2 Style specification [[DOM-LEVEL-2-STYLE]].

<h3 id="om-fontfeaturevalues">The <code>CSSFontFeatureValuesRule</code> interface</h3>

Expand Down