-
Notifications
You must be signed in to change notification settings - Fork 4
/
responsive.html
177 lines (174 loc) · 7.07 KB
/
responsive.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
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
---
layout: default
title: Responsive
subnav:
- Suffixes
- Breakpoints
---
<section>
<h2 id="Suffixes" class="m-b-1-xs">Responsive Suffixes</h2>
<p class="m-b-1-xs">Our grid classes, utility classes and typography are built in a way that give flexibility across breakpoints. To change things at different breakpoints, we have 5 suffixes to add to your classes: <code>-xs</code>, <code>-sm</code>, <code>-md</code>, <code>-lg</code>, and <code>-xl</code>.</p>
<p class="m-b-3-xs">To see this in action, resize your browser and pay attention to how this grid layout changes.</p>
<div class="col-container">
<div class="col col-100-xs col-50-md col-25-lg border-dark-xs">
<span class="block-xs hide-md hide-lg">.col-100-xs</span>
<span class="hide-xs block-md hide-lg">.col-50-md</span>
<span class="hide-xs block-lg">.col-25-lg</span>
</div>
<div class="col col-100-xs col-50-md col-25-lg border-dark-xs">
<span class="block-xs hide-md hide-lg">.col-100-xs</span>
<span class="hide-xs block-md hide-lg">.col-50-md</span>
<span class="hide-xs block-lg">.col-25-lg</span>
</div>
<div class="col col-100-xs col-50-md col-25-lg border-dark-xs">
<span class="block-xs hide-md hide-lg">.col-100-xs</span>
<span class="hide-xs block-md hide-lg">.col-50-md</span>
<span class="hide-xs block-lg">.col-25-lg</span>
</div>
<div class="col col-100-xs col-50-md col-25-lg border-dark-xs">
<span class="block-xs hide-md hide-lg">.col-100-xs</span>
<span class="hide-xs block-md hide-lg">.col-50-md</span>
<span class="hide-xs block-lg">.col-25-lg</span>
</div>
</div>
<div class="guide-code m-b-4-xs">
<pre><code class="language-html"><div class="col-container">
<div class="col col-100-xs col-50-md col-25-lg border-dark-xs">
<span class="block-xs hide-md hide-lg">.col-100-xs</span>
<span class="hide-xs block-md hide-lg">.col-50-md</span>
<span class="hide-xs block-lg">.col-25-lg</span>
</div>
<div class="col col-100-xs col-50-md col-25-lg border-dark-xs">
<span class="block-xs hide-md hide-lg">.col-100-xs</span>
<span class="hide-xs block-md hide-lg">.col-50-md</span>
<span class="hide-xs block-lg">.col-25-lg</span>
</div>
<div class="col col-100-xs col-50-md col-25-lg border-dark-xs">
<span class="block-xs hide-md hide-lg">.col-100-xs</span>
<span class="hide-xs block-md hide-lg">.col-50-md</span>
<span class="hide-xs block-lg">.col-25-lg</span>
</div>
<div class="col col-100-xs col-50-md col-25-lg border-dark-xs">
<span class="block-xs hide-md hide-lg">.col-100-xs</span>
<span class="hide-xs block-md hide-lg">.col-50-md</span>
<span class="hide-xs block-lg">.col-25-lg</span>
</div>
</div></code></pre>
</div>
<h2 id="Breakpoints" class="m-b-1-xs">Breakpoints</h2>
<p class="m-b-1-xs">Everything in Leap is built with a mobile first approach. This means that if you want the same style across all breakpoints you'd use the <code>-xs</code> suffix. Here's a rundown of which breakpoint applies to which suffix.</p>
<table class="table-border-rows w-full-xs m-b-4-xs" style="text-align: left">
<thead>
<th>Suffixes</th>
<th>Breakpoint</th>
</thead>
<tbody>
<tr>
<td><code>-xs</code></td>
<td><code>@media screen</code></td>
</tr>
<tr>
<td><code>-sm</code></td>
<td><code>@media (min-width: 480px)</code></td>
</tr>
<tr>
<td><code>-md</code></td>
<td><code>@media (min-width: 680px)</code></td>
</tr>
<tr>
<td><code>-lg</code></td>
<td><code>@media (min-width: 960px)</code></td>
</tr>
<tr>
<td><code>-xl</code></td>
<td><code>@media (min-width: 1140px)</code></td>
</tr>
</tbody>
</table>
<h2 class="m-b-1-xs">What can be suffixed?</h2>
<p class="m-b-1-xs">We apply suffixes to a lot of classes within Leap, but not so many that we end up creating a bunch of wasted code. We decided that this list of utilities, text and grid classes gave us the most flexibility without going overboard.</p>
<table class="table-border-rows w-full-xs" style="text-align: left">
<thead>
<th>Element</th>
<th>Class Names</th>
</thead>
<tbody>
<tr>
<td>Text Sizing</td>
<td><code>.text-[n]-xs</code></td>
</tr>
<tr>
<td>Text Alignment</td>
<td><code>.text-left-xs</code>, <code>.text-right-xs</code>, <code>.text-center-xs</code>, <code>.text-justify-xs</code></td>
</tr>
<tr>
<td>Display</td>
<td><code>.hide-xs</code>, <code>.block-xs</code>, <code>.inline-xs</code>, <code>.inline-block-xs</code></td>
</tr>
<tr>
<td>Floats</td>
<td><code>.float-l-xs</code>, <code>.float-r-xs</code>, <code>.float-none-xs</code></td>
</tr>
<tr>
<td>Overflow</td>
<td><code>.overflow-hidden-xs</code>, <code>.overflow-scroll-xs</code>, <code>.overflow-auto-xs</code>, <code>.overflow-visible-xs</code></td>
</tr>
<tr>
<td>Margin</td>
<td><code>.m-[n]-xs</code>, <code>.m-t-[n]-xs</code>, <code>.m-b-[n]-xs</code>, <code>.m-l-[n]-xs</code>, <code>.m-r-[n]-xs</code></td>
</tr>
<tr>
<td>Padding</td>
<td><code>.p-[n]-xs</code>, <code>.p-t-[n]-xs</code>, <code>.p-b-[n]-xs</code>, <code>.p-l-[n]-xs</code>, <code>.p-r-[n]-xs</code></td>
</tr>
<tr>
<td>Position</td>
<td><code>.relative-xs</code>, <code>.absolute-xs</code>, <code>.fixed-xs</code>, <code>.static-xs</code></td>
</tr>
<tr>
<td>Position Spacing</td>
<td><code>.pos-[n]-xs</code>, <code>.pos-t-[n]-xs</code>, <code>.pos-b-[n]-xs</code>, <code>.pos-l-[n]-xs</code>, <code>.pos-r-[n]-xs</code></td>
</tr>
<tr>
<td>Z-Index</td>
<td><code>.z-[n]-xs</code></td>
</tr>
<tr>
<td>Borders</td>
<td><code>.border-xs</code>, <code>.border-[shade]-xs</code>, <code>.border-[side]-xs</code>, <code>.border-[side]-[shade]-xs</code></td>
</tr>
<tr>
<td>Buttons</td>
<td><code>.button--[size]-xs</code></td>
</tr>
<tr>
<td>Grid</td>
<td><code>.col-[n]-xs</code></td>
</tr>
<tr>
<td>Grid Offsets</td>
<td><code>.col-offset-[n]-xs</code></td>
</tr>
<tr>
<td>Block Grid</td>
<td><code>.block-[n]-xs</code></td>
</tr>
<tr>
<td>Flex Box</td>
<td><code>.flex-xs</code></td>
</tr>
<tr>
<td>Width and Height</td>
<td><code>.w-full-xs</code>, <code>.w-fit-xs</code>, <code>.w-auto-xs</code>, <code>.h-full-xs</code></td>
</tr>
<tr>
<td>Veritcal Alignment</td>
<td><code>.align-top-xs</code>, <code>.align-middle-xs</code>, <code>.align-bottom-xs</code></td>
</tr>
<tr>
<td>Rotation</td>
<td><code>.rotate-[n]-xs</code></td>
</tr>
</tbody>
</table>
</section>