@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.
Files changed (42) hide show
  1. package/build/index.scss +1 -3
  2. package/build/primer/base/base.scss +164 -0
  3. package/build/primer/base/index.scss +6 -0
  4. package/build/primer/base/kbd.scss +23 -0
  5. package/build/primer/base/normalize.scss +381 -0
  6. package/build/primer/base/octicons.scss +6 -0
  7. package/build/primer/base/typography-base.scss +92 -0
  8. package/build/primer/color-modes/index.scss +12 -0
  9. package/build/primer/color-modes/native.scss +22 -0
  10. package/build/primer/color-modes/themes/dark.scss +6 -0
  11. package/build/primer/color-modes/themes/dark_colorblind.scss +6 -0
  12. package/build/primer/color-modes/themes/dark_dimmed.scss +6 -0
  13. package/build/primer/color-modes/themes/dark_high_contrast.scss +6 -0
  14. package/build/primer/color-modes/themes/dark_tritanopia.scss +6 -0
  15. package/build/primer/color-modes/themes/light.scss +6 -0
  16. package/build/primer/color-modes/themes/light_colorblind.scss +6 -0
  17. package/build/primer/color-modes/themes/light_high_contrast.scss +6 -0
  18. package/build/primer/color-modes/themes/light_tritanopia.scss +6 -0
  19. package/build/primer/index.scss +6 -0
  20. package/build/primer/support/index.scss +10 -0
  21. package/build/primer/support/mixins/color-modes.scss +111 -0
  22. package/build/primer/support/mixins/layout.scss +61 -0
  23. package/build/primer/support/mixins/misc.scss +73 -0
  24. package/build/primer/support/mixins/typography.scss +93 -0
  25. package/build/primer/support/variables/layout.scss +230 -0
  26. package/build/primer/support/variables/misc.scss +18 -0
  27. package/build/primer/support/variables/typography.scss +43 -0
  28. package/build/primer/truncate/index.scss +2 -0
  29. package/build/primer/truncate/truncate.scss +66 -0
  30. package/build/primer/utilities/animations.scss +196 -0
  31. package/build/primer/utilities/borders.scss +78 -0
  32. package/build/primer/utilities/box-shadow.scss +27 -0
  33. package/build/primer/utilities/colors.scss +95 -0
  34. package/build/primer/utilities/details.scss +107 -0
  35. package/build/primer/utilities/flexbox.scss +54 -0
  36. package/build/primer/utilities/index.scss +14 -0
  37. package/build/primer/utilities/layout.scss +98 -0
  38. package/build/primer/utilities/margin.scss +74 -0
  39. package/build/primer/utilities/padding.scss +59 -0
  40. package/build/primer/utilities/typography.scss +335 -0
  41. package/build/primer/utilities/visibility-display.scss +125 -0
  42. package/package.json +2 -2
@@ -0,0 +1,43 @@
1
+ // Typography variables
2
+
3
+ // Heading sizes - mobile
4
+ // h4-h6 remain the same size on both mobile & desktop
5
+ $h00-size-mobile: 40px !default;
6
+ $h0-size-mobile: 32px !default;
7
+ $h1-size-mobile: 26px !default;
8
+ $h2-size-mobile: 22px !default;
9
+ $h3-size-mobile: 18px !default;
10
+
11
+ // Heading sizes - desktop
12
+ $h00-size: 48px !default;
13
+ $h0-size: 40px !default;
14
+ $h1-size: 32px !default;
15
+ $h2-size: 24px !default;
16
+ $h3-size: 20px !default;
17
+ $h4-size: 16px !default;
18
+ $h5-size: 14px !default;
19
+ $h6-size: 12px !default;
20
+
21
+ $font-size-small: 12px !default;
22
+
23
+ // Font weights
24
+ $font-weight-bold: var(--base-text-weight-semibold, 600) !default;
25
+ $font-weight-semibold: var(--base-text-weight-medium, 500) !default;
26
+ $font-weight-normal: var(--base-text-weight-normal, 400) !default;
27
+ $font-weight-light: var(--base-text-weight-light, 300) !default;
28
+
29
+ // Line heights
30
+ $lh-condensed-ultra: 1 !default;
31
+ $lh-condensed: 1.25 !default;
32
+ $lh-default: 1.5 !default;
33
+
34
+ // Font stacks
35
+ $body-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji' !default;
36
+
37
+ // Monospace font stack
38
+ // Note: SFMono-Regular needs to come before SF Mono to fix an older version of the font in Chrome
39
+ $mono-font: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace !default;
40
+
41
+ // The base body size
42
+ $body-font-size: 14px !default;
43
+ $body-line-height: $lh-default !default;
@@ -0,0 +1,2 @@
1
+ @import '../support/index.scss';
2
+ @import './truncate.scss';
@@ -0,0 +1,66 @@
1
+ // https://raw.githubusercontent.com/primer/view_components/main/app/components/primer/truncate.pcss
2
+
3
+ /* CSS truncate */
4
+
5
+ /* css-truncate will shorten text with an ellipsis. */
6
+
7
+ .css-truncate {
8
+ /* css-truncate-overflow will shorten text with an ellipsis when overflowing */
9
+ &.css-truncate-overflow,
10
+ & .css-truncate-overflow,
11
+ &.css-truncate-target,
12
+ & .css-truncate-target {
13
+ overflow: hidden;
14
+ text-overflow: ellipsis;
15
+ white-space: nowrap;
16
+ }
17
+
18
+ /* css-truncate-target will shorten text with an ellipsis and a max width */
19
+ &.css-truncate-target,
20
+ & .css-truncate-target {
21
+ display: inline-block;
22
+ max-width: 125px;
23
+ vertical-align: top;
24
+ }
25
+
26
+ &.expandable.zeroclipboard-is-hover .css-truncate-target,
27
+ &.expandable.zeroclipboard-is-hover.css-truncate-target,
28
+ &.expandable:hover .css-truncate-target,
29
+ &.expandable:hover.css-truncate-target {
30
+ max-width: 10000px !important;
31
+ }
32
+ }
33
+
34
+ // https://raw.githubusercontent.com/primer/view_components/main/app/components/primer/beta/truncate.pcss
35
+
36
+ // /* Truncate */
37
+
38
+ .Truncate {
39
+ display: inline-flex;
40
+ min-width: 0;
41
+ max-width: 100%;
42
+
43
+ & > .Truncate-text {
44
+ min-width: 1ch;
45
+ max-width: fit-content;
46
+ overflow: hidden;
47
+ text-overflow: ellipsis;
48
+ white-space: nowrap;
49
+
50
+ & + .Truncate-text {
51
+ margin-left: var(--primer-control-small-gap, 4px);
52
+ }
53
+
54
+ &.Truncate-text--primary {
55
+ flex-basis: 200%;
56
+ }
57
+
58
+ &.Truncate-text--expandable:hover,
59
+ &.Truncate-text--expandable:focus,
60
+ &.Truncate-text--expandable:active {
61
+ max-width: 100% !important;
62
+ flex-shrink: 0;
63
+ cursor: pointer;
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,196 @@
1
+ // This file contains reusable animations for github.
2
+
3
+ /* Fade in an element */
4
+ .anim-fade-in {
5
+ animation-name: fade-in;
6
+ animation-duration: 1s;
7
+ animation-timing-function: ease-in-out;
8
+
9
+ &.fast {
10
+ animation-duration: 300ms;
11
+ }
12
+ }
13
+
14
+ @keyframes fade-in {
15
+ 0% {
16
+ opacity: 0;
17
+ }
18
+
19
+ 100% {
20
+ opacity: 1;
21
+ }
22
+ }
23
+
24
+ /* Fade out an element */
25
+ .anim-fade-out {
26
+ animation-name: fade-out;
27
+ animation-duration: 1s;
28
+ animation-fill-mode: forwards;
29
+ animation-timing-function: ease-out;
30
+
31
+ &.fast {
32
+ animation-duration: 0.3s;
33
+ }
34
+ }
35
+
36
+ @keyframes fade-out {
37
+ 0% {
38
+ opacity: 1;
39
+ }
40
+
41
+ 100% {
42
+ opacity: 0;
43
+ }
44
+ }
45
+
46
+ /* Fade in and slide up an element */
47
+ .anim-fade-up {
48
+ opacity: 0;
49
+ animation-name: fade-up;
50
+ animation-duration: 0.3s;
51
+ animation-fill-mode: forwards;
52
+ animation-timing-function: ease-out;
53
+ animation-delay: 1s;
54
+ }
55
+
56
+ @keyframes fade-up {
57
+ 0% {
58
+ opacity: 0.8;
59
+ transform: translateY(100%);
60
+ }
61
+
62
+ 100% {
63
+ opacity: 1;
64
+ transform: translateY(0);
65
+ }
66
+ }
67
+
68
+ /* Fade an element out and slide down */
69
+ .anim-fade-down {
70
+ animation-name: fade-down;
71
+ animation-duration: 0.3s;
72
+ animation-fill-mode: forwards;
73
+ animation-timing-function: ease-in;
74
+ }
75
+
76
+ @keyframes fade-down {
77
+ 0% {
78
+ opacity: 1;
79
+ transform: translateY(0);
80
+ }
81
+
82
+ 100% {
83
+ opacity: 0.5;
84
+ transform: translateY(100%);
85
+ }
86
+ }
87
+
88
+ /* Grow an element width from 0 to 100% */
89
+ .anim-grow-x {
90
+ width: 0%;
91
+ animation-name: grow-x;
92
+ animation-duration: 0.3s;
93
+ animation-fill-mode: forwards;
94
+ animation-timing-function: ease;
95
+ animation-delay: 0.5s;
96
+ }
97
+
98
+ @keyframes grow-x {
99
+ to { width: 100%; }
100
+ }
101
+
102
+ /* Shrink an element from 100% to 0% */
103
+ .anim-shrink-x {
104
+ animation-name: shrink-x;
105
+ animation-duration: 0.3s;
106
+ animation-fill-mode: forwards;
107
+ animation-timing-function: ease-in-out;
108
+ animation-delay: 0.5s;
109
+ }
110
+
111
+ @keyframes shrink-x {
112
+ to { width: 0%; }
113
+ }
114
+
115
+ /* Fade in an element and scale it fast */
116
+ .anim-scale-in {
117
+ animation-name: scale-in;
118
+ animation-duration: 0.15s;
119
+ animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);
120
+ }
121
+
122
+ @keyframes scale-in {
123
+ 0% {
124
+ opacity: 0;
125
+ transform: scale(0.5);
126
+ }
127
+
128
+ 100% {
129
+ opacity: 1;
130
+ transform: scale(1);
131
+ }
132
+ }
133
+
134
+ /* Pulse an element's opacity */
135
+ .anim-pulse {
136
+ animation-name: pulse;
137
+ animation-duration: 2s;
138
+ animation-timing-function: linear;
139
+ animation-iteration-count: infinite;
140
+ }
141
+
142
+ @keyframes pulse {
143
+ 0% {
144
+ opacity: 0.3;
145
+ }
146
+
147
+ 10% {
148
+ opacity: 1;
149
+ }
150
+
151
+ 100% {
152
+ opacity: 0.3;
153
+ }
154
+ }
155
+
156
+ /* Pulse in an element */
157
+ .anim-pulse-in {
158
+ animation-name: pulse-in;
159
+ animation-duration: 0.5s;
160
+ }
161
+
162
+ @keyframes pulse-in {
163
+ 0% {
164
+ transform: scale3d(1, 1, 1);
165
+ }
166
+
167
+ 50% {
168
+ transform: scale3d(1.1, 1.1, 1.1);
169
+ }
170
+
171
+ 100% {
172
+ transform: scale3d(1, 1, 1);
173
+ }
174
+ }
175
+
176
+ /* Increase scale of an element on hover */
177
+ .hover-grow,
178
+ .anim-hover-grow {
179
+ transition: transform 0.3s;
180
+ backface-visibility: hidden;
181
+
182
+ &:hover {
183
+ transform: scale(1.025);
184
+ }
185
+ }
186
+
187
+ /* Rotate an element 360 degrees over and over, used for spinners */
188
+ .anim-rotate {
189
+ animation: rotate-keyframes 1s linear infinite;
190
+ }
191
+
192
+ @keyframes rotate-keyframes {
193
+ 100% {
194
+ transform: rotate(360deg);
195
+ }
196
+ }
@@ -0,0 +1,78 @@
1
+ @import "../support/variables/misc.scss";
2
+ @import "../support/variables/layout.scss";
3
+ @import "../support/mixins/layout.scss";
4
+
5
+ // Core border utilities
6
+ // stylelint-disable block-opening-brace-space-before
7
+
8
+ /* Add a gray border to the left and right */
9
+ .border-x {
10
+ border-right: $border !important;
11
+ border-left: $border !important;
12
+ }
13
+
14
+ /* Add a gray border to the top and bottom */
15
+ .border-y {
16
+ border-top: $border !important;
17
+ border-bottom: $border !important;
18
+ }
19
+
20
+ /* Responsive gray borders */
21
+ @each $breakpoint, $variant in $responsive-variants {
22
+ @include breakpoint($breakpoint) {
23
+ /* Add a gray border on all sides at/above this breakpoint */
24
+ .border#{$variant} { border: $border !important; }
25
+ .border#{$variant}-0 { border: 0 !important; }
26
+
27
+ .border#{$variant}-top { border-top: $border !important; }
28
+ .border#{$variant}-right { border-right: $border !important; }
29
+ .border#{$variant}-bottom { border-bottom: $border !important; }
30
+ .border#{$variant}-left { border-left: $border !important; }
31
+
32
+ .border#{$variant}-top-0 { border-top: 0 !important; }
33
+ .border#{$variant}-right-0 { border-right: 0 !important; }
34
+ .border#{$variant}-bottom-0 { border-bottom: 0 !important; }
35
+ .border#{$variant}-left-0 { border-left: 0 !important; }
36
+
37
+ // Rounded corners
38
+ .rounded#{$variant} { border-radius: var(--primer-borderRadius-medium, $border-radius-2) !important; }
39
+ .rounded#{$variant}-0 { border-radius: 0 !important; }
40
+ .rounded#{$variant}-1 { border-radius: var(--primer-borderRadius-small, $border-radius-1) !important; }
41
+ .rounded#{$variant}-2 { border-radius: var(--primer-borderRadius-medium, $border-radius-2) !important; }
42
+ .rounded#{$variant}-3 { border-radius: var(--primer-borderRadius-large, $border-radius-3) !important; }
43
+
44
+ @each $edge, $corners in $edges {
45
+ .rounded#{$variant}-#{$edge}-0 {
46
+ @each $corner in $corners {
47
+ border-#{$corner}-radius: 0 !important;
48
+ }
49
+ }
50
+
51
+ .rounded#{$variant}-#{$edge}-1 {
52
+ @each $corner in $corners {
53
+ border-#{$corner}-radius: var(--primer-borderRadius-small, $border-radius-1) !important;
54
+ }
55
+ }
56
+
57
+ .rounded#{$variant}-#{$edge}-2 {
58
+ @each $corner in $corners {
59
+ border-#{$corner}-radius: var(--primer-borderRadius-medium, $border-radius-2) !important;
60
+ }
61
+ }
62
+
63
+ .rounded#{$variant}-#{$edge}-3 {
64
+ @each $corner in $corners {
65
+ border-#{$corner}-radius: var(--primer-borderRadius-medium, $border-radius-3) !important;
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }
71
+
72
+ /* Add a 50% border-radius to make something into a circle */
73
+ .circle { border-radius: var(--primer-borderRadius-full, 50%) !important; }
74
+
75
+ /* Change the border style to dashed, in conjunction with another utility */
76
+ .border-dashed {
77
+ border-style: dashed !important;
78
+ }
@@ -0,0 +1,27 @@
1
+ @import "../support/variables/misc.scss";
2
+
3
+ // Box shadow utilities
4
+
5
+ // Box shadows
6
+
7
+ .color-shadow-small {
8
+ box-shadow: var(--color-shadow-small) !important;
9
+ }
10
+
11
+ .color-shadow-medium {
12
+ box-shadow: var(--color-shadow-medium) !important;
13
+ }
14
+
15
+ .color-shadow-large {
16
+ box-shadow: var(--color-shadow-large) !important;
17
+ }
18
+
19
+ .color-shadow-extra-large {
20
+ box-shadow: var(--color-shadow-extra-large) !important;
21
+ }
22
+
23
+ // Turn off box shadow
24
+
25
+ .box-shadow-none {
26
+ box-shadow: none !important;
27
+ }
@@ -0,0 +1,95 @@
1
+ // stylelint-disable block-opening-brace-space-before
2
+
3
+ // Foreground
4
+
5
+ .color-fg-default { color: var(--color-fg-default) !important; }
6
+ .color-fg-muted { color: var(--color-fg-muted) !important; }
7
+ .color-fg-subtle { color: var(--color-fg-subtle) !important; }
8
+
9
+ .color-fg-accent { color: var(--color-accent-fg) !important; }
10
+ .color-fg-success { color: var(--color-success-fg) !important; }
11
+ .color-fg-attention { color: var(--color-attention-fg) !important; }
12
+ .color-fg-severe { color: var(--color-severe-fg) !important; }
13
+ .color-fg-danger { color: var(--color-danger-fg) !important; }
14
+ .color-fg-open { color: var(--color-open-fg) !important; }
15
+ .color-fg-closed { color: var(--color-closed-fg) !important; }
16
+ .color-fg-done { color: var(--color-done-fg) !important; }
17
+ .color-fg-sponsors { color: var(--color-sponsors-fg) !important; }
18
+
19
+ .color-fg-on-emphasis { color: var(--color-fg-on-emphasis) !important; }
20
+
21
+ // Background
22
+
23
+ .color-bg-default { background-color: var(--color-canvas-default) !important; }
24
+ .color-bg-overlay { background-color: var(--color-canvas-overlay) !important; }
25
+ .color-bg-inset { background-color: var(--color-canvas-inset) !important; }
26
+ .color-bg-subtle { background-color: var(--color-canvas-subtle) !important; }
27
+ .color-bg-emphasis { background-color: var(--color-neutral-emphasis-plus) !important; }
28
+
29
+ .color-bg-accent { background-color: var(--color-accent-subtle) !important; }
30
+ .color-bg-accent-emphasis { background-color: var(--color-accent-emphasis) !important; }
31
+
32
+ .color-bg-success { background-color: var(--color-success-subtle) !important; }
33
+ .color-bg-success-emphasis { background-color: var(--color-success-emphasis) !important; }
34
+
35
+ .color-bg-attention { background-color: var(--color-attention-subtle) !important; }
36
+ .color-bg-attention-emphasis { background-color: var(--color-attention-emphasis) !important; }
37
+
38
+ .color-bg-severe { background-color: var(--color-severe-subtle) !important; }
39
+ .color-bg-severe-emphasis { background-color: var(--color-severe-emphasis) !important; }
40
+
41
+ .color-bg-danger { background-color: var(--color-danger-subtle) !important; }
42
+ .color-bg-danger-emphasis { background-color: var(--color-danger-emphasis) !important; }
43
+
44
+ .color-bg-open { background-color: var(--color-open-subtle) !important; }
45
+ .color-bg-open-emphasis { background-color: var(--color-open-emphasis) !important; }
46
+
47
+ .color-bg-closed { background-color: var(--color-closed-subtle) !important; }
48
+ .color-bg-closed-emphasis { background-color: var(--color-closed-emphasis) !important; }
49
+
50
+ .color-bg-done { background-color: var(--color-done-subtle) !important; }
51
+ .color-bg-done-emphasis { background-color: var(--color-done-emphasis) !important; }
52
+
53
+ .color-bg-sponsors { background-color: var(--color-sponsors-subtle) !important; }
54
+ .color-bg-sponsors-emphasis { background-color: var(--color-sponsors-emphasis) !important; }
55
+
56
+ .color-bg-transparent { background-color: transparent !important; }
57
+
58
+ // Border
59
+
60
+ .color-border-default { border-color: var(--color-border-default) !important; }
61
+ .color-border-muted { border-color: var(--color-border-muted) !important; }
62
+ .color-border-subtle { border-color: var(--color-border-subtle) !important; }
63
+
64
+ .color-border-accent { border-color: var(--color-accent-muted) !important; }
65
+ .color-border-accent-emphasis { border-color: var(--color-accent-emphasis) !important; }
66
+
67
+ .color-border-success { border-color: var(--color-success-muted) !important; }
68
+ .color-border-success-emphasis { border-color: var(--color-success-emphasis) !important; }
69
+
70
+ .color-border-attention { border-color: var(--color-attention-muted) !important; }
71
+ .color-border-attention-emphasis { border-color: var(--color-attention-emphasis) !important; }
72
+
73
+ .color-border-severe { border-color: var(--color-severe-muted) !important; }
74
+ .color-border-severe-emphasis { border-color: var(--color-severe-emphasis) !important; }
75
+
76
+ .color-border-danger { border-color: var(--color-danger-muted) !important; }
77
+ .color-border-danger-emphasis { border-color: var(--color-danger-emphasis) !important; }
78
+
79
+ .color-border-open { border-color: var(--color-open-muted) !important; }
80
+ .color-border-open-emphasis { border-color: var(--color-open-emphasis) !important; }
81
+
82
+ .color-border-closed { border-color: var(--color-closed-muted) !important; }
83
+ .color-border-closed-emphasis { border-color: var(--color-closed-emphasis) !important; }
84
+
85
+ .color-border-done { border-color: var(--color-done-muted) !important; }
86
+ .color-border-done-emphasis { border-color: var(--color-done-emphasis) !important; }
87
+
88
+ .color-border-sponsors { border-color: var(--color-sponsors-muted) !important; }
89
+ .color-border-sponsors-emphasis { border-color: var(--color-sponsors-emphasis) !important; }
90
+
91
+ // Misc
92
+
93
+ .color-fg-inherit {
94
+ color: inherit !important;
95
+ }
@@ -0,0 +1,107 @@
1
+ @import "../support/mixins/misc.scss";
2
+
3
+ // stylelint-disable selector-max-type, selector-max-specificity, max-nesting-depth, selector-no-qualifying-type
4
+
5
+ .details-overlay[open] > summary::before {
6
+ position: fixed;
7
+ top: 0;
8
+ right: 0;
9
+ bottom: 0;
10
+ left: 0;
11
+ z-index: 80;
12
+ display: block;
13
+ cursor: default;
14
+ content: ' ';
15
+ background: transparent;
16
+ }
17
+
18
+ .details-overlay-dark[open] > summary::before {
19
+ z-index: 111;
20
+ background: var(--color-primer-canvas-backdrop);
21
+ }
22
+
23
+ .details-reset {
24
+ // Remove marker added by the display: list-item browser default
25
+ > summary {
26
+ list-style: none;
27
+ transition: 80ms cubic-bezier(0.33, 1, 0.68, 1);
28
+ transition-property: color, background-color, box-shadow, border-color;
29
+ // fallback :focus state
30
+ &:focus {
31
+ @include focusOutline;
32
+
33
+ // remove fallback :focus if :focus-visible is supported
34
+ &:not(:focus-visible) {
35
+ outline: solid 1px transparent;
36
+ }
37
+ }
38
+
39
+ // default focus state
40
+ &:focus-visible {
41
+ @include focusOutline;
42
+ }
43
+
44
+ &.btn-primary {
45
+ // fallback :focus state
46
+ &:focus {
47
+ @include focusOutlineOnEmphasis;
48
+
49
+ // remove fallback :focus if :focus-visible is supported
50
+ &:not(:focus-visible) {
51
+ outline: solid 1px transparent;
52
+ box-shadow: none;
53
+ }
54
+ }
55
+
56
+ // default focus state
57
+ &:focus-visible {
58
+ @include focusOutlineOnEmphasis;
59
+ }
60
+ }
61
+ }
62
+ // Remove marker added by details polyfill
63
+ > summary::before {
64
+ display: none;
65
+ }
66
+ // Remove marker added by Chrome
67
+ > summary::-webkit-details-marker {
68
+ display: none;
69
+ }
70
+ }
71
+
72
+ .details-overlay > summary {
73
+ transition: 80ms cubic-bezier(0.33, 1, 0.68, 1);
74
+ transition-property: color, background-color, box-shadow, border-color;
75
+ // fallback :focus state
76
+ &:focus {
77
+ @include focusOutline;
78
+
79
+ // remove fallback :focus if :focus-visible is supported
80
+ &:not(:focus-visible) {
81
+ outline: solid 1px transparent;
82
+ }
83
+ }
84
+
85
+ // default focus state
86
+ &:focus-visible {
87
+ @include focusOutline;
88
+ }
89
+
90
+ &.btn-primary {
91
+ // fallback :focus state
92
+ &:focus {
93
+ @include focusOutlineOnEmphasis;
94
+
95
+ // remove fallback :focus if :focus-visible is supported
96
+ &:not(:focus-visible) {
97
+ outline: solid 1px transparent;
98
+ box-shadow: none;
99
+ }
100
+ }
101
+
102
+ // default focus state
103
+ &:focus-visible {
104
+ @include focusOutlineOnEmphasis;
105
+ }
106
+ }
107
+ }
@@ -0,0 +1,54 @@
1
+ @import "../support/mixins/layout.scss";
2
+
3
+ // Flex utility classes
4
+ // stylelint-disable block-opening-brace-space-before
5
+ @each $breakpoint, $variant in $responsive-variants {
6
+ @include breakpoint($breakpoint) {
7
+ // Flexbox classes
8
+ // Container
9
+ .flex#{$variant}-row { flex-direction: row !important; }
10
+ .flex#{$variant}-row-reverse { flex-direction: row-reverse !important; }
11
+ .flex#{$variant}-column { flex-direction: column !important; }
12
+ .flex#{$variant}-column-reverse { flex-direction: column-reverse !important; }
13
+
14
+ .flex#{$variant}-wrap { flex-wrap: wrap !important; }
15
+ .flex#{$variant}-nowrap { flex-wrap: nowrap !important; }
16
+ .flex#{$variant}-wrap-reverse { flex-wrap: wrap-reverse !important; }
17
+
18
+ .flex#{$variant}-justify-start { justify-content: flex-start !important; }
19
+ .flex#{$variant}-justify-end { justify-content: flex-end !important; }
20
+ .flex#{$variant}-justify-center { justify-content: center !important; }
21
+ .flex#{$variant}-justify-between { justify-content: space-between !important; }
22
+ .flex#{$variant}-justify-around { justify-content: space-around !important; }
23
+
24
+ .flex#{$variant}-items-start { align-items: flex-start !important; }
25
+ .flex#{$variant}-items-end { align-items: flex-end !important; }
26
+ .flex#{$variant}-items-center { align-items: center !important; }
27
+ .flex#{$variant}-items-baseline { align-items: baseline !important; }
28
+ .flex#{$variant}-items-stretch { align-items: stretch !important; }
29
+
30
+ .flex#{$variant}-content-start { align-content: flex-start !important; }
31
+ .flex#{$variant}-content-end { align-content: flex-end !important; }
32
+ .flex#{$variant}-content-center { align-content: center !important; }
33
+ .flex#{$variant}-content-between { align-content: space-between !important; }
34
+ .flex#{$variant}-content-around { align-content: space-around !important; }
35
+ .flex#{$variant}-content-stretch { align-content: stretch !important; }
36
+
37
+ // Item
38
+ .flex#{$variant}-1 { flex: 1 !important; }
39
+ .flex#{$variant}-auto { flex: auto !important; }
40
+ .flex#{$variant}-grow-0 { flex-grow: 0 !important; }
41
+ .flex#{$variant}-shrink-0 { flex-shrink: 0 !important; }
42
+
43
+ .flex#{$variant}-self-auto { align-self: auto !important; }
44
+ .flex#{$variant}-self-start { align-self: flex-start !important; }
45
+ .flex#{$variant}-self-end { align-self: flex-end !important; }
46
+ .flex#{$variant}-self-center { align-self: center !important; }
47
+ .flex#{$variant}-self-baseline { align-self: baseline !important; }
48
+ .flex#{$variant}-self-stretch { align-self: stretch !important; }
49
+
50
+ .flex#{$variant}-order-1 { order: 1 !important; }
51
+ .flex#{$variant}-order-2 { order: 2 !important; }
52
+ .flex#{$variant}-order-none { order: inherit !important; }
53
+ }
54
+ }
@@ -0,0 +1,14 @@
1
+ @import '../support/index.scss';
2
+ // utilities
3
+ @import './animations.scss';
4
+ @import './borders.scss';
5
+ @import './box-shadow.scss';
6
+ @import './colors.scss';
7
+ @import './details.scss';
8
+ @import './flexbox.scss';
9
+ @import './layout.scss';
10
+ @import './margin.scss';
11
+ @import './padding.scss';
12
+ @import './typography.scss';
13
+ // Visibility and display should always come last in the imports so that they override other utilities with !important
14
+ @import './visibility-display.scss';