-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
shadow.html
96 lines (93 loc) · 2.96 KB
/
shadow.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html>
<html lang="en">
<head>
{{> head }}
<style>
.shadow-demo {
background-color: var(--md-sys-color-surface);
width: 100px;
height: 100px;
margin: 20px auto;
/*
@media only screen and (max-width: $small-screen) {
width: 150px;
height: 150px;
}
*/
}
</style>
</head>
<body>
{{> navbar }}
<main>
{{> intro}}
<div class="container">
<div class="row">
<div class="col s12 m8 offset-m1 xl7 offset-xl1">
<div id="shadow" class="section scrollspy">
<p class="caption">In material design, everything should have a certain z-depth that determines how far raised or close to the page the element is.</p>
<p>
You can easily apply this shadow effect by adding a
<code class="language-html">class="z-depth-2"</code> to an HTML tag. Alternatively you can extend any of these shadows with Sass using
<code class="language-scss">@extend .z-depth-2</code>. A <code class="language-scss">z-depth-0</code> can be used to remove shadows from elements that have z-depths
by default.
</p>
<div class="row">
<div class="col s12 m4 l3">
<p class="z-depth-0 p-3">0</p>
</div>
<div class="col s12 m4 l3">
<p class="z-depth-1 p-3">1</p>
</div>
<div class="col s12 m4 l3">
<p class="z-depth-2 p-3">2</p>
</div>
<div class="col s12 m4 l3">
<p class="z-depth-3 p-3">3</p>
</div>
<div class="col s12 m4 l3">
<p class="z-depth-4 p-3">4</p>
</div>
<div class="col s12 m4 l3">
<p class="z-depth-5 p-3">5</p>
</div>
</div>
<pre><code class="language-html"><xmp><div class="row">
<div class="col s12 m4 l3">
<p class="z-depth-0 p-3">0</p>
</div>
<div class="col s12 m4 l3">
<p class="z-depth-1 p-3">1</p>
</div>
<div class="col s12 m4 l3">
<p class="z-depth-2 p-3">2</p>
</div>
<div class="col s12 m4 l3">
<p class="z-depth-3 p-3">3</p>
</div>
<div class="col s12 m4 l3">
<p class="z-depth-4 p-3">4</p>
</div>
<div class="col s12 m4 l3">
<p class="z-depth-5 p-3">5</p>
</div>
</div>
</xmp></code></pre>
</div>
</div>
<div class="col hide-on-small-only m3 xl3">
<div class="toc-wrapper">
<div style="height: 1px">
<ul class="section table-of-contents">
<li><a href="#shadow">Shadows</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</main>
{{> footer }}
<script type="module" src="/src/main.ts"></script>
</body>
</html>