Welcome to mirror list, hosted at ThFree Co, Russian Federation.

responsive.pug « layout « src « docs - github.com/picturepan2/spectre.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6516b26d85dba696fc5c3409e054571a722d4678 (plain)
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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
extends ../_layout/_docs-layout.pug

block variables
  - var slug = 'responsive'
  - var parent = 'layout'
  - var title = 'Responsive - Layout - Spectre.css CSS Framework'
  - var description = 'Spectre.css is a lightweight, responsive and modern CSS framework for faster and extensible development. Spectre provides basic styles for typography and elements, flexbox based responsive layout system, pure CSS components and utilities with best practice coding and consistent design language.'

block docs-content
  +docs-heading('responsive', 'Responsive')
    include ../_layout/_ad-g.pug

    p Spectre provides a neat responsive layout grid system and responsive visibility utilities.

    .docs-demo.columns
      .column.col-10.col-lg-8.col-md-6.col-sm-4
        .bg-gray.docs-block
          | col-10 
          br
          |  col-lg-8 
          br
          |  col-md-6 
          br
          |  col-sm-4
      .column.col-2.col-lg-4.col-md-6.col-sm-8
        .bg-gray.docs-block
          | col-2 
          br
          |  col-lg-4 
          br
          |  col-md-6 
          br
          |  col-sm-8

    p
      | There are #[code col-xs-<1-12>], #[code col-sm-<1-12>], #[code col-md-<1-12>], #[code col-lg-<1-12>] and #[code col-xl-<1-12>] available for flexible grid across mobile, tablet and desktop viewport usage.

    ul
      li
        | #[code col-xs-<1-12>] apply to window width smaller than or equal to #[strong 480px].
      li
        | #[code col-sm-<1-12>] apply to window width smaller than or equal to #[strong 600px].
      li
        | #[code col-md-<1-12>] apply to window width smaller than or equal to #[strong 840px].
      li
        | #[code col-lg-<1-12>] apply to window width smaller than or equal to #[strong 960px].
      li
        | #[code col-xl-<1-12>] apply to window width smaller than or equal to #[strong 1280px].
      li
        | #[code col-<1-12>] apply to all window width, including the width wider than #[strong 1280px].

    pre.code(data-lang='HTML')
      code
        :highlight(lang="html")
          <div class="container">
            <div class="columns">
              <div class="column col-xs-6">col-xs-6</div>
              <div class="column col-xs-3">col-xs-3</div>
              <div class="column col-xs-3">col-xs-3</div>
            </div>
          </div>

    +docs-subheading('responsive-container', 'Responsive container')

    p
      | The responsive layout also provides fixed-width containers.
      | Use #[code grid-xs](480px), #[code grid-sm](600px), #[code grid-md](840px), #[code grid-lg](960px) or #[code grid-xl](1280px) to the container for a fixed-width container with the specific max-width.

    pre.code(data-lang='HTML')
      code
        :highlight(lang="html")
          <!-- 100% width container with max-width set to grid-lg (960px) -->
          <div class="container grid-lg">
            <div class="columns">
              ...
            </div>
          </div>

    +docs-subheading('responsive-visibility', 'Responsive visibility')

    p The responsive visibility utilities help show and hide elements on specific viewport sizes.

    .docs-demo.columns
      .column.col-12
        table.docs-table.table.table-striped.text-center
          thead
            tr
              th
              th size-xs
              th size-sm
              th size-md
              th size-lg
              th size-xl
          tbody
            tr
              td.text-left hide-xs
              td
                .bg-secondary.docs-dot
              td
                .bg-primary.docs-dot
              td
                .bg-primary.docs-dot
              td
                .bg-primary.docs-dot
              td
                .bg-primary.docs-dot
            tr
              td.text-left hide-sm
              td
                .bg-secondary.docs-dot
              td
                .bg-secondary.docs-dot
              td
                .bg-primary.docs-dot
              td
                .bg-primary.docs-dot
              td
                .bg-primary.docs-dot
            tr
              td.text-left hide-md
              td
                .bg-secondary.docs-dot
              td
                .bg-secondary.docs-dot
              td
                .bg-secondary.docs-dot
              td
                .bg-primary.docs-dot
              td
                .bg-primary.docs-dot
            tr
              td.text-left hide-lg
              td
                .bg-secondary.docs-dot
              td
                .bg-secondary.docs-dot
              td
                .bg-secondary.docs-dot
              td
                .bg-secondary.docs-dot
              td
                .bg-primary.docs-dot
            tr
              td.text-left hide-xl
              td
                .bg-secondary.docs-dot
              td
                .bg-secondary.docs-dot
              td
                .bg-secondary.docs-dot
              td
                .bg-secondary.docs-dot
              td
                .bg-secondary.docs-dot

    p
      | For hiding elements on specific viewport sizes, there are classes #[code hide-xs], #[code hide-sm], #[code hide-md], #[code hide-lg] and #[code hide-xl] available.

    ul
      li
        | #[code hide-xs] hides elements when the window width is smaller than or equal to #[strong 480px].
      li
        | #[code hide-sm] hides elements when the window width is smaller than or equal to #[strong 600px].
      li
        | #[code hide-md] hides elements when the window width is smaller than or equal to #[strong 840px].
      li
        | #[code hide-lg] hides elements when the window width is smaller than or equal to #[strong 960px].
      li
        | #[code hide-xl] hides elements when the window width is smaller than or equal to #[strong 1280px].

    .docs-demo.columns
      .column.col-12
        table.docs-table.table.table-striped.text-center
          thead
            tr
              th
              th size-xs
              th size-sm
              th size-md
              th size-lg
              th size-xl
          tbody
            tr
              td.text-left show-xs
              td
                .bg-primary.docs-dot
              td
                .bg-secondary.docs-dot
              td
                .bg-secondary.docs-dot
              td
                .bg-secondary.docs-dot
              td
                .bg-secondary.docs-dot
            tr
              td.text-left show-sm
              td
                .bg-primary.docs-dot
              td
                .bg-primary.docs-dot
              td
                .bg-secondary.docs-dot
              td
                .bg-secondary.docs-dot
              td
                .bg-secondary.docs-dot
            tr
              td.text-left show-md
              td
                .bg-primary.docs-dot
              td
                .bg-primary.docs-dot
              td
                .bg-primary.docs-dot
              td
                .bg-secondary.docs-dot
              td
                .bg-secondary.docs-dot
            tr
              td.text-left show-lg
              td
                .bg-primary.docs-dot
              td
                .bg-primary.docs-dot
              td
                .bg-primary.docs-dot
              td
                .bg-primary.docs-dot
              td
                .bg-secondary.docs-dot
            tr
              td.text-left show-xl
              td
                .bg-primary.docs-dot
              td
                .bg-primary.docs-dot
              td
                .bg-primary.docs-dot
              td
                .bg-primary.docs-dot
              td
                .bg-primary.docs-dot

    p
      | For showing elements on specific viewport sizes, there are classes #[code show-xs], #[code show-sm], #[code show-md], #[code show-lg] and #[code show-xl] available.

    ul
      li
        | #[code show-xs] shows elements when the window width is smaller than or equal to #[strong 480px].
      li
        | #[code show-sm] shows elements when the window width is smaller than or equal to #[strong 600px].
      li
        | #[code show-md] shows elements when the window width is smaller than or equal to #[strong 840px].
      li
        | #[code show-lg] shows elements when the window width is smaller than or equal to #[strong 960px].
      li
        | #[code show-xl] shows elements when the window width is smaller than or equal to #[strong 1280px].

    p
      | Spectre also has a responsive web test tool Responsive Resizer. 
      | You can clone the 
      a(href="https://github.com/picturepan2/responsive-resizer" target="_blank") GitHub Repo
      |  to use it locally or use it online.
    p
      a.btn.btn-primary(href="https://picturepan2.github.io/responsive-resizer/" target="_blank") Responsive Resizer

    include ../_layout/_ad-c.pug

  include ../_layout/_footer.pug