@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
@@ -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,79 @@
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: $border-radius !important; }
39
+ .rounded#{$variant}-0 { border-radius: 0 !important; }
40
+ .rounded#{$variant}-1 { border-radius: $border-radius-1 !important; }
41
+ .rounded#{$variant}-2 { border-radius: $border-radius-2 !important; }
42
+ .rounded#{$variant}-3 { border-radius: $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: $border-radius-1 !important;
54
+ }
55
+ }
56
+
57
+ .rounded#{$variant}-#{$edge}-2 {
58
+ @each $corner in $corners {
59
+ border-#{$corner}-radius: $border-radius-2 !important;
60
+ }
61
+ }
62
+
63
+ .rounded#{$variant}-#{$edge}-3 {
64
+ @each $corner in $corners {
65
+ border-#{$corner}-radius: $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: 50% !important; }
74
+
75
+ /* Change the border style to dashed, in conjunction with another utility */
76
+ .border-dashed {
77
+ // stylelint-disable-next-line primer/borders
78
+ border-style: dashed !important;
79
+ }
@@ -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,28 @@
1
+ // stylelint-disable selector-max-type
2
+
3
+ .details-overlay[open] > summary::before {
4
+ position: fixed;
5
+ top: 0;
6
+ right: 0;
7
+ bottom: 0;
8
+ left: 0;
9
+ z-index: 80;
10
+ display: block;
11
+ cursor: default;
12
+ content: ' ';
13
+ background: transparent;
14
+ }
15
+
16
+ .details-overlay-dark[open] > summary::before {
17
+ z-index: 111;
18
+ background: var(--color-primer-canvas-backdrop);
19
+ }
20
+
21
+ .details-reset {
22
+ // Remove marker added by the display: list-item browser default
23
+ > summary { list-style: none; }
24
+ // Remove marker added by details polyfill
25
+ > summary::before { display: none; }
26
+ // Remove marker added by Chrome
27
+ > summary::-webkit-details-marker { display: none; }
28
+ }
@@ -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';
@@ -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-extended {
15
+ @if ($scale < length($spacer-map)) {
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)) {
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: -$size !important; }
35
+ /* Set a negative $size margin on the bottom at $breakpoint */
36
+ .mb#{$variant}-n#{$scale} { margin-bottom: -$size !important; }
37
+
38
+ @if ($scale < length($spacer-map)) {
39
+ /* Set a negative $size margin on the right at $breakpoint */
40
+ .mr#{$variant}-n#{$scale} { margin-right : -$size !important; }
41
+ /* Set a negative $size margin on the left at $breakpoint */
42
+ .ml#{$variant}-n#{$scale} { margin-left : -$size !important; }
43
+ }
44
+ }
45
+
46
+ @if ($scale < length($spacer-map)) {
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; }