Skip to content

[cssom][css-conditional][css-images] Switch CSS to use IDL namespace #437

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions css-conditional/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -997,9 +997,9 @@ The <code>CSS</code> interface, and the <code title=''>supports()</code> functio
The {{CSS}} interface holds useful CSS-related functions that do not belong elsewhere.

<pre class='idl'>
partial interface CSS {
static boolean supports(DOMString property, DOMString value);
static boolean supports(DOMString conditionText);
partial namespace CSS {
boolean supports(DOMString property, DOMString value);
boolean supports(DOMString conditionText);
};
</pre>

Expand Down
18 changes: 10 additions & 8 deletions css-images-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -401,11 +401,13 @@ Using Out-Of-Document Sources: the <code>ElementSources</code> interface</h4>
The <a idl>elementSources</a> Map object provides this.

<pre class='idl'>
partial interface CSS {
[SameObject] readonly attribute Map elementSources;
partial namespace CSS {
// [SameObject] readonly attribute Map elementSources;
};
</pre>

Issue(428): IDL namespaces don't support attributes yet.

Any entries in the <a idl>elementSources</a> map with a string key
and a value that is an object providing a <a>paint source</a>
are made available to the ''element()'' function.
Expand Down Expand Up @@ -573,7 +575,7 @@ Gradients</h2>
<h3 id='conic-gradients'>
Conic Gradients: the ''conic-gradient()'' notation</h3>



A conic gradient starts by specifying the center of a circle,
similar to radial gradients,
Expand Down Expand Up @@ -729,7 +731,7 @@ Conic Gradient Examples</h4>
</div>

<div class=example>
A conic gradient used to draw a simple pie chart.
A conic gradient used to draw a simple pie chart.
The ''0deg'' color stop positions will be fixed up to be equal to the position of the color stop before them.
This will produce infinitesimal (invisible) transitions between the color stops with different colors,
effectively producing solid color segments.
Expand Down Expand Up @@ -768,7 +770,7 @@ Repeating Gradients: the ''repeating-linear-gradient()'', ''repeating-radial-gra
Basic repeating conic gradient:

<pre>background: repeating-conic-gradient(gold, #f06 20deg);</pre>

<img src="images/repeating-conic1.png" alt="">
</div>

Expand All @@ -780,13 +782,13 @@ Repeating Gradients: the ''repeating-linear-gradient()'', ''repeating-radial-gra
hsla(0,0%,100%,.2) 0deg 15deg,
hsla(0,0%,100%,0) 0deg 30deg
) #0ac;</pre>

<img src="images/repeating-conic2.png" alt="">
</div>

<div class=example>
Here repeating color stops with abrupt transitions are used to create a checkerboard:

<pre>
background: repeating-conic-gradient(black 0deg 25%, white 0deg 50%);
background-size: 60px 60px;
Expand Down Expand Up @@ -845,7 +847,7 @@ Gradient Color-Stops</h3>
T: ,
N: <color-stop>
</pre>

<p class='issue'>
Are lengths useful in <<angular-color-stop>>, for a given gradient circle?

Expand Down
10 changes: 5 additions & 5 deletions cssom/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2629,15 +2629,15 @@ Utility APIs {#utility-apis}
The <code>CSS.escape()</code> Method {#the-css.escape()-method}
------------------------------------------------------

The <code>CSS</code> interface holds useful CSS-related functions that do not belong elsewhere.
The <code>CSS</code> namespace holds useful CSS-related functions that do not belong elsewhere.

<pre class=idl>
interface CSS {
static DOMString escape(DOMString ident);
namespace CSS {
DOMString escape(DOMString ident);
};
</pre>

The <dfn method for=CSS>escape(<var>ident</var>)</dfn> method must return the result of invoking <a>serialize an identifier</a> of
The <dfn method for=CSS>escape(<var>ident</var>)</dfn> operation must return the result of invoking <a>serialize an identifier</a> of
<var>ident</var>.

<div class=example>
Expand All @@ -2651,7 +2651,7 @@ The <dfn method for=CSS>escape(<var>ident</var>)</dfn> method must return the re
<pre>var element = document.querySelector('a[href="#' + CSS.escape(fragment) + '"]');</pre>
</div>

Specifications that define static functions on the {{CSS}} interface and want to
Specifications that define operations on the {{CSS}} namespace and want to
store some state should store the state on the <a spec=html>current global
object</a>'s <a spec=html>associated <code>Document</code></a>.
<!-- https://github.com/w3c/csswg-drafts/issues/180 -->
Expand Down