jekyll-theme-primer 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -1
  3. data/_layouts/home.html +4 -0
  4. data/_layouts/page.html +4 -0
  5. data/_layouts/post.html +4 -0
  6. data/_sass/primer-base/lib/base.scss +6 -0
  7. data/_sass/primer-base/lib/normalize.scss +1 -1
  8. data/_sass/primer-layout/lib/grid-offset.scss +12 -23
  9. data/_sass/primer-support/lib/mixins/layout.scss +18 -12
  10. data/_sass/primer-support/lib/variables/layout.scss +7 -1
  11. data/_sass/primer-utilities/index.scss +1 -0
  12. data/_sass/primer-utilities/lib/animations.scss +1 -0
  13. data/_sass/primer-utilities/lib/borders.scss +71 -36
  14. data/_sass/primer-utilities/lib/details.scss +18 -0
  15. data/_sass/primer-utilities/lib/flexbox.scss +45 -73
  16. data/_sass/primer-utilities/lib/layout.scss +12 -27
  17. data/_sass/primer-utilities/lib/margin.scss +42 -75
  18. data/_sass/primer-utilities/lib/padding.scss +26 -56
  19. data/_sass/primer-utilities/lib/typography.scss +22 -23
  20. data/_sass/primer-utilities/lib/visibility-display.scss +21 -45
  21. metadata +15 -43
  22. data/_sass/primer-base/LICENSE +0 -21
  23. data/_sass/primer-base/README.md +0 -48
  24. data/_sass/primer-base/build/build.css +0 -1
  25. data/_sass/primer-base/build/index.js +0 -1
  26. data/_sass/primer-base/package.json +0 -73
  27. data/_sass/primer-layout/LICENSE +0 -21
  28. data/_sass/primer-layout/README.md +0 -137
  29. data/_sass/primer-layout/build/build.css +0 -1
  30. data/_sass/primer-layout/build/index.js +0 -1
  31. data/_sass/primer-layout/docs/grid.md +0 -392
  32. data/_sass/primer-layout/package.json +0 -71
  33. data/_sass/primer-markdown/LICENSE +0 -21
  34. data/_sass/primer-markdown/README.md +0 -218
  35. data/_sass/primer-markdown/build/build.css +0 -1
  36. data/_sass/primer-markdown/build/index.js +0 -1
  37. data/_sass/primer-markdown/package.json +0 -74
  38. data/_sass/primer-support/LICENSE +0 -21
  39. data/_sass/primer-support/README.md +0 -56
  40. data/_sass/primer-support/docs/breakpoints.md +0 -60
  41. data/_sass/primer-support/docs/color-system.md +0 -392
  42. data/_sass/primer-support/docs/spacing.md +0 -40
  43. data/_sass/primer-support/docs/typography.md +0 -90
  44. data/_sass/primer-support/package.json +0 -73
  45. data/_sass/primer-utilities/LICENSE +0 -21
  46. data/_sass/primer-utilities/README.md +0 -48
  47. data/_sass/primer-utilities/build/build.css +0 -1
  48. data/_sass/primer-utilities/build/index.js +0 -1
  49. data/_sass/primer-utilities/docs/animations.md +0 -75
  50. data/_sass/primer-utilities/docs/borders.md +0 -127
  51. data/_sass/primer-utilities/docs/box-shadow.md +0 -107
  52. data/_sass/primer-utilities/docs/colors.md +0 -232
  53. data/_sass/primer-utilities/docs/flexbox.md +0 -665
  54. data/_sass/primer-utilities/docs/layout.md +0 -300
  55. data/_sass/primer-utilities/docs/margin.md +0 -126
  56. data/_sass/primer-utilities/docs/padding.md +0 -110
  57. data/_sass/primer-utilities/docs/typography.md +0 -138
  58. data/_sass/primer-utilities/package.json +0 -71
@@ -1,392 +0,0 @@
1
- ---
2
- title: Grid
3
- status: New release
4
- status_issue: https://github.com/github/design-systems/issues/88
5
- source: https://github.com/primer/primer/blob/master/modules/primer-layout/lib/grid.scss
6
- ---
7
-
8
- The grid is 12 columns and percentage-based. The number of columns a container spans can be adjusted across breakpoints for responsive layouts. The grid system works with a variety of layout utilities to achieve different results.
9
-
10
- {:toc}
11
-
12
- ## Float based grid
13
-
14
- Use `.clearfix` on the container and float utilities with columns for a floated grid layout.
15
-
16
- ```html title="Float based grid"
17
- <div class="container-lg clearfix">
18
- <div class="col-4 float-left border p-4">
19
- My column
20
- </div>
21
- <div class="col-4 float-left border p-4">
22
- Looks better
23
- </div>
24
- <div class="col-4 float-left border p-4">
25
- Than your column
26
- </div>
27
- </div>
28
- ```
29
-
30
- ### Reversed grid
31
-
32
- To reverse the order of columns, use `float-right` to float columns to the right.
33
-
34
- ```html title="Float grid reversed"
35
- <div class="container-lg clearfix">
36
- <div class="col-4 float-right border p-4">
37
- One
38
- </div>
39
- <div class="col-4 float-right border p-4">
40
- Two
41
- </div>
42
- <div class="col-4 float-right border p-4">
43
- Three
44
- </div>
45
- </div>
46
- ```
47
-
48
- ## Nesting
49
- You can infinitely nest grid layouts within other columns since the column widths are percentage based. With great flexibility comes great responsibility - be sensible with how far you nest!
50
-
51
- ```html title="Nesting grids"
52
- <div class="clearfix">
53
- <div class="col-6 float-left px-1">
54
- <div class="border p-1">Unnested</div>
55
- </div>
56
- <div class="col-6 float-left">
57
- <div class="clearfix">
58
- <div class="col-6 float-left px-1">
59
- <div class="border p-1">1 x Nested</div>
60
- </div>
61
- <div class="col-6 float-left">
62
- <div class="col-6 float-left px-1">
63
- <div class="border p-1">2 x Nested</div>
64
- </div>
65
- <div class="col-6 float-left px-1">
66
- <div class="border p-1">2 x Nested</div>
67
- </div>
68
- </div>
69
- </div>
70
- </div>
71
- </div>
72
- ```
73
-
74
- ## Centering a column
75
-
76
- Use `.mx-auto` to center columns within a container.
77
-
78
- ```html title="Centering a column"
79
- <div class="border">
80
- <div class="col-6 p-2 mx-auto border">
81
- This column is the center of my world.
82
- </div>
83
- </div>
84
- ```
85
-
86
-
87
- ## Column widths
88
- Column widths can be used with any other block or inline-block elements to add percentage-based widths.
89
-
90
- ```html title="Column widths"
91
- <div>
92
- <div class="col-4 float-right p-2 border text-red">
93
- <%= octicon "heart" %> Don't go bacon my heart.
94
- </div>
95
- <p>T-bone drumstick alcatra ribeye. Strip steak chuck andouille tenderloin bacon tri-tip ball tip beef capicola rump. Meatloaf bresaola drumstick ball tip salami. Drumstick ham bacon alcatra pig porchetta, spare ribs leberkas pork belly.</p>
96
- </div>
97
- ```
98
-
99
- ## Offset columns
100
-
101
- Using column offset classes can push a div over X number of columns. They work responsively using the [breakpoints outlined below](/styleguide/css/modules/grid#responsive-grids).
102
-
103
- ```html title="Offset columns"
104
- <div class="clearfix">
105
- <div class="offset-1 col-3 border p-3">.offset-1</div>
106
- <div class="offset-2 col-3 border p-3">.offset-2</div>
107
- </div>
108
- ```
109
-
110
- ## Gutters
111
- Use gutter styles or padding utilities to create gutters. You can use the default gutter style, `gutter`, or either of its modifiers, `gutter-condensed` or `gutter-spacious`. Gutter styles also support responsive breakpoint modifiers. Gutter styles add padding to the left and right side of each column and apply a negative margin to the container to ensure content inside each column lines up with content outside of the grid.
112
-
113
- ```html title="Gutters"
114
- <div class="clearfix gutter-md-spacious border">
115
- <div class="col-3 float-left">
116
- <div class="border p-3">.col-md-3</div>
117
- </div>
118
- <div class="col-3 float-left">
119
- <div class="border p-3">.col-md-3</div>
120
- </div>
121
- <div class="col-3 float-left">
122
- <div class="border p-3">.col-md-3</div>
123
- </div>
124
- <div class="col-3 float-left">
125
- <div class="border p-3">.col-md-3</div>
126
- </div>
127
- </div>
128
- ```
129
-
130
- Use padding utilities to create gutters for more customized layouts.
131
-
132
- ```html title="Gutters with padding"
133
- <div class="container-lg clearfix">
134
- <div class="col-3 float-left pr-2 mb-3">
135
- <div class="border bg-gray-light">.pr-2</div>
136
- </div>
137
- <div class="col-3 float-left px-2 mb-3">
138
- <div class="border bg-gray-light">.px-2</div>
139
- </div>
140
- <div class="col-3 float-left px-2 mb-3">
141
- <div class="border bg-gray-light">.px-2</div>
142
- </div>
143
- <div class="col-3 float-left pl-2 mb-3">
144
- <div class="border bg-gray-light">.pl-2</div>
145
- </div>
146
- </div>
147
- <div class="container-lg clearfix">
148
- <div class="col-3 float-left pr-2">
149
- <div class="border bg-gray-light">.pr-2</div>
150
- </div>
151
- <div class="col-9 float-left pl-2">
152
- <div class="border bg-gray-light">.pl-2</div>
153
- </div>
154
- </div>
155
- ```
156
-
157
-
158
- ## Inline-block grids
159
- Use column widths with `d-inline-block` as an alternative to floated grids.
160
-
161
- ```html title="Inline-block grid"
162
- <div>
163
- <div class="col-4 d-inline-block border">
164
- .col-4 .d-inline-block
165
- </div><!--
166
- --><div class="col-4 d-inline-block border">
167
- .col-4 .d-inline-block
168
- </div><!--
169
- --><div class="col-4 d-inline-block border">
170
- .col-4 .d-inline-block
171
- </div>
172
- </div>
173
- ```
174
-
175
- You can use column widths and other utilities on elements such as lists to create the layout you need while keeping the markup semantically correct.
176
- ```html title="Inline-block grid list"
177
- <ul class="list-style-none">
178
- <li class="d-inline-block col-2 p-2"><img class="width-full avatar" src="/broccolini.png" alt="broccolini" /></li><!--
179
- --><li class="d-inline-block col-2 p-2"><img class="width-full avatar" src="/jonrohan.png" alt="jonrohan" /></li><!--
180
- --><li class="d-inline-block col-2 p-2"><img class="width-full avatar" src="/muan.png" alt="muan" /></li><!--
181
- --><li class="d-inline-block col-2 p-2"><img class="width-full avatar" src="/pmarsceill.png" alt="pmarsceill" /></li><!--
182
- --><li class="d-inline-block col-2 p-2"><img class="width-full avatar" src="/sophshep.png" alt="sophshep" /></li><!--
183
- --><li class="d-inline-block col-2 p-2"><img class="width-full avatar" src="/cmwinters.png" alt="cmwinters" /></li><!--
184
- --><li class="d-inline-block col-2 p-2"><img class="width-full avatar" src="/jeejkang.png" alt="jeejkang" /></li><!--
185
- --><li class="d-inline-block col-2 p-2"><img class="width-full avatar" src="/mdo.png" alt="mdo" /></li>
186
- </ul>
187
- ```
188
-
189
-
190
- ## Display table grids
191
- Using [display table utilities](/styleguide/css/utilities/layout#display) with columns gives you some alternative layout options.
192
-
193
- A useful example is being able to keep the height of the container equal across a row when the length of content may differ.
194
-
195
- ```html title="Table grid"
196
- <div class="d-table col-12">
197
- <div class="col-4 d-table-cell border p-2">
198
- Bacon ipsum dolor amet leberkas pork pig kielbasa shankle ribeye meatball, salami alcatra venison.
199
- </div><!--
200
- --><div class="col-4 d-table-cell border p-2">
201
- Pork chop cupim cow turkey frankfurter, landjaeger fatback hamburger meatball salami spare ribs. Rump tenderloin salami, hamburger frankfurter landjaeger andouille.
202
- </div><!--
203
- --><div class="col-4 d-table-cell border p-2">
204
- Brisket tongue frankfurter cupim strip steak rump picanha pancetta pork pig kevin pastrami biltong. Shankle venison meatball swine sausage ground round. Tail pork loin ribeye kielbasa short ribs pork chop.
205
- </div>
206
- </div>
207
- ```
208
- You can also create an alternative [media object](/styleguide/css/utilities/layout#the-media-object) layout with `.display-table` and column widths.
209
-
210
- ```html title="Table grid alternative"
211
- <div class="d-table col-12">
212
- <div class="col-2 d-table-cell v-align-middle">
213
- <img class="width-full avatar" src="/github.png" alt="github" />
214
- </div>
215
- <div class="col-10 d-table-cell v-align-middle pl-4">
216
- <h1 class="text-normal lh-condensed">GitHub</h1>
217
- <p class="h4 text-gray text-normal mb-2">How people build software.</p>
218
- <a class="text-gray text-small" href="#url">https://github.com/about</a>
219
- </div>
220
- </div>
221
- ```
222
-
223
- Note that table cells will fill the width of their container even when the total columns doesn't add up to 12.
224
-
225
- ```html title="Table grid cells"
226
- <div class="d-table col-12">
227
- <div class="col-4 d-table-cell border">
228
- .col-4 .d-table-cell
229
- </div><!--
230
- --><div class="col-4 d-table-cell border">
231
- .col-4 .d-table-cell
232
- </div><!--
233
- --><div class="col-2 d-table-cell border">
234
- .col-2 .d-table-cell
235
- </div>
236
- </div>
237
- ```
238
-
239
- ## Flexbox grids
240
-
241
- You can use [flex utilities](/styleguide/css/utilities/flexbox) on the container and columns to create a flexbox grid.
242
-
243
- This can be useful for keeping columns the same height, justifying content and vertically aligning items. The flexbox grid is also great for working with responsive layouts.
244
-
245
- ```html title="Flexbox grid"
246
- <div class="d-flex flex-column flex-md-row flex-items-center flex-md-items-center">
247
- <div class="col-2 d-flex flex-items-center flex-items-center flex-md-items-start">
248
- <img class="width-full avatar mb-2 mb-md-0" src="/github.png" alt="github" />
249
- </div>
250
- <div class="col-12 col-md-10 d-flex flex-column flex-justify-center flex-items-center flex-md-items-start pl-md-4">
251
- <h1 class="text-normal lh-condensed">GitHub</h1>
252
- <p class="h4 text-gray text-normal mb-2">How people build software.</p>
253
- <a class="text-gray text-small" href="#url">https://github.com/about</a>
254
- </div>
255
- </div>
256
- ```
257
-
258
-
259
- ## Responsive grids
260
- All the column width classes can be set per breakpoint to create responsive grid layouts. Each responsive style is applied to the specified breakpoint and up.
261
-
262
- ### Breakpoints
263
- We use abbreviations for each breakpoint to keep the class names concise.
264
-
265
- | Shorthand | Description |
266
- | --- | --- |
267
- | sm | min-width: 544px |
268
- | md | min-width: 768px |
269
- | lg | min-width: 1004px |
270
- | xl | min-width: 1280px |
271
-
272
- **Note:** The `lg` breakpoint matches our current page width of `980px` including left and right padding of `12px`. This is so that content doesn't touch the edges of the window when resized.
273
-
274
- <hr />
275
-
276
- In this example at the `sm` breakpoint 2 columns will show, at the `md` breakpoint 4 columns will show, and at the `lg` breakpoint 6 columns will show.
277
-
278
- ```html title="Responsive grid"
279
- <div class="container-lg clearfix">
280
- <div class="col-sm-6 col-md-3 col-lg-2 float-left p-2 border">
281
- .col-sm-6 .col-md-3 .col-lg-2
282
- </div>
283
- <div class="col-sm-6 col-md-3 col-lg-2 float-left p-2 border">
284
- .col-sm-6 .col-md-3 .col-lg-2
285
- </div>
286
- <div class="col-sm-6 col-md-3 col-lg-2 float-left p-2 border">
287
- .col-sm-6 .col-md-3 .col-lg-2
288
- </div>
289
- <div class="col-sm-6 col-md-3 col-lg-2 float-left p-2 border">
290
- .col-sm-6 .col-md-3 .col-lg-2
291
- </div>
292
- <div class="col-sm-6 col-md-3 col-lg-2 float-left p-2 border">
293
- .col-sm-6 .col-md-3 .col-lg-2
294
- </div>
295
- <div class="col-sm-6 col-md-3 col-lg-2 float-left p-2 border">
296
- .col-sm-6 .col-md-3 .col-lg-2
297
- </div>
298
- </div>
299
- ```
300
-
301
- For demonstration, this is how the above example would look at the `sm` breakpoint.
302
-
303
- ```html title="Responsive grid small"
304
- <div class="container-lg clearfix">
305
- <div class="col-sm-6 float-left p-2 border">
306
- .col-sm-6
307
- </div>
308
- <div class="col-sm-6 float-left p-2 border">
309
- .col-sm-6
310
- </div>
311
- <div class="col-sm-6 float-left p-2 border">
312
- .col-sm-6
313
- </div>
314
- <div class="col-sm-6 float-left p-2 border">
315
- .col-sm-6
316
- </div>
317
- <div class="col-sm-6 float-left p-2 border">
318
- .col-sm-6
319
- </div>
320
- <div class="col-sm-6 float-left p-2 border">
321
- .col-sm-6
322
- </div>
323
- </div>
324
- ```
325
- This is how that same example would look at the `md` breakpoint.
326
-
327
- ```html title="Responsive grid medium"
328
- <div class="container-lg clearfix">
329
- <div class="col-md-3 float-left p-2 border">
330
- .col-md-3
331
- </div>
332
- <div class="col-md-3 float-left p-2 border">
333
- .col-md-3
334
- </div>
335
- <div class="col-md-3 float-left p-2 border">
336
- .col-md-3
337
- </div>
338
- <div class="col-md-3 float-left p-2 border">
339
- .col-md-3
340
- </div>
341
- <div class="col-md-3 float-left p-2 border">
342
- .col-md-3
343
- </div>
344
- <div class="col-md-3 float-left p-2 border">
345
- .col-md-3
346
- </div>
347
- </div>
348
- ```
349
-
350
- This is how that example would look at the `lg` breakpoint.
351
-
352
- ```html title="Responsive grid large"
353
- <div class="container-lg clearfix">
354
- <div class="col-lg-2 float-left p-2 border">
355
- .col-lg-2
356
- </div>
357
- <div class="col-lg-2 float-left p-2 border">
358
- .col-lg-2
359
- </div>
360
- <div class="col-lg-2 float-left p-2 border">
361
- .col-lg-2
362
- </div>
363
- <div class="col-lg-2 float-left p-2 border">
364
- .col-lg-2
365
- </div>
366
- <div class="col-lg-2 float-left p-2 border">
367
- .col-lg-2
368
- </div>
369
- <div class="col-lg-2 float-left p-2 border">
370
- .col-lg-2
371
- </div>
372
- </div>
373
- ```
374
-
375
- ## Containers
376
- Container widths match our breakpoints and are available at a `md`, `lg`, and `xl` size. Containers apply a max-width rather than a fixed width for responsive layouts, and they center the container.
377
-
378
- ```html title="Containers sized"
379
- <div class="container-md border">
380
- .container-md, max-width 768px
381
- </div>
382
-
383
- <div class="container-lg border">
384
- .container-lg, max-width 1012px
385
- </div>
386
-
387
- <div class="container-xl border">
388
- .container-xl, max-width 1280px
389
- </div>
390
- ```
391
-
392
- **Note:** `.container` is being replaced with `.container-lg`. To match the current fixed page width use `.container-lg` with `px-3`. This gives the container padding on smaller screens which works better for responsive layouts.
@@ -1,71 +0,0 @@
1
- {
2
- "_from": "primer-layout@1.4.5",
3
- "_id": "primer-layout@1.4.5",
4
- "_inBundle": false,
5
- "_integrity": "sha1-b83KZw7wv1xCir6L6GSdg8UeeW8=",
6
- "_location": "/primer-layout",
7
- "_phantomChildren": {},
8
- "_requested": {
9
- "type": "version",
10
- "registry": true,
11
- "raw": "primer-layout@1.4.5",
12
- "name": "primer-layout",
13
- "escapedName": "primer-layout",
14
- "rawSpec": "1.4.5",
15
- "saveSpec": null,
16
- "fetchSpec": "1.4.5"
17
- },
18
- "_requiredBy": [
19
- "#USER",
20
- "/"
21
- ],
22
- "_resolved": "https://registry.npmjs.org/primer-layout/-/primer-layout-1.4.5.tgz",
23
- "_shasum": "6fcdca670ef0bf5c428abe8be8649d83c51e796f",
24
- "_spec": "primer-layout@1.4.5",
25
- "_where": "/Users/benbalter/projects/pages-themes/primer",
26
- "author": {
27
- "name": "GitHub, Inc."
28
- },
29
- "bugs": {
30
- "url": "https://github.com/primer/primer/issues"
31
- },
32
- "bundleDependencies": false,
33
- "dependencies": {
34
- "primer-support": "4.5.2"
35
- },
36
- "deprecated": false,
37
- "description": "Containers, rows, and columns for creating page layout.",
38
- "files": [
39
- "index.scss",
40
- "lib",
41
- "build",
42
- "docs"
43
- ],
44
- "homepage": "http://primer.github.io/",
45
- "keywords": [
46
- "primer",
47
- "css",
48
- "github",
49
- "design-system"
50
- ],
51
- "license": "MIT",
52
- "main": "build/index.js",
53
- "name": "primer-layout",
54
- "primer": {
55
- "category": "core",
56
- "module_type": "objects"
57
- },
58
- "repository": {
59
- "type": "git",
60
- "url": "https://github.com/primer/primer/tree/master/modules/primer-layout"
61
- },
62
- "sass": "index.scss",
63
- "scripts": {
64
- "build": "../../script/npm-run primer-module-build index.scss",
65
- "lint": "../../script/lint-scss",
66
- "prepare": "npm run build",
67
- "test": "../../script/npm-run-all build lint"
68
- },
69
- "style": "build/build.css",
70
- "version": "1.4.5"
71
- }