@papillonbits/css 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/build/index.scss +1 -0
  4. package/build/primer/base/base.scss +89 -0
  5. package/build/primer/base/index.scss +6 -0
  6. package/build/primer/base/kbd.scss +23 -0
  7. package/build/primer/base/normalize.scss +421 -0
  8. package/build/primer/base/octicons.scss +6 -0
  9. package/build/primer/base/typography-base.scss +92 -0
  10. package/build/primer/index.scss +6 -0
  11. package/build/primer/support/index.scss +10 -0
  12. package/build/primer/support/mixins/color-modes.scss +109 -0
  13. package/build/primer/support/mixins/layout.scss +60 -0
  14. package/build/primer/support/mixins/misc.scss +27 -0
  15. package/build/primer/support/mixins/typography.scss +87 -0
  16. package/build/primer/support/variables/layout.scss +201 -0
  17. package/build/primer/support/variables/misc.scss +17 -0
  18. package/build/primer/support/variables/typography.scss +43 -0
  19. package/build/primer/truncate/index.scss +2 -0
  20. package/build/primer/truncate/truncate.scss +61 -0
  21. package/build/primer/utilities/animations.scss +196 -0
  22. package/build/primer/utilities/borders.scss +79 -0
  23. package/build/primer/utilities/box-shadow.scss +27 -0
  24. package/build/primer/utilities/colors.scss +95 -0
  25. package/build/primer/utilities/details.scss +28 -0
  26. package/build/primer/utilities/flexbox.scss +54 -0
  27. package/build/primer/utilities/index.scss +14 -0
  28. package/build/primer/utilities/layout.scss +98 -0
  29. package/build/primer/utilities/margin.scss +74 -0
  30. package/build/primer/utilities/padding.scss +59 -0
  31. package/build/primer/utilities/typography.scss +248 -0
  32. package/build/primer/utilities/visibility-display.scss +125 -0
  33. package/package.json +27 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 MTS.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ <h1 align="center">Papillon Bits CSS</h1>
@@ -0,0 +1 @@
1
+ @import './primer/index.scss';
@@ -0,0 +1,89 @@
1
+ @import "../support/variables/typography.scss";
2
+ @import "../support/variables/misc.scss";
3
+
4
+ // stylelint-disable selector-max-type
5
+ * {
6
+ box-sizing: border-box;
7
+ }
8
+
9
+ input,
10
+ select,
11
+ textarea,
12
+ button {
13
+ font-family: inherit;
14
+ font-size: inherit;
15
+ line-height: inherit;
16
+ }
17
+
18
+ body {
19
+ font-family: $body-font;
20
+ font-size: $body-font-size;
21
+ line-height: $body-line-height;
22
+ color: var(--color-fg-default);
23
+ background-color: var(--color-canvas-default);
24
+ }
25
+
26
+ a {
27
+ color: var(--color-accent-fg);
28
+ text-decoration: none;
29
+
30
+ &:hover {
31
+ text-decoration: underline;
32
+ }
33
+ }
34
+
35
+ b,
36
+ strong {
37
+ font-weight: $font-weight-bold;
38
+ }
39
+
40
+ // Horizontal lines
41
+ //
42
+ // TODO-MDO: Remove `.rule` from everywhere and replace with `<hr>`s
43
+ hr,
44
+ .rule {
45
+ height: 0;
46
+ // stylelint-disable-next-line primer/spacing
47
+ margin: 15px 0;
48
+ overflow: hidden;
49
+ background: transparent;
50
+ border: 0;
51
+ border-bottom: $border-width $border-style var(--color-border-muted);
52
+
53
+ @include clearfix();
54
+ }
55
+
56
+ //
57
+ // Remove most spacing between table cells.
58
+ //
59
+
60
+ table {
61
+ border-spacing: 0;
62
+ border-collapse: collapse;
63
+ }
64
+
65
+ td,
66
+ th {
67
+ padding: 0;
68
+ }
69
+
70
+ button {
71
+ cursor: pointer;
72
+ // Remove border radius added by Chrome macOS
73
+ border-radius: 0;
74
+ }
75
+
76
+ // increase the selector specificity for [hidden]
77
+ // so that it always overrides utility classes (.d-block, etc.)
78
+ [hidden][hidden] {
79
+ display: none !important;
80
+ }
81
+
82
+ details {
83
+ summary { cursor: pointer; }
84
+
85
+ &:not([open]) {
86
+ // Set details content hidden by default for browsers that don't do this
87
+ > *:not(summary) { display: none !important; }
88
+ }
89
+ }
@@ -0,0 +1,6 @@
1
+ @import '../support/index.scss';
2
+ @import './normalize.scss';
3
+ @import './base.scss';
4
+ @import './kbd.scss';
5
+ @import './typography-base.scss';
6
+ @import './octicons.scss';
@@ -0,0 +1,23 @@
1
+ @import "../support/variables/layout.scss";
2
+ @import "../support/variables/typography.scss";
3
+ @import "../support/variables/misc.scss";
4
+
5
+ // Keyboard shortcuts
6
+ // stylelint-disable selector-max-type
7
+
8
+ kbd {
9
+ display: inline-block;
10
+ padding: ($spacer-1 - 1) ($spacer-1 + 1);
11
+ font: 11px $mono-font;
12
+ // stylelint-disable-next-line primer/typography
13
+ line-height: 10px;
14
+ color: var(--color-fg-default);
15
+ vertical-align: middle;
16
+ background-color: var(--color-canvas-subtle);
17
+ // stylelint-disable-next-line primer/borders
18
+ border: $border-style $border-width var(--color-neutral-muted);
19
+ border-bottom-color: var(--color-neutral-muted);
20
+ border-radius: $border-radius;
21
+ // stylelint-disable-next-line primer/box-shadow
22
+ box-shadow: inset 0 -1px 0 var(--color-neutral-muted);
23
+ }
@@ -0,0 +1,421 @@
1
+ // stylelint-disable
2
+ /*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
3
+
4
+ /**
5
+ * 1. Change the default font family in all browsers (opinionated).
6
+ * 2. Prevent adjustments of font size after orientation changes in IE and iOS.
7
+ */
8
+
9
+ html {
10
+ font-family: sans-serif; /* 1 */
11
+ -ms-text-size-adjust: 100%; /* 2 */
12
+ -webkit-text-size-adjust: 100%; /* 2 */
13
+ }
14
+
15
+ /**
16
+ * Remove the margin in all browsers (opinionated).
17
+ */
18
+
19
+ body {
20
+ margin: 0;
21
+ }
22
+
23
+ /* HTML5 display definitions
24
+ ========================================================================== */
25
+
26
+ /**
27
+ * Add the correct display in IE 9-.
28
+ * 1. Add the correct display in Edge, IE, and Firefox.
29
+ * 2. Add the correct display in IE.
30
+ */
31
+
32
+ article,
33
+ aside,
34
+ details, /* 1 */
35
+ figcaption,
36
+ figure,
37
+ footer,
38
+ header,
39
+ main, /* 2 */
40
+ menu,
41
+ nav,
42
+ section { /* 1 */
43
+ display: block;
44
+ }
45
+
46
+ summary {
47
+ display: list-item;
48
+ }
49
+
50
+ /**
51
+ * Add the correct display in IE 9-.
52
+ */
53
+
54
+ audio,
55
+ canvas,
56
+ progress,
57
+ video {
58
+ display: inline-block;
59
+ }
60
+
61
+ /**
62
+ * Add the correct display in iOS 4-7.
63
+ */
64
+
65
+ audio:not([controls]) {
66
+ display: none;
67
+ height: 0;
68
+ }
69
+
70
+ /**
71
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
72
+ */
73
+
74
+ progress {
75
+ vertical-align: baseline;
76
+ }
77
+
78
+ /**
79
+ * Add the correct display in IE 10-.
80
+ * 1. Add the correct display in IE.
81
+ */
82
+
83
+ template, /* 1 */
84
+ [hidden] {
85
+ display: none !important;
86
+ }
87
+
88
+ /* Links
89
+ ========================================================================== */
90
+
91
+ /**
92
+ * Remove the gray background on active links in IE 10.
93
+ */
94
+
95
+ a {
96
+ background-color: transparent; /* 1 */
97
+ }
98
+
99
+ /**
100
+ * Remove the outline on focused links when they are also active or hovered
101
+ * in all browsers (opinionated).
102
+ */
103
+
104
+ a:active,
105
+ a:hover {
106
+ outline-width: 0;
107
+ }
108
+
109
+ /* Text-level semantics
110
+ ========================================================================== */
111
+
112
+ /**
113
+ * 1. Remove the bottom border in Firefox 39-.
114
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
115
+ */
116
+
117
+ abbr[title] {
118
+ border-bottom: none; /* 1 */
119
+ text-decoration: underline; /* 2 */
120
+ text-decoration: underline dotted; /* 2 */
121
+ }
122
+
123
+ /**
124
+ * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
125
+ */
126
+
127
+ b,
128
+ strong {
129
+ font-weight: inherit;
130
+ }
131
+
132
+ /**
133
+ * Add the correct font weight in Chrome, Edge, and Safari.
134
+ */
135
+
136
+ b,
137
+ strong {
138
+ font-weight: bolder;
139
+ }
140
+
141
+ /**
142
+ * Add the correct font style in Android 4.3-.
143
+ */
144
+
145
+ dfn {
146
+ font-style: italic;
147
+ }
148
+
149
+ /**
150
+ * Correct the font size and margin on `h1` elements within `section` and
151
+ * `article` contexts in Chrome, Firefox, and Safari.
152
+ */
153
+
154
+ h1 {
155
+ font-size: 2em;
156
+ margin: 0.67em 0;
157
+ }
158
+
159
+ /**
160
+ * Add the correct background and color in IE 9-.
161
+ */
162
+
163
+ mark {
164
+ background-color: var(--color-attention-subtle);
165
+ color: var(--color-text-primary);
166
+ }
167
+
168
+ /**
169
+ * Add the correct font size in all browsers.
170
+ */
171
+
172
+ small {
173
+ font-size: 80%;
174
+ }
175
+
176
+ /**
177
+ * Prevent `sub` and `sup` elements from affecting the line height in
178
+ * all browsers.
179
+ */
180
+
181
+ sub,
182
+ sup {
183
+ font-size: 75%;
184
+ line-height: 0;
185
+ position: relative;
186
+ vertical-align: baseline;
187
+ }
188
+
189
+ sub {
190
+ bottom: -0.25em;
191
+ }
192
+
193
+ sup {
194
+ top: -0.5em;
195
+ }
196
+
197
+ /* Embedded content
198
+ ========================================================================== */
199
+
200
+ /**
201
+ * Remove the border on images inside links in IE 10-.
202
+ */
203
+
204
+ img {
205
+ border-style: none;
206
+ }
207
+
208
+ /**
209
+ * Hide the overflow in IE.
210
+ */
211
+
212
+ svg:not(:root) {
213
+ overflow: hidden;
214
+ }
215
+
216
+ /* Grouping content
217
+ ========================================================================== */
218
+
219
+ /**
220
+ * 1. Correct the inheritance and scaling of font size in all browsers.
221
+ * 2. Correct the odd `em` font sizing in all browsers.
222
+ */
223
+
224
+ code,
225
+ kbd,
226
+ pre,
227
+ samp {
228
+ font-family: monospace; /* 1 */
229
+ font-size: 1em; /* 2 */
230
+ }
231
+
232
+ /**
233
+ * Add the correct margin in IE 8.
234
+ */
235
+
236
+ figure {
237
+ margin: 1em $spacer-6;
238
+ }
239
+
240
+ /**
241
+ * 1. Add the correct box sizing in Firefox.
242
+ * 2. Show the overflow in Edge and IE.
243
+ */
244
+
245
+ hr {
246
+ box-sizing: content-box; /* 1 */
247
+ height: 0; /* 1 */
248
+ overflow: visible; /* 2 */
249
+ }
250
+
251
+ /* Forms
252
+ ========================================================================== */
253
+
254
+ /**
255
+ * 1. Change font properties to `inherit` in all browsers (opinionated).
256
+ * 2. Remove the margin in Firefox and Safari.
257
+ */
258
+
259
+ button,
260
+ input,
261
+ select,
262
+ textarea {
263
+ font: inherit; /* 1 */
264
+ margin: 0; /* 2 */
265
+ }
266
+
267
+ /**
268
+ * Restore the font weight unset by the previous rule.
269
+ */
270
+
271
+ optgroup {
272
+ font-weight: $font-weight-bold;
273
+ }
274
+
275
+ /**
276
+ * Show the overflow in IE.
277
+ * 1. Show the overflow in Edge.
278
+ */
279
+
280
+ button,
281
+ input { /* 1 */
282
+ overflow: visible;
283
+ }
284
+
285
+ /**
286
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
287
+ * 1. Remove the inheritance of text transform in Firefox.
288
+ */
289
+
290
+ button,
291
+ select { /* 1 */
292
+ text-transform: none;
293
+ }
294
+
295
+ /**
296
+ * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
297
+ * controls in Android 4.
298
+ * 2. Correct the inability to style clickable types in iOS and Safari.
299
+ */
300
+
301
+ button,
302
+ html [type="button"], /* 1 */
303
+ [type="reset"],
304
+ [type="submit"] {
305
+ -webkit-appearance: button; /* 2 */
306
+ }
307
+
308
+ /**
309
+ * Remove the inner border and padding in Firefox.
310
+ */
311
+
312
+ button::-moz-focus-inner,
313
+ [type="button"]::-moz-focus-inner,
314
+ [type="reset"]::-moz-focus-inner,
315
+ [type="submit"]::-moz-focus-inner {
316
+ border-style: none;
317
+ padding: 0;
318
+ }
319
+
320
+ /**
321
+ * Restore the focus styles unset by the previous rule.
322
+ */
323
+
324
+ button:-moz-focusring,
325
+ [type="button"]:-moz-focusring,
326
+ [type="reset"]:-moz-focusring,
327
+ [type="submit"]:-moz-focusring {
328
+ outline: 1px dotted ButtonText;
329
+ }
330
+
331
+ /**
332
+ * Change the border, margin, and padding in all browsers (opinionated).
333
+ */
334
+
335
+ fieldset {
336
+ border: $border-width $border-style #c0c0c0;
337
+ margin: 0 2px;
338
+ padding: 0.35em 0.625em $em-spacer-6;
339
+ }
340
+
341
+ /**
342
+ * 1. Correct the text wrapping in Edge and IE.
343
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
344
+ * 3. Remove the padding so developers are not caught out when they zero out
345
+ * `fieldset` elements in all browsers.
346
+ */
347
+
348
+ legend {
349
+ box-sizing: border-box; /* 1 */
350
+ color: inherit; /* 2 */
351
+ display: table; /* 1 */
352
+ max-width: 100%; /* 1 */
353
+ padding: 0; /* 3 */
354
+ white-space: normal; /* 1 */
355
+ }
356
+
357
+ /**
358
+ * Remove the default vertical scrollbar in IE.
359
+ */
360
+
361
+ textarea {
362
+ overflow: auto;
363
+ }
364
+
365
+ /**
366
+ * 1. Add the correct box sizing in IE 10-.
367
+ * 2. Remove the padding in IE 10-.
368
+ */
369
+
370
+ [type="checkbox"],
371
+ [type="radio"] {
372
+ box-sizing: border-box; /* 1 */
373
+ padding: 0; /* 2 */
374
+ }
375
+
376
+ /**
377
+ * Correct the cursor style of increment and decrement buttons in Chrome.
378
+ */
379
+
380
+ [type="number"]::-webkit-inner-spin-button,
381
+ [type="number"]::-webkit-outer-spin-button {
382
+ height: auto;
383
+ }
384
+
385
+ /**
386
+ * 1. Correct the odd appearance in Chrome and Safari.
387
+ * 2. Correct the outline style in Safari.
388
+ */
389
+
390
+ [type="search"] {
391
+ -webkit-appearance: textfield; /* 1 */
392
+ outline-offset: -2px; /* 2 */
393
+ }
394
+
395
+ /**
396
+ * Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
397
+ */
398
+
399
+ [type="search"]::-webkit-search-cancel-button,
400
+ [type="search"]::-webkit-search-decoration {
401
+ -webkit-appearance: none;
402
+ }
403
+
404
+ /**
405
+ * Correct the text style of placeholders in Chrome, Edge, and Safari.
406
+ */
407
+
408
+ ::-webkit-input-placeholder {
409
+ color: inherit;
410
+ opacity: 0.54;
411
+ }
412
+
413
+ /**
414
+ * 1. Correct the inability to style clickable types in iOS and Safari.
415
+ * 2. Change font properties to `inherit` in Safari.
416
+ */
417
+
418
+ ::-webkit-file-upload-button {
419
+ -webkit-appearance: button; /* 1 */
420
+ font: inherit; /* 2 */
421
+ }
@@ -0,0 +1,6 @@
1
+ .octicon {
2
+ display: inline-block;
3
+ overflow: visible !important;
4
+ vertical-align: text-bottom;
5
+ fill: currentColor;
6
+ }
@@ -0,0 +1,92 @@
1
+ @import "../support/variables/typography.scss";
2
+ @import "../support/mixins/typography.scss";
3
+
4
+ // Headings
5
+ // --------------------------------------------------
6
+ // stylelint-disable selector-max-type
7
+ h1,
8
+ h2,
9
+ h3,
10
+ h4,
11
+ h5,
12
+ h6 {
13
+ margin-top: 0;
14
+ margin-bottom: 0;
15
+ }
16
+
17
+ h1 { @include h1; }
18
+ h2 { @include h2; }
19
+ h3 { @include h3; }
20
+ h4 { @include h4; }
21
+ h5 { @include h5; }
22
+ h6 { @include h6; }
23
+
24
+ // Body text
25
+ // --------------------------------------------------
26
+
27
+ p {
28
+ margin-top: 0;
29
+ // stylelint-disable-next-line primer/spacing
30
+ margin-bottom: 10px;
31
+ }
32
+
33
+ small {
34
+ // stylelint-disable-next-line primer/typography
35
+ font-size: 90%;
36
+ }
37
+
38
+ blockquote {
39
+ margin: 0;
40
+ }
41
+
42
+ // Lists
43
+ // --------------------------------------------------
44
+
45
+ ul,
46
+ ol {
47
+ padding-left: 0;
48
+ margin-top: 0;
49
+ margin-bottom: 0;
50
+ }
51
+
52
+ ol ol,
53
+ ul ol {
54
+ list-style-type: lower-roman;
55
+ }
56
+
57
+ ul ul ol,
58
+ ul ol ol,
59
+ ol ul ol,
60
+ ol ol ol {
61
+ list-style-type: lower-alpha;
62
+ }
63
+
64
+ dd {
65
+ margin-left: 0;
66
+ }
67
+
68
+ // Monospaced
69
+ // --------------------------------------------------
70
+
71
+ tt,
72
+ code,
73
+ samp {
74
+ font-family: $mono-font;
75
+ font-size: $font-size-small;
76
+ }
77
+
78
+ pre {
79
+ margin-top: 0;
80
+ margin-bottom: 0;
81
+ font-family: $mono-font;
82
+ font-size: $font-size-small;
83
+ }
84
+
85
+ // Octicons
86
+ // --------------------------------------------------
87
+
88
+ // Move this over here as a temporary override to the octicons source repo
89
+ // instead of updating that upstream.
90
+ .octicon {
91
+ vertical-align: text-bottom;
92
+ }
@@ -0,0 +1,6 @@
1
+ @import './color-modes/index.scss';
2
+ @import './support/index.scss';
3
+ @import './base/index.scss';
4
+ @import './truncate/index.scss';
5
+ @import './utilities/index.scss';
6
+
@@ -0,0 +1,10 @@
1
+ // variables
2
+ @import './variables/typography.scss';
3
+ @import './variables/layout.scss';
4
+ @import './variables/misc.scss';
5
+
6
+ // mixins
7
+ @import './mixins/color-modes.scss';
8
+ @import './mixins/typography.scss';
9
+ @import './mixins/layout.scss';
10
+ @import './mixins/misc.scss';