forked from jgthms/css-reference
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
182 lines (147 loc) · 9.06 KB
/
Copy pathindex.html
File metadata and controls
182 lines (147 loc) · 9.06 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
---
layout: single
property_name: font-size
---
<section id="font-size" class="property">
<header class="property-header">
<nav class="property-links">
<a class="property-links-direct" href="{{site.url}}/property/font-size/" data-property-name="font-size" data-tooltip="Single page for this property" target="_blank">Link</a>
<a class="property-share" data-tooltip="Share on Twitter or Facebook" data-property-name="font-size">Share</a>
<a target="_blank" href="https://developer.mozilla.org/en/docs/Web/CSS/font-size" data-tooltip="See on Mozilla Developer Network" rel="external">MDN</a>
</nav>
<h2 class="property-name">
<a href="{{site.url}}/#font-size"><span>#</span>font-size</a>
</h2>
<div class="property-description">
<p>Defines the size of the text.</p>
</div>
</header>
<style type="text/css">.font-size { line-height: 1.2; }</style>
<section class="example">
<header class="example-header">
<p class="example-name">
<code class="example-default" data-tooltip="This is the property's default value">default</code>
<code class="example-value" data-tooltip="Click to copy" data-clipboard-text="font-size: medium;">font-size: medium;</code>
</p>
<div class="example-description">
<p>The text will use the browser's default <strong>medium</strong> size.</p>
</div>
</header>
<aside class="example-preview">
<div class="example-browser"><i></i><i></i><i></i></div>
<div class="example-output">
<div class="example-output-div font-size " id="font-size-medium"><p>Hello world</p><p>The quick brown fox jumps over the lazy dog</p></div>
</div>
</aside>
<style type="text/css">#font-size-medium{ font-size:medium;}</style>
</section>
<section class="example">
<header class="example-header">
<p class="example-name">
<code class="example-value" data-tooltip="Click to copy" data-clipboard-text="font-size: 20px;">font-size: 20px;</code>
</p>
<div class="example-description">
<p>You can use <strong>pixel</strong> values.</p>
</div>
</header>
<aside class="example-preview">
<div class="example-browser"><i></i><i></i><i></i></div>
<div class="example-output">
<div class="example-output-div font-size " id="font-size-20px"><p>Hello world</p><p>The quick brown fox jumps over the lazy dog</p></div>
</div>
</aside>
<style type="text/css">#font-size-20px{ font-size:20px;}</style>
</section>
<section class="example">
<header class="example-header">
<p class="example-name">
<code class="example-value" data-tooltip="Click to copy" data-clipboard-text="font-size: 1.2em;">font-size: 1.2em;</code>
</p>
<div class="example-description">
<p>You can use <strong>em</strong> values.</p>
<p>The value is <strong>relative</strong> to the <strong>parent</strong>'s <code>font-size</code>.<br>As a result, the value will <strong>cascade</strong> if used on child elements.</p>
</div>
</header>
<aside class="example-preview">
<div class="example-browser"><i></i><i></i><i></i></div>
<div class="example-output">
<div class="example-output-div font-size " id="font-size-12em"><div class="parent">Parent container: <strong>18px</strong><div class="block block--alpha">Font-size: 1.2em = <strong>21.6px</strong><div class="block block--pink">Font-size: 1.2em = <strong>25.92px</strong><div class="block block--yellow">Font-size: 1.2em = <strong>31.104px</strong></div></div></div></div>
</div>
</aside>
<style type="text/css">#font-size-12em .parent { font-size: 18px; }#font-size-12em .block { font-size: 1.2em;margin-top: 0.25rem; }</style>
</section>
<section class="example">
<header class="example-header">
<p class="example-name">
<code class="example-value" data-tooltip="Click to copy" data-clipboard-text="font-size: 1.2rem;">font-size: 1.2rem;</code>
</p>
<div class="example-description">
<p>You can use <strong>rem</strong> values.</p>
<p>The value is <strong>relative</strong> to the <strong>root element</strong>'s <code>font-size</code>, which is the <code><html></code> element.<br>As a result, the value will <strong>not</strong> vary depending on the <em>depth</em> of the element in the HTML hierarchy, and will reamin context independent.</p>
</div>
</header>
<aside class="example-preview">
<div class="example-browser"><i></i><i></i><i></i></div>
<div class="example-output">
<div class="example-output-div font-size " id="font-size-12rem"><div class="parent"><code><html></code> root element: <strong>18px</strong><div class="block block--alpha">Font-size: 1.2rem = <strong>21.6px</strong><div class="block block--pink">Font-size: 1.2rem = <strong>21.6px</strong><div class="block block--yellow">Font-size: 1.2rem = <strong>21.6px</strong></div></div></div></div>
</div>
</aside>
<style type="text/css">#font-size-12rem .parent { font-size: 18px; }#font-size-12rem .block { font-size: 1.2rem;margin-top: 0.25rem; }</style>
</section>
<section class="example">
<header class="example-header">
<p class="example-name">
<code class="example-value" data-tooltip="Click to copy" data-clipboard-text="font-size: 90%;">font-size: 90%;</code>
</p>
<div class="example-description">
<p>You can use <strong>percentage</strong> values. They act like em values.</p>
<p>The value is <strong>relative</strong> to the <strong>parent</strong>'s <code>font-size</code>.<br>As a result, the value will <strong>cascade</strong> if used on child elements.</p>
</div>
</header>
<aside class="example-preview">
<div class="example-browser"><i></i><i></i><i></i></div>
<div class="example-output">
<div class="example-output-div font-size " id="font-size-90"><div class="parent">Parent container: <strong>18px</strong><div class="block block--alpha">Font-size: 90% = <strong>16.2</strong><div class="block block--pink">Font-size: 90% = <strong>14.58px</strong><div class="block block--yellow">Font-size: 90% = <strong>13.122px</strong></div></div></div></div>
</div>
</aside>
<style type="text/css">#font-size-90 .parent { font-size: 18px; }#font-size-90 .block { font-size: 90%;margin-top: 0.25rem; }</style>
</section>
<section class="example">
<header class="example-header">
<p class="example-name">
<code class="example-value" data-tooltip="Click to copy" data-clipboard-text="font-size: smaller;">font-size: smaller;</code>
</p>
<div class="example-description">
<p>You can use <strong>relative keywords</strong>. The value is relative to the <strong>parent</strong>.</p>
<p>The following are available:</p>
<ul><li><code>larger</code></li><li><code>smaller</code></li></ul>
</div>
</header>
<aside class="example-preview">
<div class="example-browser"><i></i><i></i><i></i></div>
<div class="example-output">
<div class="example-output-div font-size " id="font-size-smaller"><div class="parent">Parent container: <strong>18px</strong><div class="block block--alpha">Font-size: smaller<div class="block block--pink">Font-size: smaller<div class="block block--yellow">Font-size: smaller</div></div></div></div>
</div>
</aside>
<style type="text/css">#font-size-smaller .parent { font-size: 18px; }#font-size-smaller .block { font-size: smaller;margin-top: 0.25rem; }</style>
</section>
<section class="example">
<header class="example-header">
<p class="example-name">
<code class="example-value" data-tooltip="Click to copy" data-clipboard-text="font-size: x-large;">font-size: x-large;</code>
</p>
<div class="example-description">
<p>You can use <strong>absolute keywords</strong>. The value is relative to the <strong>root element</strong> <code><html></code>.</p>
<p>The following are available:</p>
<ul><li><code>xx-small</code></li><li><code>x-small</code></li><li><code>small</code></li><li><code>medium</code></li><li><code>large</code></li><li><code>x-large</code></li><li><code>xx-large</code></li></ul>
</div>
</header>
<aside class="example-preview">
<div class="example-browser"><i></i><i></i><i></i></div>
<div class="example-output">
<div class="example-output-div font-size " id="font-size-x-large"><div class="parent"><code><html></code> root element: <strong>18px</strong><div class="block block--alpha">Font-size: x-large<div class="block block--pink">Font-size: x-large<div class="block block--yellow">Font-size: x-large</div></div></div></div>
</div>
</aside>
<style type="text/css">#font-size-x-large .parent { font-size: 18px; }#font-size-x-large .block { font-size: x-large;margin-top: 0.25rem; }</style>
</section>
</section>