Skip to content

Commit 8fa0710

Browse files
committed
Add Brad Kemper's examples http://bradclicks.com/cssplay/shadows/shadows.html that he created for inclusion in the spec
1 parent f6ca149 commit 8fa0710

11 files changed

Lines changed: 1027 additions & 851 deletions

css3-background/Overview.html

Lines changed: 928 additions & 836 deletions
Large diffs are not rendered by default.

css3-background/Overview.src.html

Lines changed: 95 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<style type="text/css">
99
.rhs { white-space: pre-wrap; }
1010
code { font-size: inherit; }
11+
#box-shadow-samples td { background: white; color: black; }
1112
</style>
1213
<link rel="stylesheet" type="text/css"
1314
href="http://www.w3.org/StyleSheets/TR/W3C-WD.css">
@@ -2464,20 +2465,98 @@ <h3 id="the-box-shadow">The 'box-shadow' property</h3>
24642465
(below the borders and border-image, if any).
24652466

24662467
<div class="example">
2467-
<p>Here is an example of single words with a drop shadow. Assume the
2468-
words were enclosed in <span class="html">&lt;span&gt;</span> and the
2469-
style rule was
2470-
2471-
<pre>span {border: thin solid; box-shadow: 0.2em 0.2em #CCC}</pre>
2472-
2473-
<p>The result might look like this:
2474-
2475-
<div class=figure>
2476-
<p><img alt="He will be put on b_r_e_a_d_| and w_a_t_e_r_|"
2477-
src="box-shadow.png">
2478-
</div>
2479-
</div>
2480-
2468+
<p>Below are some examples of an orange box with a blue border being
2469+
being given a drop shadow.</p>
2470+
2471+
<table class="data" id="box-shadow-samples">
2472+
<tr>
2473+
<th scope="rowgroup">
2474+
<pre><code><!--
2475+
-->border:5px solid blue;
2476+
<!-- -->background-color:orange;
2477+
<!-- -->width: 144px;
2478+
<!-- -->height: 144px;<!--
2479+
--></code></pre>
2480+
<th>
2481+
<pre><code>border-radius: 20px;</code></pre>
2482+
<th>
2483+
<pre><code>border-radius: 0;</code></pre>
2484+
<tr>
2485+
<th>
2486+
<pre><code><!--
2487+
-->box-shadow:
2488+
<!-- --> rgba(0,0,0,0.4)
2489+
<!-- --> 10px 10px;<!--
2490+
--></code></pre>
2491+
<td>
2492+
<img src="shadow-outer-round.png" width="175" height="175"
2493+
alt="A round-cornered box with a light gray shadow the same shape
2494+
as the border box offset 10px to the right and 10px down
2495+
from directly underneath the box.">
2496+
<td>
2497+
<img src="shadow-outer-square.png" width="175" height="175"
2498+
alt="A square-cornered box with a light gray shadow the same shape
2499+
as the border box offset 10px to the right and 10px down
2500+
from directly underneath the box.">
2501+
<tr>
2502+
<th>
2503+
<pre><code><!--
2504+
-->box-shadow:
2505+
<!-- --> rgba(0,0,0,0.4)
2506+
<!-- --> 10px 10px
2507+
<!-- --> inset<!--
2508+
--></code></pre>
2509+
<td>
2510+
<img src="shadow-inner-round.png" width="175" height="175"
2511+
alt="A round-cornered box with a light gray shadow the inverse shape
2512+
of the padding box filling 10px in from the top and left edges
2513+
(just inside the border).">
2514+
<td>
2515+
<img src="shadow-inner-square.png" width="175" height="175"
2516+
alt="A square-cornered box with a light gray shadow the inverse shape
2517+
of the padding box filling 10px in from the top and left edges
2518+
(just inside the border).">
2519+
<tr>
2520+
<th>
2521+
<pre><code><!--
2522+
-->box-shadow:
2523+
<!-- --> rgba(0,0,0,0.4)
2524+
<!-- --> 10px 10px
2525+
<!-- --> 10px /* spread */<!--
2526+
--></code></pre>
2527+
<td>
2528+
<img src="shadow-outer-spread-round.png" width="175" height="175"
2529+
alt="A round-cornered box with a light gray shadow the same shape
2530+
as the box but 20px taller and wider and offset so that the
2531+
top and left edges of the shadow are directly underneath the
2532+
top and left edges of the box.">
2533+
<td>
2534+
<img src="shadow-outer-spread-square.png" width="175" height="175"
2535+
alt="A square-cornered box with a light gray shadow the same shape
2536+
as the box but 20px taller and wider and offset so that the
2537+
top and left edges of the shadow are directly underneath the
2538+
top and left edges of the box.">
2539+
<tr>
2540+
<th>
2541+
<pre><code><!--
2542+
-->box-shadow:
2543+
<!-- --> rgba(0,0,0,0.4)
2544+
<!-- --> 10px 10px
2545+
<!-- --> 10px /* spread */
2546+
<!-- --> inset<!--
2547+
--></code></pre>
2548+
<td>
2549+
<img src="shadow-inner-spread-round.png" width="175" height="175"
2550+
alt="A round-cornered box with a light gray shadow the inverse shape
2551+
of the box but 20px narrower and shorter filling 20px in from
2552+
the top and left edges (just inside the border).">
2553+
<td>
2554+
<img src="shadow-inner-spread-square.png" width="175" height="175"
2555+
alt="A round-cornered box with a light gray shadow the inverse shape
2556+
of the box but 20px narrower and shorter filling 20px in from
2557+
the top and left edges (just inside the border).">
2558+
</tr>
2559+
</table>
24812560

24822561

24832562
<h2>Definitions</h2>
@@ -2684,7 +2763,8 @@ <h2>Acknowledgments</h2>
26842763
image(s) cannot be loaded.
26852764

26862765
<p>Finally, special thanks go to Brad Kemper for his feedback and
2687-
suggestions for many of the features in the draft.</p>
2766+
suggestions for many of the features in the draft, and for drawing
2767+
all the box-shadow examples.</p>
26882768

26892769
<!--
26902770
<p class=issue>Editor's Note: This list needs to be updated (or

css3-background/default.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,10 @@ table.features td {
452452
border: solid;
453453
}
454454

455+
.data img {
456+
vertical-align: middle;
457+
}
458+
455459
table.propdef {
456460
table-layout: auto;
457461
}
2.18 KB
Loading
2.35 KB
Loading
493 Bytes
Loading
493 Bytes
Loading
2.47 KB
Loading
2.78 KB
Loading
482 Bytes
Loading

0 commit comments

Comments
 (0)