@papillonarts/css 0.1.0 → 0.3.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.
- package/build/index.scss +1 -3
- package/build/primer/base/base.scss +164 -0
- package/build/primer/base/index.scss +6 -0
- package/build/primer/base/kbd.scss +23 -0
- package/build/primer/base/normalize.scss +381 -0
- package/build/primer/base/octicons.scss +6 -0
- package/build/primer/base/typography-base.scss +92 -0
- package/build/primer/color-modes/index.scss +12 -0
- package/build/primer/color-modes/native.scss +22 -0
- package/build/primer/color-modes/themes/dark.scss +6 -0
- package/build/primer/color-modes/themes/dark_colorblind.scss +6 -0
- package/build/primer/color-modes/themes/dark_dimmed.scss +6 -0
- package/build/primer/color-modes/themes/dark_high_contrast.scss +6 -0
- package/build/primer/color-modes/themes/dark_tritanopia.scss +6 -0
- package/build/primer/color-modes/themes/light.scss +6 -0
- package/build/primer/color-modes/themes/light_colorblind.scss +6 -0
- package/build/primer/color-modes/themes/light_high_contrast.scss +6 -0
- package/build/primer/color-modes/themes/light_tritanopia.scss +6 -0
- package/build/primer/index.scss +6 -0
- package/build/primer/support/index.scss +10 -0
- package/build/primer/support/mixins/color-modes.scss +111 -0
- package/build/primer/support/mixins/layout.scss +61 -0
- package/build/primer/support/mixins/misc.scss +73 -0
- package/build/primer/support/mixins/typography.scss +93 -0
- package/build/primer/support/variables/layout.scss +230 -0
- package/build/primer/support/variables/misc.scss +18 -0
- package/build/primer/support/variables/typography.scss +43 -0
- package/build/primer/truncate/index.scss +2 -0
- package/build/primer/truncate/truncate.scss +66 -0
- package/build/primer/utilities/animations.scss +196 -0
- package/build/primer/utilities/borders.scss +78 -0
- package/build/primer/utilities/box-shadow.scss +27 -0
- package/build/primer/utilities/colors.scss +95 -0
- package/build/primer/utilities/details.scss +107 -0
- package/build/primer/utilities/flexbox.scss +54 -0
- package/build/primer/utilities/index.scss +14 -0
- package/build/primer/utilities/layout.scss +98 -0
- package/build/primer/utilities/margin.scss +74 -0
- package/build/primer/utilities/padding.scss +59 -0
- package/build/primer/utilities/typography.scss +335 -0
- package/build/primer/utilities/visibility-display.scss +125 -0
- package/package.json +2 -2
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
@import "../support/mixins/layout.scss";
|
|
2
|
+
|
|
3
|
+
// Layout
|
|
4
|
+
// stylelint-disable block-opening-brace-space-before, comment-empty-line-before
|
|
5
|
+
|
|
6
|
+
/* Position */
|
|
7
|
+
@each $breakpoint, $variant in $responsive-variants {
|
|
8
|
+
@include breakpoint($breakpoint) {
|
|
9
|
+
@each $position in $responsive-positions {
|
|
10
|
+
.position#{$variant}-#{$position} {
|
|
11
|
+
position: $position !important;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Final position */
|
|
18
|
+
@each $breakpoint, $variant in $responsive-variants {
|
|
19
|
+
@include breakpoint($breakpoint) {
|
|
20
|
+
.top#{$variant}-0 { top: 0 !important; }
|
|
21
|
+
.right#{$variant}-0 { right: 0 !important; }
|
|
22
|
+
.bottom#{$variant}-0 { bottom: 0 !important; }
|
|
23
|
+
.left#{$variant}-0 { left: 0 !important; }
|
|
24
|
+
.top#{$variant}-auto { top: auto !important; }
|
|
25
|
+
.right#{$variant}-auto { right: auto !important; }
|
|
26
|
+
.bottom#{$variant}-auto { bottom: auto !important; }
|
|
27
|
+
.left#{$variant}-auto { left: auto !important; }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Vertical align middle */
|
|
32
|
+
.v-align-middle { vertical-align: middle !important; }
|
|
33
|
+
/* Vertical align top */
|
|
34
|
+
.v-align-top { vertical-align: top !important; }
|
|
35
|
+
/* Vertical align bottom */
|
|
36
|
+
.v-align-bottom { vertical-align: bottom !important; }
|
|
37
|
+
/* Vertical align to the top of the text */
|
|
38
|
+
.v-align-text-top { vertical-align: text-top !important; }
|
|
39
|
+
/* Vertical align to the bottom of the text */
|
|
40
|
+
.v-align-text-bottom { vertical-align: text-bottom !important; }
|
|
41
|
+
/* Vertical align to the parent's baseline */
|
|
42
|
+
.v-align-baseline { vertical-align: baseline !important; }
|
|
43
|
+
|
|
44
|
+
// Overflow utilities
|
|
45
|
+
@each $breakpoint, $variant in $responsive-variants {
|
|
46
|
+
@include breakpoint($breakpoint) {
|
|
47
|
+
@each $overflow in (visible, hidden, auto, scroll) {
|
|
48
|
+
.overflow#{$variant}-#{$overflow} { overflow: $overflow !important; }
|
|
49
|
+
.overflow#{$variant}-x-#{$overflow} { overflow-x: $overflow !important; }
|
|
50
|
+
.overflow#{$variant}-y-#{$overflow} { overflow-y: $overflow !important; }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Clear floats
|
|
56
|
+
/* Clear floats around the element */
|
|
57
|
+
.clearfix {
|
|
58
|
+
@include clearfix;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Floats
|
|
62
|
+
@each $breakpoint, $variant in $responsive-variants {
|
|
63
|
+
@include breakpoint($breakpoint) {
|
|
64
|
+
/* Float to the left */
|
|
65
|
+
.float#{$variant}-left { float: left !important; }
|
|
66
|
+
/* Float to the right */
|
|
67
|
+
.float#{$variant}-right { float: right !important; }
|
|
68
|
+
/* No float */
|
|
69
|
+
.float#{$variant}-none { float: none !important; }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Width and height utilities, helpful in combination
|
|
74
|
+
// with display-table utilities and images
|
|
75
|
+
/* Max width 100% */
|
|
76
|
+
.width-fit { max-width: 100% !important; }
|
|
77
|
+
/* Set the width to 100% */
|
|
78
|
+
.width-full { width: 100% !important; }
|
|
79
|
+
/* Max height 100% */
|
|
80
|
+
.height-fit { max-height: 100% !important; }
|
|
81
|
+
/* Set the height to 100% */
|
|
82
|
+
.height-full { height: 100% !important; }
|
|
83
|
+
|
|
84
|
+
/* Remove min-width from element */
|
|
85
|
+
.min-width-0 { min-width: 0 !important; }
|
|
86
|
+
|
|
87
|
+
@each $breakpoint, $variant in $responsive-variants {
|
|
88
|
+
@include breakpoint($breakpoint) {
|
|
89
|
+
|
|
90
|
+
// Auto variants
|
|
91
|
+
.width#{$variant}-auto { width: auto !important; }
|
|
92
|
+
|
|
93
|
+
/* Set the direction to rtl */
|
|
94
|
+
.direction#{$variant}-rtl { direction: rtl !important; }
|
|
95
|
+
/* Set the direction to ltr */
|
|
96
|
+
.direction#{$variant}-ltr { direction: ltr !important; }
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
@import "../support/variables/layout.scss";
|
|
2
|
+
@import "../support/mixins/layout.scss";
|
|
3
|
+
|
|
4
|
+
// Margin spacer utilities
|
|
5
|
+
// stylelint-disable block-opening-brace-space-before
|
|
6
|
+
// stylelint-disable declaration-colon-space-before
|
|
7
|
+
// stylelint-disable comment-empty-line-before
|
|
8
|
+
// stylelint-disable primer/spacing
|
|
9
|
+
|
|
10
|
+
// Loop through the breakpoint values
|
|
11
|
+
@each $breakpoint, $variant in $responsive-variants {
|
|
12
|
+
@include breakpoint($breakpoint) {
|
|
13
|
+
// Loop through the spacer values
|
|
14
|
+
@each $scale, $size in $spacer-map-rem-extended {
|
|
15
|
+
@if ($scale < length($spacer-map-rem)) {
|
|
16
|
+
/* Set a $size margin to all sides at $breakpoint */
|
|
17
|
+
.m#{$variant}-#{$scale} { margin: $size !important; }
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Set a $size margin on the top at $breakpoint */
|
|
21
|
+
.mt#{$variant}-#{$scale} { margin-top: $size !important; }
|
|
22
|
+
/* Set a $size margin on the bottom at $breakpoint */
|
|
23
|
+
.mb#{$variant}-#{$scale} { margin-bottom: $size !important; }
|
|
24
|
+
|
|
25
|
+
@if ($scale < length($spacer-map-rem)) {
|
|
26
|
+
/* Set a $size margin on the right at $breakpoint */
|
|
27
|
+
.mr#{$variant}-#{$scale} { margin-right: $size !important; }
|
|
28
|
+
/* Set a $size margin on the left at $breakpoint */
|
|
29
|
+
.ml#{$variant}-#{$scale} { margin-left: $size !important; }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@if ($size != 0) {
|
|
33
|
+
/* Set a negative $size margin on top at $breakpoint */
|
|
34
|
+
.mt#{$variant}-n#{$scale} { margin-top: calc(-1 * $size) !important; }
|
|
35
|
+
/* Set a negative $size margin on the bottom at $breakpoint */
|
|
36
|
+
.mb#{$variant}-n#{$scale} { margin-bottom: calc(-1 * $size) !important; }
|
|
37
|
+
|
|
38
|
+
@if ($scale < length($spacer-map-rem)) {
|
|
39
|
+
/* Set a negative $size margin on the right at $breakpoint */
|
|
40
|
+
.mr#{$variant}-n#{$scale} { margin-right : calc(-1 * $size) !important; }
|
|
41
|
+
/* Set a negative $size margin on the left at $breakpoint */
|
|
42
|
+
.ml#{$variant}-n#{$scale} { margin-left : calc(-1 * $size) !important; }
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@if ($scale < length($spacer-map-rem)) {
|
|
47
|
+
/* Set a $size margin on the left & right at $breakpoint */
|
|
48
|
+
.mx#{$variant}-#{$scale} {
|
|
49
|
+
margin-right: $size !important;
|
|
50
|
+
margin-left: $size !important;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Set a $size margin on the top & bottom at $breakpoint */
|
|
55
|
+
.my#{$variant}-#{$scale} {
|
|
56
|
+
margin-top: $size !important;
|
|
57
|
+
margin-bottom: $size !important;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* responsive horizontal auto margins */
|
|
62
|
+
.mx#{$variant}-auto {
|
|
63
|
+
margin-right: auto !important;
|
|
64
|
+
margin-left: auto !important;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.m-auto { margin: auto !important; }
|
|
70
|
+
|
|
71
|
+
.mt-auto { margin-top: auto !important; }
|
|
72
|
+
.mr-auto { margin-right: auto !important; }
|
|
73
|
+
.mb-auto { margin-bottom: auto !important; }
|
|
74
|
+
.ml-auto { margin-left: auto !important; }
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@import "../support/variables/layout.scss";
|
|
2
|
+
@import "../support/mixins/layout.scss";
|
|
3
|
+
|
|
4
|
+
// Padding spacer utilities
|
|
5
|
+
// stylelint-disable block-opening-brace-space-before
|
|
6
|
+
// stylelint-disable comment-empty-line-before
|
|
7
|
+
// stylelint-disable primer/spacing
|
|
8
|
+
|
|
9
|
+
// Responsive padding spacer utilities
|
|
10
|
+
@each $breakpoint, $variant in $responsive-variants {
|
|
11
|
+
@include breakpoint($breakpoint) {
|
|
12
|
+
// Loop through the spacer values
|
|
13
|
+
@each $scale, $size in $spacer-map-rem-extended {
|
|
14
|
+
@if ($scale < length($spacer-map-rem)) {
|
|
15
|
+
/* Set a $size padding to all sides at $breakpoint */
|
|
16
|
+
.p#{$variant}-#{$scale} { padding: $size !important; }
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Set a $size padding to the top at $breakpoint */
|
|
20
|
+
.pt#{$variant}-#{$scale} { padding-top: $size !important; }
|
|
21
|
+
/* Set a $size padding to the right at $breakpoint */
|
|
22
|
+
.pr#{$variant}-#{$scale} { padding-right: $size !important; }
|
|
23
|
+
/* Set a $size padding to the bottom at $breakpoint */
|
|
24
|
+
.pb#{$variant}-#{$scale} { padding-bottom: $size !important; }
|
|
25
|
+
/* Set a $size padding to the left at $breakpoint */
|
|
26
|
+
.pl#{$variant}-#{$scale} { padding-left: $size !important; }
|
|
27
|
+
|
|
28
|
+
@if ($scale < length($spacer-map-rem)) {
|
|
29
|
+
/* Set a $size padding to the left & right at $breakpoint */
|
|
30
|
+
.px#{$variant}-#{$scale} {
|
|
31
|
+
padding-right: $size !important;
|
|
32
|
+
padding-left: $size !important;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Set a $size padding to the top & bottom at $breakpoint */
|
|
37
|
+
.py#{$variant}-#{$scale} {
|
|
38
|
+
padding-top: $size !important;
|
|
39
|
+
padding-bottom: $size !important;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// responsive padding for containers
|
|
46
|
+
.p-responsive {
|
|
47
|
+
padding-right: var(--base-size-16, $spacer-3) !important;
|
|
48
|
+
padding-left: var(--base-size-16, $spacer-3) !important;
|
|
49
|
+
|
|
50
|
+
@include breakpoint(sm) {
|
|
51
|
+
padding-right: var(--base-size-40, $spacer-6) !important;
|
|
52
|
+
padding-left: var(--base-size-40, $spacer-6) !important;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@include breakpoint(lg) {
|
|
56
|
+
padding-right: var(--base-size-16, $spacer-3) !important;
|
|
57
|
+
padding-left: var(--base-size-16, $spacer-3) !important;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
@import "../support/variables/typography.scss";
|
|
2
|
+
@import "../support/mixins/layout.scss";
|
|
3
|
+
|
|
4
|
+
// stylelint-disable comment-empty-line-before
|
|
5
|
+
|
|
6
|
+
// Type scale variables found in ../support/lib/variables.scss
|
|
7
|
+
// $h00-size-mobile: 40px;
|
|
8
|
+
// $h0-size-mobile: 32px;
|
|
9
|
+
// $h1-size-mobile: 26px;
|
|
10
|
+
// $h2-size-mobile: 22px;
|
|
11
|
+
// $h3-size-mobile: 18px;
|
|
12
|
+
// $h00-size: 48px;
|
|
13
|
+
// $h0-size: 40px;
|
|
14
|
+
// $h1-size: 32px;
|
|
15
|
+
// $h2-size: 24px;
|
|
16
|
+
// $h3-size: 20px;
|
|
17
|
+
// $h4-size: 16px;
|
|
18
|
+
// $h5-size: 14px;
|
|
19
|
+
// $h6-size: 12px;
|
|
20
|
+
|
|
21
|
+
/* Set the font size to 26px */
|
|
22
|
+
.h1 {
|
|
23
|
+
font-size: var(--h1-size-mobile, $h1-size-mobile) !important;
|
|
24
|
+
|
|
25
|
+
@include breakpoint(md) {
|
|
26
|
+
font-size: var(--h1-size, $h1-size) !important;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Set the font size to 22px */
|
|
31
|
+
.h2 {
|
|
32
|
+
font-size: var(--h2-size-mobile, $h2-size-mobile) !important;
|
|
33
|
+
|
|
34
|
+
@include breakpoint(md) {
|
|
35
|
+
font-size: var(--h2-size, $h2-size) !important;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Set the font size to 18px */
|
|
40
|
+
.h3 {
|
|
41
|
+
font-size: var(--h3-size-mobile, $h3-size-mobile) !important;
|
|
42
|
+
|
|
43
|
+
@include breakpoint(md) {
|
|
44
|
+
font-size: var(--h3-size, $h3-size) !important;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Set the font size to #{$h4-size} */
|
|
49
|
+
.h4 {
|
|
50
|
+
font-size: var(--h4-size, $h4-size) !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Set the font size to #{$h5-size} */
|
|
54
|
+
.h5 {
|
|
55
|
+
font-size: var(--h5-size, $h5-size) !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Does not include color property like typography base
|
|
59
|
+
// styles, color should be applied with color utilities.
|
|
60
|
+
/* Set the font size to #{$h6-size} */
|
|
61
|
+
.h6 {
|
|
62
|
+
font-size: var(--h6-size, $h6-size) !important;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Heading utilities
|
|
66
|
+
.h1,
|
|
67
|
+
.h2,
|
|
68
|
+
.h3,
|
|
69
|
+
.h4,
|
|
70
|
+
.h5,
|
|
71
|
+
.h6 {
|
|
72
|
+
font-weight: var(--base-text-weight-semibold, $font-weight-bold) !important;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Type utilities that match type sale
|
|
76
|
+
/* Set the font size to 26px */
|
|
77
|
+
.f1 {
|
|
78
|
+
font-size: var(--h1-size-mobile, $h1-size-mobile) !important;
|
|
79
|
+
|
|
80
|
+
@include breakpoint(md) {
|
|
81
|
+
font-size: var(--h1-size, $h1-size) !important;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Set the font size to 22px */
|
|
86
|
+
.f2 {
|
|
87
|
+
font-size: var(--h2-size-mobile, $h2-size-mobile) !important;
|
|
88
|
+
|
|
89
|
+
@include breakpoint(md) {
|
|
90
|
+
font-size: var(--h2-size, $h2-size) !important;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Set the font size to 18px */
|
|
95
|
+
.f3 {
|
|
96
|
+
font-size: var(--h3-size-mobile, $h3-size-mobile) !important;
|
|
97
|
+
|
|
98
|
+
@include breakpoint(md) {
|
|
99
|
+
font-size: var(--h3-size, $h3-size) !important;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Set the font size to #{$h4-size} */
|
|
104
|
+
.f4 {
|
|
105
|
+
font-size: var(--h4-size, $h4-size) !important;
|
|
106
|
+
|
|
107
|
+
@include breakpoint(md) {
|
|
108
|
+
font-size: var(--h4-size, $h4-size) !important;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Set the font size to #{$h5-size} */
|
|
113
|
+
.f5 {
|
|
114
|
+
font-size: var(--h5-size, $h5-size) !important;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Set the font size to #{$h6-size} */
|
|
118
|
+
.f6 {
|
|
119
|
+
font-size: var(--h6-size, $h6-size) !important;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Type utils with light weight that match type scale
|
|
123
|
+
/* Set the font size to 40px and weight to light */
|
|
124
|
+
.f00-light {
|
|
125
|
+
font-size: var(--h00-size-mobile, $h00-size-mobile) !important;
|
|
126
|
+
font-weight: var(--base-text-weight-light, $font-weight-light) !important;
|
|
127
|
+
|
|
128
|
+
@include breakpoint(md) {
|
|
129
|
+
font-size: var(--h00-size, $h00-size) !important;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Set the font size to 32px and weight to light */
|
|
134
|
+
.f0-light {
|
|
135
|
+
font-size: var(--h0-size-mobile, $h0-size-mobile) !important;
|
|
136
|
+
font-weight: var(--base-text-weight-light, $font-weight-light) !important;
|
|
137
|
+
|
|
138
|
+
@include breakpoint(md) {
|
|
139
|
+
font-size: var(--h0-size, $h0-size) !important;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Set the font size to 26px and weight to light */
|
|
144
|
+
.f1-light {
|
|
145
|
+
font-size: var(--h1-size-mobile, $h1-size-mobile) !important;
|
|
146
|
+
font-weight: var(--base-text-weight-light, $font-weight-light) !important;
|
|
147
|
+
|
|
148
|
+
@include breakpoint(md) {
|
|
149
|
+
font-size: var(--h1-size, $h1-size) !important;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Set the font size to 22px and weight to light */
|
|
154
|
+
.f2-light {
|
|
155
|
+
font-size: var(--h2-size-mobile, $h2-size-mobile) !important;
|
|
156
|
+
font-weight: var(--base-text-weight-light, $font-weight-light) !important;
|
|
157
|
+
|
|
158
|
+
@include breakpoint(md) {
|
|
159
|
+
font-size: var(--h2-size, $h2-size) !important;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Same size and weight as .lead but without color property
|
|
164
|
+
/* Set the font size to 18px and weight to light */
|
|
165
|
+
.f3-light {
|
|
166
|
+
font-size: var(--h3-size-mobile, $h3-size-mobile) !important;
|
|
167
|
+
font-weight: var(--base-text-weight-light, $font-weight-light) !important;
|
|
168
|
+
|
|
169
|
+
@include breakpoint(md) {
|
|
170
|
+
font-size: var(--h3-size, $h3-size) !important;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// Smallest text size
|
|
175
|
+
/* Set the font size to ${#h6-size} */
|
|
176
|
+
.text-small {
|
|
177
|
+
font-size: var(--h6-size, $h6-size) !important;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// 12px
|
|
181
|
+
|
|
182
|
+
/* Large leading paragraphs */
|
|
183
|
+
.lead {
|
|
184
|
+
// stylelint-disable-next-line primer/spacing
|
|
185
|
+
margin-bottom: 30px;
|
|
186
|
+
font-size: var(--h3-size, $h3-size);
|
|
187
|
+
font-weight: var(--base-text-weight-light, $font-weight-light);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// Line-height variations
|
|
191
|
+
// Close to commonly used line-heights. Most line-heights
|
|
192
|
+
// combined with type size equate to whole pixels.
|
|
193
|
+
// Will be improved with future typography scale updates.
|
|
194
|
+
// Responsive line-height
|
|
195
|
+
@each $breakpoint, $variant in $responsive-variants {
|
|
196
|
+
@include breakpoint($breakpoint) {
|
|
197
|
+
|
|
198
|
+
/* Set the line height to ultra condensed */
|
|
199
|
+
.lh#{$variant}-condensed-ultra {
|
|
200
|
+
line-height: $lh-condensed-ultra !important;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* Set the line height to condensed */
|
|
204
|
+
.lh#{$variant}-condensed {
|
|
205
|
+
line-height: $lh-condensed !important;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* Set the line height to default */
|
|
209
|
+
.lh#{$variant}-default {
|
|
210
|
+
line-height: $lh-default !important;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* Set the line height to zero */
|
|
214
|
+
.lh#{$variant}-0 {
|
|
215
|
+
line-height: 0 !important;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// Text alignments
|
|
221
|
+
// Responsive text alignment
|
|
222
|
+
@each $breakpoint, $variant in $responsive-variants {
|
|
223
|
+
@include breakpoint($breakpoint) {
|
|
224
|
+
|
|
225
|
+
/* Text align to the right */
|
|
226
|
+
.text#{$variant}-right {
|
|
227
|
+
text-align: right !important;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* Text align to the left */
|
|
231
|
+
.text#{$variant}-left {
|
|
232
|
+
text-align: left !important;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* Text align to the center */
|
|
236
|
+
.text#{$variant}-center {
|
|
237
|
+
text-align: center !important;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// Text styles
|
|
243
|
+
/* Set the font weight to normal */
|
|
244
|
+
.text-normal {
|
|
245
|
+
font-weight: $font-weight-normal !important;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/* Set the font weight to bold */
|
|
249
|
+
.text-bold {
|
|
250
|
+
font-weight: $font-weight-bold !important;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.text-semibold {
|
|
254
|
+
font-weight: $font-weight-semibold !important;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.text-light {
|
|
258
|
+
font-weight: $font-weight-light !important;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/* Set the font to italic */
|
|
262
|
+
.text-italic {
|
|
263
|
+
font-style: italic !important;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/* Make text uppercase */
|
|
267
|
+
.text-uppercase {
|
|
268
|
+
text-transform: uppercase !important;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/* Underline text */
|
|
272
|
+
.text-underline {
|
|
273
|
+
text-decoration: underline !important;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/* Don't underline text */
|
|
277
|
+
.no-underline {
|
|
278
|
+
text-decoration: none !important;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/* Don't wrap white space */
|
|
282
|
+
.no-wrap {
|
|
283
|
+
white-space: nowrap !important;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/* Normal white space */
|
|
287
|
+
.ws-normal {
|
|
288
|
+
white-space: normal !important;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/* Force long "words" to wrap if they exceed the width of the container */
|
|
292
|
+
.wb-break-word {
|
|
293
|
+
word-break: break-word !important;
|
|
294
|
+
// this is for backwards compatibility with browsers that don't respect overflow-wrap
|
|
295
|
+
word-wrap: break-word !important;
|
|
296
|
+
overflow-wrap: break-word !important;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/*
|
|
300
|
+
* Specifically apply word-break: break-all; per MDN:
|
|
301
|
+
*
|
|
302
|
+
* > Note: In contrast to `word-break: break-word` and `overflow-wrap: break-word`,
|
|
303
|
+
* > `word-break: break-all` will create a break at the exact place where text would
|
|
304
|
+
* > otherwise overflow its container (even if putting an entire word on its own line
|
|
305
|
+
* > would negate the need for a break).
|
|
306
|
+
*
|
|
307
|
+
* see: https://developer.mozilla.org/en-US/docs/Web/CSS/word-break#Values
|
|
308
|
+
*/
|
|
309
|
+
.wb-break-all {
|
|
310
|
+
word-break: break-all !important;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.text-emphasized {
|
|
314
|
+
font-weight: var(--base-text-weight-semibold, $font-weight-bold);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// List styles
|
|
318
|
+
.list-style-none {
|
|
319
|
+
list-style: none !important;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/* Set to monospace font */
|
|
323
|
+
.text-mono {
|
|
324
|
+
font-family: $mono-font !important;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/* Disallow user from selecting text */
|
|
328
|
+
.user-select-none {
|
|
329
|
+
user-select: none !important;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/* Make text capitalized (transforms first character to uppercase) */
|
|
333
|
+
.text-capitalize {
|
|
334
|
+
text-transform: capitalize !important;
|
|
335
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
@import "../support/mixins/layout.scss";
|
|
2
|
+
|
|
3
|
+
// Visibility and display utilities
|
|
4
|
+
|
|
5
|
+
// Responsive display utilities
|
|
6
|
+
@each $breakpoint, $variant in $responsive-variants {
|
|
7
|
+
@include breakpoint($breakpoint) {
|
|
8
|
+
@each $display in $display-values {
|
|
9
|
+
.d#{$variant}-#{$display} { display: $display !important; }
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.v-hidden { visibility: hidden !important; }
|
|
15
|
+
.v-visible { visibility: visible !important; }
|
|
16
|
+
|
|
17
|
+
// Hide utilities for each breakpoint
|
|
18
|
+
// Each hide utility only applies to one breakpoint range.
|
|
19
|
+
@media (max-width: $width-sm - 0.02px) {
|
|
20
|
+
.hide-sm {
|
|
21
|
+
display: none !important;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@media (min-width: $width-sm) and (max-width: $width-md - 0.02px) {
|
|
26
|
+
.hide-md {
|
|
27
|
+
display: none !important;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@media (min-width: $width-md) and (max-width: $width-lg - 0.02px) {
|
|
32
|
+
.hide-lg {
|
|
33
|
+
display: none !important;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media (min-width: $width-lg) {
|
|
38
|
+
.hide-xl {
|
|
39
|
+
display: none !important;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Show/Hide Viewport range utilities
|
|
44
|
+
|
|
45
|
+
.show-whenNarrow,
|
|
46
|
+
.show-whenRegular,
|
|
47
|
+
.show-whenWide,
|
|
48
|
+
.show-whenRegular.hide-whenWide {
|
|
49
|
+
display: none !important;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.hide-whenNarrow,
|
|
53
|
+
.hide-whenRegular,
|
|
54
|
+
.hide-whenWide {
|
|
55
|
+
display: block !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@media (max-width: $width-md - 0.02px) {
|
|
59
|
+
.show-whenNarrow {
|
|
60
|
+
display: block !important;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.hide-whenNarrow {
|
|
64
|
+
display: none !important;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@media (min-width: $width-md) {
|
|
69
|
+
.show-whenRegular,
|
|
70
|
+
.show-whenRegular.hide-whenWide {
|
|
71
|
+
display: block !important;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.hide-whenRegular {
|
|
75
|
+
display: none !important;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// The width of a `wide` viewport range may change as we're finalizing
|
|
80
|
+
// the Primer primitives viewport ranges proposal
|
|
81
|
+
@media (min-width: $width-xl) {
|
|
82
|
+
.show-whenWide {
|
|
83
|
+
display: block !important;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.hide-whenWide,
|
|
87
|
+
.show-whenRegular.hide-whenWide {
|
|
88
|
+
display: none !important;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Set the table-layout to fixed */
|
|
93
|
+
.table-fixed { table-layout: fixed !important; }
|
|
94
|
+
|
|
95
|
+
// Only display content to screen readers
|
|
96
|
+
//
|
|
97
|
+
// See: http://a11yproject.com/posts/how-to-hide-content/
|
|
98
|
+
.sr-only {
|
|
99
|
+
position: absolute;
|
|
100
|
+
width: 1px;
|
|
101
|
+
height: 1px;
|
|
102
|
+
padding: 0;
|
|
103
|
+
overflow: hidden;
|
|
104
|
+
clip: rect(0, 0, 0, 0);
|
|
105
|
+
// Workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=1241631
|
|
106
|
+
word-wrap: normal;
|
|
107
|
+
border: 0;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Only display content on focus
|
|
111
|
+
.show-on-focus {
|
|
112
|
+
position: absolute;
|
|
113
|
+
width: 1px;
|
|
114
|
+
height: 1px;
|
|
115
|
+
margin: 0;
|
|
116
|
+
overflow: hidden;
|
|
117
|
+
clip: rect(1px, 1px, 1px, 1px);
|
|
118
|
+
|
|
119
|
+
&:focus {
|
|
120
|
+
z-index: 999;
|
|
121
|
+
width: auto;
|
|
122
|
+
height: auto;
|
|
123
|
+
clip: auto;
|
|
124
|
+
}
|
|
125
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papillonarts/css",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Papillon Arts CSS",
|
|
5
5
|
"homepage": "https://github.com/papillonarts/papillonarts/tree/master/packages/css",
|
|
6
6
|
"repository": {
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"build-acceptance": "npm run build",
|
|
24
24
|
"build-release": "npm run build"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "64407ff0b9f2aa1999382316603c419f2b51bfe2"
|
|
27
27
|
}
|