|
6 | 6 | <title>
|
7 | 7 | Box Sizing / Layout / Docs / TACHYONS
|
8 | 8 | </title>
|
9 |
| - <meta name="author" content="@mrmrs"> |
| 9 | + <meta name="author" content="@mr3rs"> |
10 | 10 | <meta name="description" content="CSS">
|
11 | 11 | <meta name="viewport" content="width=device-width, initial-scale=1">
|
12 | 12 | <link rel="stylesheet" href="/css/tachyons.css">
|
13 | 13 | </head>
|
14 | 14 | <body class="w-100 sans-serif">
|
15 |
| - <header class="bg-dark-gray white pbl"> |
16 |
| - <div class="bb b--mid-gray phm phl-ns pvl"> |
17 |
| - <h1 class="f4 ttu mtn heavy tracked"><a class="white link dim" href="/">Tachyons</a></h1> |
18 |
| - <h2 class="f4 mvn semibold dib prxs"><a class="lightest-blue link dim" href="/docs/">Docs</a></h2> |
19 |
| - <span class="thin white-40">/</span> |
20 |
| - <h3 class="f4 mvn semibold dib prxs"><a class="lightest-blue link dim" href="/docs/#layout">Layout</a></h3> |
21 |
| - <span class="thin white-40">/</span> |
22 |
| - <h4 class="f4 mvn semibold dib">Box Sizing</h4> |
23 |
| - <div class="mtl"> |
24 |
| - <dl class="white-60 prm light dib mrm"> |
25 |
| - <dt class="db">Version</dt> |
26 |
| - <dd class="f2 f1-ns b db pln mln"><%= moduleVersion %></dd> |
27 |
| - </dl> |
28 |
| - <dl class="white-60 light dib mrm"> |
29 |
| - <dt class="db">Filesize</dt> |
30 |
| - <dd class="f2 f1-ns b db pln mln"><%= moduleSize %></dd> |
31 |
| - </dl> |
32 |
| - <div class="cf"> |
33 |
| - <dl class="white-60 dib mrm mtn"> |
34 |
| - <dt class="db">Declarations </dt> |
35 |
| - <dd class="db pln mln f2 f1-ns b"><%= moduleObj.declarations.total %></span></dd> |
| 15 | + |
| 16 | + <%= siteHeader %> |
| 17 | + <main class=""> |
| 18 | + <article class="bg-near-white bt b--black-10 ph3 pt3 ph5-ns"> |
| 19 | + <h4 class="f4 mv0 fw6 dib mr4"><%= name %></h4> |
| 20 | + <span class="f4 b dib pl0 ml0 mr4">v<%= moduleVersion %></span> |
| 21 | + <span class="f4 b dib pl0 ml0 mr4"><%= moduleSize %></span> |
| 22 | + <div> |
| 23 | + <dl class="dib mr4 mt0"> |
| 24 | + <dt class="f6 db">Declarations </dt> |
| 25 | + <dd class="db pl0 ml0 f4 f2-ns b"><%= moduleObj.declarations.total %></span></dd> |
36 | 26 | </dl>
|
37 |
| - <dl class="white-60 dib mrm"> |
38 |
| - <dt class="db prs">Selectors </dt> |
39 |
| - <dd class="db pln mln f2 f1-ns b"><%= moduleObj.selectors.total %></dd> |
| 27 | + <dl class="dib mr4"> |
| 28 | + <dt class="f6 db pr2">Selectors </dt> |
| 29 | + <dd class="db pl0 ml0 f4 f2-ns b"><%= moduleObj.selectors.total %></dd> |
40 | 30 | </dl>
|
41 |
| - <dl class="white-60 dib mrm"> |
42 |
| - <dt class="db prs">Max. Specificity Score </dt> |
43 |
| - <dd class="db pln mln f2 f1-ns b"><%= moduleObj.selectors.specificity.max %></dd> |
| 31 | + <dl class="dib mr4"> |
| 32 | + <dt class="f6 db pr2">Max. Specificity Score </dt> |
| 33 | + <dd class="db pl0 ml0 f4 f2-ns b"><%= moduleObj.selectors.specificity.max %></dd> |
44 | 34 | </dl>
|
45 |
| - <dl class="white-60 dib mrm"> |
46 |
| - <dt class="db prs">Size of Avg. Rule </dt> |
47 |
| - <dd class="db pln mln f2 f1-ns b"><%= moduleObj.rules.size.average %></dd> |
| 35 | + <dl class="dib mr4"> |
| 36 | + <dt class="f6 db pr2">Size of Avg. Rule </dt> |
| 37 | + <dd class="db pl0 ml0 f4 f2-ns b"><%= moduleObj.rules.size.average %></dd> |
48 | 38 | </dl>
|
49 |
| - </div> |
50 | 39 | </div>
|
51 |
| - </div> |
52 |
| - <div class="phm phl-ns pvm"> |
53 |
| - <p class="measure f3 lh-copy"> |
54 |
| - The box model has been known to trip up a few people. This module should make things a bit easier. |
55 |
| - </p> |
56 |
| - <p class="measure f4 lh-copy"> |
57 |
| - While many people make fun of Microsoft's 'Internet Explorer' browser - the one thing that most css authors |
58 |
| - agree on is that it's the most favorable box model. Fortunately the box-sizing property is well supported |
59 |
| - now so we can fix the atrocity that is the box model that chrome, firefox, safari, and others have implemented in modern browsers. |
60 |
| - </p> |
61 |
| - <p class="measure f4 lh-copy"> |
62 |
| - While the * { box-sizing: border-box; } hack has become quite popular - not all elements (think form inputs) |
63 |
| - benefit from this box model. This module only applies the border-box model to certain elements as listed below. |
64 |
| - There is also a .border-box class you can apply to elements as needed. |
65 |
| - </p> |
66 |
| - <p class="measure f4 lh-copy"> |
67 |
| - The benefit of border-box as opposed to content-box (which is the default per the css spec) is that when you declare a width, that is the width of the element, regardless of how much border or padding you add to the element. |
68 |
| - </p> |
69 |
| - </div> |
70 |
| - </header> |
71 |
| - <main class=""> |
72 |
| -<div class="phm phl-ns ptl pbxl"> |
| 40 | + </article> |
| 41 | +<div class="ph3 ph5-ns pt4 pb5"> |
73 | 42 | <h2 class="f3 bold">Examples</h2>
|
74 |
| - <h3 class="f5 book ptl caps">Default Content Box</h3> |
75 |
| - <div class="phm mw5 ba bw4 phxl pvm bg-lightest-red" style="box-sizing: content-box;"> |
| 43 | + <h3 class="f5 book pt4 caps">Default Content Box</h3> |
| 44 | + <div class="ph3 mw5 ba bw4 phxl pvm bg-lightest-red" style="box-sizing: content-box;"> |
76 | 45 | This element has a thick border, a max-width class of mw5, and extra large horizontal padding and medium vertical padding.
|
77 | 46 | </div>
|
78 |
| - <h3 class="f5 book ptl caps">Border Box</h3> |
79 |
| - <div class="phm mw5 ba bw4 phxl pvm bg-lightest-red"> |
| 47 | + <h3 class="f5 book pt4 caps">Border Box</h3> |
| 48 | + <div class="ph3 mw5 ba bw4 phxl pvm bg-lightest-red"> |
80 | 49 | This element has a thick border, a max-width class of mw5, and extra large horizontal padding and medium vertical padding.
|
81 | 50 | </div>
|
82 |
| - <h3 class="f5 book ptl caps">Border Box with no padding or border</h3> |
83 |
| - <div class="phm mw5 bg-lightest-red"> |
| 51 | + <h3 class="f5 book pt4 caps">Border Box with no padding or border</h3> |
| 52 | + <div class="ph3 mw5 bg-lightest-red"> |
84 | 53 | This element has no border, a max-width class of mw5 and no padding. Notice which example it has the same width as.
|
85 | 54 | </div>
|
86 |
| - <div class="mtxl cf"> |
87 |
| - <div class="dib mrl"> |
88 |
| - <h1 class="f4 ttu tracked semibold">Previous</h1> |
89 |
| - <a href="/docs/typography/white-space/" class="link semibold blue dim">White Space</a> |
| 55 | + <div class="mt5 cf"> |
| 56 | + <div class="dib mr4"> |
| 57 | + <h1 class="f4 ttu tracked fw6">Previous</h1> |
| 58 | + <a href="/docs/typography/white-space/" class="link fw6 blue dim">White Space</a> |
90 | 59 | </div>
|
91 | 60 | <div class="dib">
|
92 |
| - <h1 class="f4 ttu tracked semibold">Next</h1> |
93 |
| - <a href="/docs/layout/spacing/" class="link semibold blue dim">Spacing</a> |
| 61 | + <h1 class="f4 ttu tracked fw6">Next</h1> |
| 62 | + <a href="/docs/layout/spacing/" class="link fw6 blue dim">Spacing</a> |
94 | 63 | </div>
|
95 | 64 | </div>
|
96 |
| - <div class="mtxl"> |
97 |
| - <h1 class="f4 ttu tracked semibold">Reference</h1> |
98 |
| - <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing" class="link semibold blue dim">MDN - Box Sizing</a> |
| 65 | + <div class="mt5"> |
| 66 | + <h1 class="f4 ttu tracked fw6">Reference</h1> |
| 67 | + <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing" class="link fw6 blue dim">MDN - Box Sizing</a> |
99 | 68 | </div>
|
100 | 69 | </div>
|
101 |
| - <section class="bg-dark-gray white ptl pbxl"> |
102 |
| -<header class="phm phl-ns ptl"> |
| 70 | + <section class="bg-near-white black-70 pt4 pb5"> |
| 71 | +<header class="ph3 ph5-ns pt4"> |
103 | 72 | <kbd class="yellow">src/_box-sizing.css</kbd>
|
104 | 73 | </header>
|
105 |
| -<pre class="phm phl-ns"> |
106 |
| -<code class="small"> |
| 74 | +<pre class="ph3 ph5-ns"> |
| 75 | +<code class="code" style="font-size: .75rem;"> |
107 | 76 | <%= srcCSS %>
|
108 | 77 | </code>
|
109 | 78 | </pre>
|
110 | 79 | </section>
|
111 | 80 | <%= navDocs %>
|
112 | 81 | </main>
|
113 |
| - <%= siteFooter %> |
114 |
| - |
115 |
| - <script> |
116 |
| - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
117 |
| - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
118 |
| - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
119 |
| - })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
120 |
| - |
121 |
| -ga('create', 'UA-55773803-1', 'auto'); |
122 |
| -ga('send', 'pageview'); |
123 |
| - |
124 |
| - </script> |
| 82 | + <%= siteFooter %> |
| 83 | + <%= googleAnalytics %> |
125 | 84 | </body>
|
126 | 85 | </html>
|
0 commit comments