Skip to content

Commit b7bd3f2

Browse files
committed
[css-conditional] Make the 'box-shadow' example make more sense, since I was thinking more of 'text-shadow' when I wrote it.
Fixes http://lists.w3.org/Archives/Public/www-style/2013Mar/0037.html
1 parent 3e37141 commit b7bd3f2

2 files changed

Lines changed: 41 additions & 27 deletions

File tree

css-conditional/Overview.html

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -806,20 +806,26 @@ <h2 id=at-supports><span class=secno>6. </span>Feature queries: the
806806
class=property>box-shadow</code>’ property, including checking for
807807
support for vendor-prefixed versions of it. When the support is present,
808808
it specifies both ‘<code class=property>box-shadow</code>’ (with the
809-
prefixed versions) and ‘<code class=property>color</code>’ in a way
810-
what would cause the text to become invisible were ‘<code
809+
prefixed versions) and ‘<code class=property>border</code>’ in a way
810+
what would cause the box to become invisible were ‘<code
811811
class=property>box-shadow</code>’ not supported.
812812

813-
<pre>@supports ( box-shadow: 2px 2px 2px black ) or
814-
( -moz-box-shadow: 2px 2px 2px black ) or
815-
( -webkit-box-shadow: 2px 2px 2px black ) or
816-
( -o-box-shadow: 2px 2px 2px black ) {
813+
<pre>.outline {
814+
border: 1px solid black;
815+
padding: 1px;
816+
}
817+
@supports ( box-shadow: 0 0 2px black inset ) or
818+
( -moz-box-shadow: 0 0 2px black inset ) or
819+
( -webkit-box-shadow: 0 0 2px black inset ) or
820+
( -o-box-shadow: 0 0 2px black inset ) {
817821
.outline {
818-
color: white;
819-
-moz-box-shadow: 2px 2px 2px black;
820-
-webkit-box-shadow: 2px 2px 2px black;
821-
-o-box-shadow: 2px 2px 2px black;
822-
box-shadow: 2px 2px 2px black; /* unprefixed last */
822+
-moz-box-shadow: 0 0 2px black inset;
823+
-webkit-box-shadow: 0 0 2px black inset;
824+
-o-box-shadow: 0 0 2px black inset;
825+
box-shadow: 0 0 2px black inset; /* unprefixed last */
826+
/* override the rule above the @supports rule */
827+
border: none;
828+
padding: 2px;
823829
}
824830
}</pre>
825831
</div>
@@ -1552,12 +1558,13 @@ <h2 class=no-num id=acknowledgments>Acknowledgments</h2>
15521558

15531559
<p> Thanks to the ideas and feedback from Tab Atkins, Arthur Barstow, Ben
15541560
Callahan, <span lang=tr>Tantek Çelik</span>, Alex Danilo, Elika Etemad,
1555-
Pascal Germroth, <span lang=de>Björn Höhrmann</span>, Paul Irish, <span
1556-
lang=nl>Anne van Kesteren</span>, Vitor Menezes, Alex Mogilevsky, Chris
1557-
Moschini, James Nurthen, Simon Pieters, <span lang=fr>Florian
1558-
Rivoal</span>, <span lang=fr>Simon Sapin</span>, Nicholas Shanks, Ben
1559-
Ward, Zack Weinberg, Estelle Weyl, Boris Zbarsky, and all the rest of the
1560-
<a href="http://lists.w3.org/Archives/Public/www-style/">www-style</a>
1561+
Pascal Germroth, <span lang=de>Björn Höhrmann</span>, Paul Irish, Brad
1562+
Kemper, <span lang=nl>Anne van Kesteren</span>, Vitor Menezes, Alex
1563+
Mogilevsky, Chris Moschini, James Nurthen, Simon Pieters, <span
1564+
lang=fr>Florian Rivoal</span>, <span lang=fr>Simon Sapin</span>, Nicholas
1565+
Shanks, Ben Ward, Zack Weinberg, Estelle Weyl, Boris Zbarsky, and all the
1566+
rest of the <a
1567+
href="http://lists.w3.org/Archives/Public/www-style/">www-style</a>
15611568
community.
15621569

15631570
<h2 class=no-num id=references>References</h2>

css-conditional/Overview.src.html

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -550,18 +550,24 @@ <h2 id="at-supports">Feature queries: the '@supports' rule</h2>
550550
<p>The following example checks for support for the 'box-shadow'
551551
property, including checking for support for vendor-prefixed versions of
552552
it. When the support is present, it specifies both 'box-shadow' (with
553-
the prefixed versions) and 'color' in a way what would cause the text to
553+
the prefixed versions) and 'border' in a way what would cause the box to
554554
become invisible were 'box-shadow' not supported.</p>
555-
<pre>@supports ( box-shadow: 2px 2px 2px black ) or
556-
( -moz-box-shadow: 2px 2px 2px black ) or
557-
( -webkit-box-shadow: 2px 2px 2px black ) or
558-
( -o-box-shadow: 2px 2px 2px black ) {
555+
<pre>.outline {
556+
border: 1px solid black;
557+
padding: 1px;
558+
}
559+
@supports ( box-shadow: 0 0 2px black inset ) or
560+
( -moz-box-shadow: 0 0 2px black inset ) or
561+
( -webkit-box-shadow: 0 0 2px black inset ) or
562+
( -o-box-shadow: 0 0 2px black inset ) {
559563
.outline {
560-
color: white;
561-
-moz-box-shadow: 2px 2px 2px black;
562-
-webkit-box-shadow: 2px 2px 2px black;
563-
-o-box-shadow: 2px 2px 2px black;
564-
box-shadow: 2px 2px 2px black; /* unprefixed last */
564+
-moz-box-shadow: 0 0 2px black inset;
565+
-webkit-box-shadow: 0 0 2px black inset;
566+
-o-box-shadow: 0 0 2px black inset;
567+
box-shadow: 0 0 2px black inset; /* unprefixed last */
568+
/* override the rule above the @supports rule */
569+
border: none;
570+
padding: 2px;
565571
}
566572
}</pre></div>
567573

@@ -1257,6 +1263,7 @@ <h2 class=no-num id="acknowledgments">Acknowledgments</h2>
12571263
Pascal Germroth,
12581264
<span lang="de">Björn Höhrmann</span>,
12591265
Paul Irish,
1266+
Brad Kemper,
12601267
<span lang="nl">Anne van Kesteren</span>,
12611268
Vitor Menezes,
12621269
Alex Mogilevsky,

0 commit comments

Comments
 (0)