Skip to content

Commit

Permalink
Fixes #39. Clarify -webkit-background-clip and root element.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Taylor committed Feb 15, 2016
1 parent 40d6f11 commit bd97d24
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
19 changes: 13 additions & 6 deletions compatibility.bs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ urlPrefix: https://encoding.spec.whatwg.org/
urlPrefix: https://drafts.csswg.org/css-cascade-3/
type: dfn
text: important; url: #important
urlPrefix: https://drafts.csswg.org/css-backgrounds-3/
type: dfn
text: the backgrounds of special elements;url: #special-backgrounds
</pre>

<pre class=link-defaults>
Expand Down Expand Up @@ -537,7 +540,7 @@ The following <code>-webkit-</code> <a>vendor prefixed</a> keywords must be supp
Name: -webkit-background-clip
Value: text
Initial: none
Applies to: all elements (Maybe? See <a href="https://github.com/whatwg/compat/issues/39">Issue #39</a>)
Applies to: all elements
Inherited: yes
Computed value: "text"
Percentages: N/A
Expand All @@ -547,6 +550,15 @@ Animatable: no

The <code>'-webkit-background-clip'</code> property causes the background image to clip to foreground text (including decorations and shadows). The shape of the foreground content (including alpha transparency in the content) is applied as a mask to clip background drawing for the box.

<div class="note">
Note that the root element has a different background painting area, and thus the '-webkit-background-clip' property has no effect when specified on it. See <a>the backgrounds of special elements</a>.
</div>

<dl>
<dt><dfn value for='-webkit-background-clip'>text</dfn>
<dd>Indicates that the background image should clip to the foreground text
</dl><br>

<div class="example">
Here's an example showing how to use <code>'-webkit-background-clip': text</code> together with
<code>-webkit-text-fill-color: transparent</code> to achieve text with a gradient color effect.
Expand All @@ -561,11 +573,6 @@ p {
Browsers that don't support <code>'-webkit-background-clip'</code> or <code>'-webkit-text-fill-color'</code> will use the <code>color</code> declaration as a fallback color.
</div>

<dl>
<dt><dfn value for='-webkit-background-clip'>text</dfn>
<dd>Indicates that the background image should clip to the foreground text
</dl>

<h4 id="the-webkit-text-fill-color">Foreground Color: the <code>
'-webkit-text-fill-color'</code> property</h4>

Expand Down
14 changes: 8 additions & 6 deletions compatibility.html
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ <h4 class="heading settled" data-level="3.4.5" id="the-webkit-background-clip-pr
<td>none
<tr>
<th>Applies to:
<td>all elements (Maybe? See <a href="https://github.com/whatwg/compat/issues/39">Issue #39</a>)
<td>all elements
<tr>
<th>Inherited:
<td>yes
Expand All @@ -465,6 +465,12 @@ <h4 class="heading settled" data-level="3.4.5" id="the-webkit-background-clip-pr
<td>no
</table>
<p>The <code><a class="property" data-link-type="propdesc" href="#propdef--webkit-background-clip">-webkit-background-clip</a></code> property causes the background image to clip to foreground text (including decorations and shadows). The shape of the foreground content (including alpha transparency in the content) is applied as a mask to clip background drawing for the box.</p>
<div class="note" role="note"> Note that the root element has a different background painting area, and thus the <a class="property" data-link-type="propdesc" href="#propdef--webkit-background-clip">-webkit-background-clip</a> property has no effect when specified on it. See <a data-link-type="dfn" href="https://drafts.csswg.org/css-backgrounds-3/#special-backgrounds">the backgrounds of special elements</a>. </div>
<dl>
<dt><dfn class="css" data-dfn-for="-webkit-background-clip" data-dfn-type="value" data-export="" id="valdef--webkit-background-clip-text">text<a class="self-link" href="#valdef--webkit-background-clip-text"></a></dfn>
<dd>Indicates that the background image should clip to the foreground text
</dl>
<br>
<div class="example" id="example-f30f2a17">
<a class="self-link" href="#example-f30f2a17"></a> Here’s an example showing how to use <code><a class="property" data-link-type="propdesc" href="#propdef--webkit-background-clip">-webkit-background-clip</a>: text</code> together with <code>-webkit-text-fill-color: transparent</code> to achieve text with a gradient color effect.
<pre class="lang-css highlight"><span class="nt">p </span><span class="p">{</span>
Expand All @@ -475,10 +481,6 @@ <h4 class="heading settled" data-level="3.4.5" id="the-webkit-background-clip-pr
<span class="p">}</span></pre>
<p>Browsers that don’t support <code><a class="property" data-link-type="propdesc" href="#propdef--webkit-background-clip">-webkit-background-clip</a></code> or <code><a class="property" data-link-type="propdesc" href="#propdef--webkit-text-fill-color">-webkit-text-fill-color</a></code> will use the <code>color</code> declaration as a fallback color.</p>
</div>
<dl>
<dt><dfn class="css" data-dfn-for="-webkit-background-clip" data-dfn-type="value" data-export="" id="valdef--webkit-background-clip-text">text<a class="self-link" href="#valdef--webkit-background-clip-text"></a></dfn>
<dd>Indicates that the background image should clip to the foreground text
</dl>
<h4 class="heading settled" data-level="3.4.6" id="the-webkit-text-fill-color"><span class="secno">3.4.6. </span><span class="content">Foreground Color: the <code> <a class="property" data-link-type="propdesc" href="#propdef--webkit-text-fill-color">-webkit-text-fill-color</a></code> property</span><a class="self-link" href="#the-webkit-text-fill-color"></a></h4>
<table class="def propdef" data-link-for-hint="-webkit-text-fill-color">
<tbody>
Expand Down Expand Up @@ -888,7 +890,7 @@ <h2 class="no-num heading settled" id="property-index"><span class="content">Pro
<th scope="row"><a class="css" data-link-type="property" href="#propdef--webkit-background-clip">-webkit-background-clip</a>
<td>text
<td>none
<td>all elements (Maybe? See Issue #39)
<td>all elements
<td>yes
<td>N/A
<td>visual
Expand Down

0 comments on commit bd97d24

Please sign in to comment.