Skip to content

Commit

Permalink
[css-fonts] @font-palette-values rule has no object model
Browse files Browse the repository at this point in the history
  • Loading branch information
Litherum committed Mar 6, 2018
1 parent 4639177 commit 3009d53
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions css-fonts-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3763,6 +3763,22 @@ of <i title="feature_value_block">feature value block</i>. The <code>get</code>
method always returns a sequence of values, even if the sequence only contains
a single value.

<h3 id="om-fontpalettevalues">
The <code id="cssfontpalettevaluesrule2">CSSFontPaletteValuesRule</code> interface</h3>
<pre class='idl'>partial interface CSSRule {

const unsigned short FONT_PALETTE_VALUES_RULE = 15;
}

interface CSSFontPaletteValuesRule : CSSRule {
maplike&lt;unsigned long, (CSSOMString or CSSOMRGBColor)>;

This comment has been minimized.

Copy link
@tabatkins

tabatkins Mar 6, 2018

Member

This should definitely not be using the old DOM 2 Style classes. Make it just take a CSSOMString, with a manually-defined set() method that checks that it [=CSS/parses=] as a CSS <color> value, and throws a TypeError if not.

This comment has been minimized.

Copy link
@litherum

litherum Mar 7, 2018

Contributor

Can I open this as an issue and assign it to you? :D

This comment has been minimized.

Copy link
@litherum

litherum Mar 7, 2018

Contributor

Oh, you already reopened this issue, I see. I'll assign it to you.

attribute CSSOMString fontFamily;
attribute CSSOMString basePalette;
}</pre>

If the value of the 'setlike' functions is a CSSOMString, it is parsed as a solid color (e.g. using the <code>rgb()</code> syntax). If it refers to anything other than a solid color, the call is ignored or returns <code>undefined</code>.

The <code>fontFamily</code> and <code>basePalette</code> interfaces are parsed according to the appropriate CSS property syntax.

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

0 comments on commit 3009d53

Please sign in to comment.