@nextrap/style-utils 1.0.5 → 2.0.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/.ai-usage-info.md +360 -0
- package/CHANGELOG.md +29 -0
- package/README.md +39 -5
- package/default.scss +5 -0
- package/demo/main.scss +0 -0
- package/ex-01-grid.html +6 -0
- package/index.css +1 -1
- package/index.d.ts +1 -1
- package/index.html +22 -0
- package/index.scss +12 -0
- package/main.ts +3 -0
- package/package.json +13 -3
- package/src/_style-utils.scss +489 -0
- package/src/mixins/_background.scss +56 -0
- package/src/mixins/_border-color.scss +13 -0
- package/src/mixins/_borders.scss +70 -0
- package/src/mixins/_color-scheme.scss +5 -0
- package/src/mixins/_container.scss +14 -0
- package/src/mixins/_dimensions.scss +17 -0
- package/src/mixins/_display.scss +14 -0
- package/src/mixins/_flex.scss +72 -0
- package/src/mixins/_font-utils.scss +43 -0
- package/src/mixins/_grid.scss +103 -0
- package/src/mixins/_index.scss +16 -0
- package/src/mixins/_list-style.scss +54 -0
- package/src/mixins/_spacing-utils.scss +115 -0
- package/src/mixins/_surface.scss +24 -0
- package/src/mixins/_table.scss +35 -0
- package/src/mixins/_text-color.scss +24 -0
- package/src/mixins/_text.scss +28 -0
- package/web-types.json +1740 -0
- /package/{lib → src/lib}/style-utils.d.ts +0 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Flex utility mixins — each mixin styles the current selector.
|
|
2
|
+
// Classes are generated in default.scss from these same mixins.
|
|
3
|
+
|
|
4
|
+
@mixin flex-column() { flex-direction: column !important; }
|
|
5
|
+
@mixin flex-row() { flex-direction: row !important; }
|
|
6
|
+
@mixin flex-column-reverse() { flex-direction: column-reverse !important; }
|
|
7
|
+
@mixin flex-row-reverse() { flex-direction: row-reverse !important; }
|
|
8
|
+
|
|
9
|
+
@mixin flex-wrap() { flex-wrap: wrap !important; }
|
|
10
|
+
@mixin flex-nowrap() { flex-wrap: nowrap !important; }
|
|
11
|
+
@mixin flex-wrap-reverse() { flex-wrap: wrap-reverse !important; }
|
|
12
|
+
|
|
13
|
+
@mixin justify-content-start() { justify-content: flex-start !important; }
|
|
14
|
+
@mixin justify-content-end() { justify-content: flex-end !important; }
|
|
15
|
+
@mixin justify-content-center() { justify-content: center !important; }
|
|
16
|
+
@mixin justify-content-between() { justify-content: space-between !important; }
|
|
17
|
+
@mixin justify-content-around() { justify-content: space-around !important; }
|
|
18
|
+
@mixin justify-content-evenly() { justify-content: space-evenly !important; }
|
|
19
|
+
|
|
20
|
+
@mixin align-items-start() { align-items: flex-start !important; }
|
|
21
|
+
@mixin align-items-end() { align-items: flex-end !important; }
|
|
22
|
+
@mixin align-items-center() { align-items: center !important; }
|
|
23
|
+
@mixin align-items-baseline() { align-items: baseline !important; }
|
|
24
|
+
@mixin align-items-stretch() { align-items: stretch !important; }
|
|
25
|
+
|
|
26
|
+
@mixin align-content-start() { align-content: flex-start !important; }
|
|
27
|
+
@mixin align-content-end() { align-content: flex-end !important; }
|
|
28
|
+
@mixin align-content-center() { align-content: center !important; }
|
|
29
|
+
@mixin align-content-between() { align-content: space-between !important; }
|
|
30
|
+
@mixin align-content-around() { align-content: space-around !important; }
|
|
31
|
+
@mixin align-content-stretch() { align-content: stretch !important; }
|
|
32
|
+
|
|
33
|
+
@mixin align-self-auto() { align-self: auto !important; }
|
|
34
|
+
@mixin align-self-start() { align-self: flex-start !important; }
|
|
35
|
+
@mixin align-self-end() { align-self: flex-end !important; }
|
|
36
|
+
@mixin align-self-center() { align-self: center !important; }
|
|
37
|
+
@mixin align-self-baseline() { align-self: baseline !important; }
|
|
38
|
+
@mixin align-self-stretch() { align-self: stretch !important; }
|
|
39
|
+
|
|
40
|
+
@mixin flex-fill() { flex: 1 1 auto !important; }
|
|
41
|
+
@mixin flex-grow-0() { flex-grow: 0 !important; }
|
|
42
|
+
@mixin flex-grow-1() { flex-grow: 1 !important; }
|
|
43
|
+
@mixin flex-shrink-0() { flex-shrink: 0 !important; }
|
|
44
|
+
@mixin flex-shrink-1() { flex-shrink: 1 !important; }
|
|
45
|
+
|
|
46
|
+
@mixin order-first() { order: -1 !important; }
|
|
47
|
+
@mixin order-0() { order: 0 !important; }
|
|
48
|
+
@mixin order-1() { order: 1 !important; }
|
|
49
|
+
@mixin order-2() { order: 2 !important; }
|
|
50
|
+
@mixin order-3() { order: 3 !important; }
|
|
51
|
+
@mixin order-4() { order: 4 !important; }
|
|
52
|
+
@mixin order-5() { order: 5 !important; }
|
|
53
|
+
@mixin order-last() { order: 6 !important; }
|
|
54
|
+
|
|
55
|
+
@mixin gap-0() { gap: 0 !important; }
|
|
56
|
+
@mixin gap-1() { gap: var(--nt-space-1) !important; }
|
|
57
|
+
@mixin gap-2() { gap: var(--nt-space-2) !important; }
|
|
58
|
+
@mixin gap-3() { gap: var(--nt-space-3) !important; }
|
|
59
|
+
@mixin gap-4() { gap: var(--nt-space-4) !important; }
|
|
60
|
+
@mixin gap-5() { gap: var(--nt-space-5) !important; }
|
|
61
|
+
|
|
62
|
+
@mixin gap-x-1() { column-gap: var(--nt-space-1) !important; }
|
|
63
|
+
@mixin gap-x-2() { column-gap: var(--nt-space-2) !important; }
|
|
64
|
+
@mixin gap-x-3() { column-gap: var(--nt-space-3) !important; }
|
|
65
|
+
@mixin gap-x-4() { column-gap: var(--nt-space-4) !important; }
|
|
66
|
+
@mixin gap-x-5() { column-gap: var(--nt-space-5) !important; }
|
|
67
|
+
|
|
68
|
+
@mixin gap-y-1() { row-gap: var(--nt-space-1) !important; }
|
|
69
|
+
@mixin gap-y-2() { row-gap: var(--nt-space-2) !important; }
|
|
70
|
+
@mixin gap-y-3() { row-gap: var(--nt-space-3) !important; }
|
|
71
|
+
@mixin gap-y-4() { row-gap: var(--nt-space-4) !important; }
|
|
72
|
+
@mixin gap-y-5() { row-gap: var(--nt-space-5) !important; }
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Font utility mixins — each mixin styles the current selector.
|
|
2
|
+
// Classes are generated in default.scss from these same mixins.
|
|
3
|
+
// Uses --nt-* CSS custom properties; no private Sass imports from style-base.
|
|
4
|
+
|
|
5
|
+
@mixin fs-1() { font-size: var(--nt-fs-1) !important; line-height: var(--nt-line-height) !important; }
|
|
6
|
+
@mixin fs-2() { font-size: var(--nt-fs-2) !important; line-height: var(--nt-line-height) !important; }
|
|
7
|
+
@mixin fs-3() { font-size: var(--nt-fs-3) !important; line-height: var(--nt-line-height) !important; }
|
|
8
|
+
@mixin fs-4() { font-size: var(--nt-fs-4) !important; line-height: var(--nt-line-height) !important; }
|
|
9
|
+
@mixin fs-5() { font-size: var(--nt-fs-5) !important; line-height: var(--nt-line-height) !important; }
|
|
10
|
+
@mixin fs-6() { font-size: var(--nt-fs-6) !important; line-height: var(--nt-line-height) !important; }
|
|
11
|
+
|
|
12
|
+
@mixin text-reset() { color: inherit !important; text-decoration: none !important; }
|
|
13
|
+
|
|
14
|
+
@mixin fw-light() { font-weight: 300 !important; }
|
|
15
|
+
@mixin fw-lighter() { font-weight: lighter !important; }
|
|
16
|
+
@mixin fw-normal() { font-weight: 400 !important; }
|
|
17
|
+
@mixin fw-medium() { font-weight: 500 !important; }
|
|
18
|
+
@mixin fw-semibold() { font-weight: 600 !important; }
|
|
19
|
+
@mixin fw-bold() { font-weight: 700 !important; }
|
|
20
|
+
@mixin fw-bolder() { font-weight: bolder !important; }
|
|
21
|
+
|
|
22
|
+
@mixin fst-italic() { font-style: italic !important; }
|
|
23
|
+
@mixin fst-normal() { font-style: normal !important; }
|
|
24
|
+
|
|
25
|
+
@mixin lh-1() { line-height: 1 !important; }
|
|
26
|
+
@mixin lh-sm() { line-height: 1.25 !important; }
|
|
27
|
+
@mixin lh-base() { line-height: 1.5 !important; }
|
|
28
|
+
@mixin lh-lg() { line-height: 2 !important; }
|
|
29
|
+
|
|
30
|
+
@mixin font-monospace() {
|
|
31
|
+
font-family:
|
|
32
|
+
var(
|
|
33
|
+
--font-monospace-family,
|
|
34
|
+
ui-monospace,
|
|
35
|
+
SFMono-Regular,
|
|
36
|
+
Menlo,
|
|
37
|
+
Monaco,
|
|
38
|
+
Consolas,
|
|
39
|
+
'Liberation Mono',
|
|
40
|
+
'Courier New'
|
|
41
|
+
),
|
|
42
|
+
monospace !important;
|
|
43
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// Row/column utility mixins — each mixin styles the current selector.
|
|
2
|
+
// Classes are generated in default.scss from these same mixins.
|
|
3
|
+
@use 'sass:math';
|
|
4
|
+
|
|
5
|
+
@mixin row() {
|
|
6
|
+
--gutters-x: 0;
|
|
7
|
+
--gutters-y: 0;
|
|
8
|
+
|
|
9
|
+
display: flex !important;
|
|
10
|
+
flex-direction: row !important;
|
|
11
|
+
flex-wrap: wrap !important;
|
|
12
|
+
margin-top: calc(-1 * var(--gutters-y)) !important;
|
|
13
|
+
margin-right: calc(-0.5 * var(--gutters-x)) !important;
|
|
14
|
+
margin-left: calc(-0.5 * var(--gutters-x)) !important;
|
|
15
|
+
|
|
16
|
+
> * {
|
|
17
|
+
@include row-children();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@mixin row-children() {
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
flex-shrink: 0;
|
|
24
|
+
width: 100%;
|
|
25
|
+
max-width: 100%;
|
|
26
|
+
padding-right: calc(var(--gutters-x) * 0.5) !important;
|
|
27
|
+
padding-left: calc(var(--gutters-x) * 0.5) !important;
|
|
28
|
+
margin-top: var(--gutters-y) !important;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@mixin col() { flex: 1 0 0 !important; width: 0 !important; }
|
|
32
|
+
@mixin col-auto() { flex: 0 0 auto !important; width: auto !important; }
|
|
33
|
+
@mixin col-1() { flex: 0 0 auto !important; width: math.percentage(math.div(1, 12)) !important; }
|
|
34
|
+
@mixin col-2() { flex: 0 0 auto !important; width: math.percentage(math.div(2, 12)) !important; }
|
|
35
|
+
@mixin col-3() { flex: 0 0 auto !important; width: math.percentage(math.div(3, 12)) !important; }
|
|
36
|
+
@mixin col-4() { flex: 0 0 auto !important; width: math.percentage(math.div(4, 12)) !important; }
|
|
37
|
+
@mixin col-5() { flex: 0 0 auto !important; width: math.percentage(math.div(5, 12)) !important; }
|
|
38
|
+
@mixin col-6() { flex: 0 0 auto !important; width: math.percentage(math.div(6, 12)) !important; }
|
|
39
|
+
@mixin col-7() { flex: 0 0 auto !important; width: math.percentage(math.div(7, 12)) !important; }
|
|
40
|
+
@mixin col-8() { flex: 0 0 auto !important; width: math.percentage(math.div(8, 12)) !important; }
|
|
41
|
+
@mixin col-9() { flex: 0 0 auto !important; width: math.percentage(math.div(9, 12)) !important; }
|
|
42
|
+
@mixin col-10() { flex: 0 0 auto !important; width: math.percentage(math.div(10, 12)) !important; }
|
|
43
|
+
@mixin col-11() { flex: 0 0 auto !important; width: math.percentage(math.div(11, 12)) !important; }
|
|
44
|
+
@mixin col-12() { flex: 0 0 auto !important; width: math.percentage(math.div(12, 12)) !important; }
|
|
45
|
+
|
|
46
|
+
@mixin _row-cols($count) {
|
|
47
|
+
> * {
|
|
48
|
+
flex: 0 0 auto !important;
|
|
49
|
+
width: math.percentage(math.div(1, $count)) !important;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@mixin row-cols-1() { @include _row-cols(1); }
|
|
54
|
+
@mixin row-cols-2() { @include _row-cols(2); }
|
|
55
|
+
@mixin row-cols-3() { @include _row-cols(3); }
|
|
56
|
+
@mixin row-cols-4() { @include _row-cols(4); }
|
|
57
|
+
@mixin row-cols-5() { @include _row-cols(5); }
|
|
58
|
+
@mixin row-cols-6() { @include _row-cols(6); }
|
|
59
|
+
|
|
60
|
+
@mixin offset-1() { margin-left: math.percentage(math.div(1, 12)) !important; }
|
|
61
|
+
@mixin offset-2() { margin-left: math.percentage(math.div(2, 12)) !important; }
|
|
62
|
+
@mixin offset-3() { margin-left: math.percentage(math.div(3, 12)) !important; }
|
|
63
|
+
@mixin offset-4() { margin-left: math.percentage(math.div(4, 12)) !important; }
|
|
64
|
+
@mixin offset-5() { margin-left: math.percentage(math.div(5, 12)) !important; }
|
|
65
|
+
@mixin offset-6() { margin-left: math.percentage(math.div(6, 12)) !important; }
|
|
66
|
+
@mixin offset-7() { margin-left: math.percentage(math.div(7, 12)) !important; }
|
|
67
|
+
@mixin offset-8() { margin-left: math.percentage(math.div(8, 12)) !important; }
|
|
68
|
+
@mixin offset-9() { margin-left: math.percentage(math.div(9, 12)) !important; }
|
|
69
|
+
@mixin offset-10() { margin-left: math.percentage(math.div(10, 12)) !important; }
|
|
70
|
+
@mixin offset-11() { margin-left: math.percentage(math.div(11, 12)) !important; }
|
|
71
|
+
@mixin offset-12() { margin-left: math.percentage(math.div(12, 12)) !important; }
|
|
72
|
+
|
|
73
|
+
@mixin _gutter($x, $y) {
|
|
74
|
+
--gutters-x: var(--nt-space-#{$x}) !important;
|
|
75
|
+
--gutters-y: var(--nt-space-#{$y}) !important;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@mixin _gutter-x($size) { --gutters-x: var(--nt-space-#{$size}) !important; }
|
|
79
|
+
@mixin _gutter-y($size) { --gutters-y: var(--nt-space-#{$size}) !important; }
|
|
80
|
+
|
|
81
|
+
@mixin g-0() { @include _gutter(0, 0); }
|
|
82
|
+
@mixin g-1() { @include _gutter(1, 1); }
|
|
83
|
+
@mixin g-2() { @include _gutter(2, 2); }
|
|
84
|
+
@mixin g-3() { @include _gutter(3, 3); }
|
|
85
|
+
@mixin g-4() { @include _gutter(4, 4); }
|
|
86
|
+
@mixin g-5() { @include _gutter(5, 5); }
|
|
87
|
+
@mixin g-6() { @include _gutter(6, 6); }
|
|
88
|
+
|
|
89
|
+
@mixin gx-0() { @include _gutter-x(0); }
|
|
90
|
+
@mixin gx-1() { @include _gutter-x(1); }
|
|
91
|
+
@mixin gx-2() { @include _gutter-x(2); }
|
|
92
|
+
@mixin gx-3() { @include _gutter-x(3); }
|
|
93
|
+
@mixin gx-4() { @include _gutter-x(4); }
|
|
94
|
+
@mixin gx-5() { @include _gutter-x(5); }
|
|
95
|
+
@mixin gx-6() { @include _gutter-x(6); }
|
|
96
|
+
|
|
97
|
+
@mixin gy-0() { @include _gutter-y(0); }
|
|
98
|
+
@mixin gy-1() { @include _gutter-y(1); }
|
|
99
|
+
@mixin gy-2() { @include _gutter-y(2); }
|
|
100
|
+
@mixin gy-3() { @include _gutter-y(3); }
|
|
101
|
+
@mixin gy-4() { @include _gutter-y(4); }
|
|
102
|
+
@mixin gy-5() { @include _gutter-y(5); }
|
|
103
|
+
@mixin gy-6() { @include _gutter-y(6); }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@forward 'background';
|
|
2
|
+
@forward 'border-color';
|
|
3
|
+
@forward 'borders';
|
|
4
|
+
@forward 'color-scheme';
|
|
5
|
+
@forward 'container';
|
|
6
|
+
@forward 'dimensions';
|
|
7
|
+
@forward 'display';
|
|
8
|
+
@forward 'flex';
|
|
9
|
+
@forward 'font-utils';
|
|
10
|
+
@forward 'grid';
|
|
11
|
+
@forward 'list-style';
|
|
12
|
+
@forward 'spacing-utils';
|
|
13
|
+
@forward 'surface';
|
|
14
|
+
@forward 'table';
|
|
15
|
+
@forward 'text-color';
|
|
16
|
+
@forward 'text';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// List utility mixins — each mixin styles the current selector.
|
|
2
|
+
// Classes are generated in default.scss from these same mixins.
|
|
3
|
+
|
|
4
|
+
@mixin list-unstyled() {
|
|
5
|
+
list-style: none !important;
|
|
6
|
+
padding-left: 0 !important;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@mixin list-inline() {
|
|
10
|
+
padding-left: 0 !important;
|
|
11
|
+
|
|
12
|
+
> li {
|
|
13
|
+
display: inline-block !important;
|
|
14
|
+
|
|
15
|
+
&:not(:last-child) {
|
|
16
|
+
margin-right: var(--nt-space-3) !important;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@mixin list-checked() {
|
|
22
|
+
list-style: none !important;
|
|
23
|
+
padding-left: 0 !important;
|
|
24
|
+
|
|
25
|
+
> li {
|
|
26
|
+
vertical-align: center;
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
|
|
30
|
+
&::before {
|
|
31
|
+
width: 1.2em;
|
|
32
|
+
height: 1.2em;
|
|
33
|
+
display: flex;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
align-items: center;
|
|
36
|
+
content: '\2713';
|
|
37
|
+
border-radius: 50%;
|
|
38
|
+
margin-right: var(--nt-space-2);
|
|
39
|
+
background-color: var(--nt-success);
|
|
40
|
+
color: var(--nt-white);
|
|
41
|
+
text-align: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.list-item-removed::before {
|
|
45
|
+
content: '\2715';
|
|
46
|
+
background-color: var(--nt-danger);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.list-item-unavailable::before {
|
|
50
|
+
content: '\2012';
|
|
51
|
+
background-color: var(--nt-dark);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// Spacing utility mixins — each mixin styles the current selector.
|
|
2
|
+
// Classes are generated in default.scss from these same mixins.
|
|
3
|
+
|
|
4
|
+
@mixin m-0() { margin: 0 !important; }
|
|
5
|
+
@mixin m-1() { margin: var(--nt-space-1) !important; }
|
|
6
|
+
@mixin m-2() { margin: var(--nt-space-2) !important; }
|
|
7
|
+
@mixin m-3() { margin: var(--nt-space-3) !important; }
|
|
8
|
+
@mixin m-4() { margin: var(--nt-space-4) !important; }
|
|
9
|
+
@mixin m-5() { margin: var(--nt-space-5) !important; }
|
|
10
|
+
|
|
11
|
+
@mixin mt-0() { margin-top: 0 !important; }
|
|
12
|
+
@mixin mt-1() { margin-top: var(--nt-space-1) !important; }
|
|
13
|
+
@mixin mt-2() { margin-top: var(--nt-space-2) !important; }
|
|
14
|
+
@mixin mt-3() { margin-top: var(--nt-space-3) !important; }
|
|
15
|
+
@mixin mt-4() { margin-top: var(--nt-space-4) !important; }
|
|
16
|
+
@mixin mt-5() { margin-top: var(--nt-space-5) !important; }
|
|
17
|
+
|
|
18
|
+
@mixin me-0() { margin-right: 0 !important; }
|
|
19
|
+
@mixin me-1() { margin-right: var(--nt-space-1) !important; }
|
|
20
|
+
@mixin me-2() { margin-right: var(--nt-space-2) !important; }
|
|
21
|
+
@mixin me-3() { margin-right: var(--nt-space-3) !important; }
|
|
22
|
+
@mixin me-4() { margin-right: var(--nt-space-4) !important; }
|
|
23
|
+
@mixin me-5() { margin-right: var(--nt-space-5) !important; }
|
|
24
|
+
|
|
25
|
+
@mixin mb-0() { margin-bottom: 0 !important; }
|
|
26
|
+
@mixin mb-1() { margin-bottom: var(--nt-space-1) !important; }
|
|
27
|
+
@mixin mb-2() { margin-bottom: var(--nt-space-2) !important; }
|
|
28
|
+
@mixin mb-3() { margin-bottom: var(--nt-space-3) !important; }
|
|
29
|
+
@mixin mb-4() { margin-bottom: var(--nt-space-4) !important; }
|
|
30
|
+
@mixin mb-5() { margin-bottom: var(--nt-space-5) !important; }
|
|
31
|
+
|
|
32
|
+
@mixin ms-0() { margin-left: 0 !important; }
|
|
33
|
+
@mixin ms-1() { margin-left: var(--nt-space-1) !important; }
|
|
34
|
+
@mixin ms-2() { margin-left: var(--nt-space-2) !important; }
|
|
35
|
+
@mixin ms-3() { margin-left: var(--nt-space-3) !important; }
|
|
36
|
+
@mixin ms-4() { margin-left: var(--nt-space-4) !important; }
|
|
37
|
+
@mixin ms-5() { margin-left: var(--nt-space-5) !important; }
|
|
38
|
+
|
|
39
|
+
@mixin mx-0() { margin-inline: 0 !important; }
|
|
40
|
+
@mixin mx-1() { margin-inline: var(--nt-space-1) !important; }
|
|
41
|
+
@mixin mx-2() { margin-inline: var(--nt-space-2) !important; }
|
|
42
|
+
@mixin mx-3() { margin-inline: var(--nt-space-3) !important; }
|
|
43
|
+
@mixin mx-4() { margin-inline: var(--nt-space-4) !important; }
|
|
44
|
+
@mixin mx-5() { margin-inline: var(--nt-space-5) !important; }
|
|
45
|
+
|
|
46
|
+
@mixin my-0() { margin-block: 0 !important; }
|
|
47
|
+
@mixin my-1() { margin-block: var(--nt-space-1) !important; }
|
|
48
|
+
@mixin my-2() { margin-block: var(--nt-space-2) !important; }
|
|
49
|
+
@mixin my-3() { margin-block: var(--nt-space-3) !important; }
|
|
50
|
+
@mixin my-4() { margin-block: var(--nt-space-4) !important; }
|
|
51
|
+
@mixin my-5() { margin-block: var(--nt-space-5) !important; }
|
|
52
|
+
|
|
53
|
+
@mixin p-0() { padding: 0 !important; }
|
|
54
|
+
@mixin p-1() { padding: var(--nt-space-1) !important; }
|
|
55
|
+
@mixin p-2() { padding: var(--nt-space-2) !important; }
|
|
56
|
+
@mixin p-3() { padding: var(--nt-space-3) !important; }
|
|
57
|
+
@mixin p-4() { padding: var(--nt-space-4) !important; }
|
|
58
|
+
@mixin p-5() { padding: var(--nt-space-5) !important; }
|
|
59
|
+
|
|
60
|
+
@mixin pt-0() { padding-top: 0 !important; }
|
|
61
|
+
@mixin pt-1() { padding-top: var(--nt-space-1) !important; }
|
|
62
|
+
@mixin pt-2() { padding-top: var(--nt-space-2) !important; }
|
|
63
|
+
@mixin pt-3() { padding-top: var(--nt-space-3) !important; }
|
|
64
|
+
@mixin pt-4() { padding-top: var(--nt-space-4) !important; }
|
|
65
|
+
@mixin pt-5() { padding-top: var(--nt-space-5) !important; }
|
|
66
|
+
|
|
67
|
+
@mixin pe-0() { padding-right: 0 !important; }
|
|
68
|
+
@mixin pe-1() { padding-right: var(--nt-space-1) !important; }
|
|
69
|
+
@mixin pe-2() { padding-right: var(--nt-space-2) !important; }
|
|
70
|
+
@mixin pe-3() { padding-right: var(--nt-space-3) !important; }
|
|
71
|
+
@mixin pe-4() { padding-right: var(--nt-space-4) !important; }
|
|
72
|
+
@mixin pe-5() { padding-right: var(--nt-space-5) !important; }
|
|
73
|
+
|
|
74
|
+
@mixin pb-0() { padding-bottom: 0 !important; }
|
|
75
|
+
@mixin pb-1() { padding-bottom: var(--nt-space-1) !important; }
|
|
76
|
+
@mixin pb-2() { padding-bottom: var(--nt-space-2) !important; }
|
|
77
|
+
@mixin pb-3() { padding-bottom: var(--nt-space-3) !important; }
|
|
78
|
+
@mixin pb-4() { padding-bottom: var(--nt-space-4) !important; }
|
|
79
|
+
@mixin pb-5() { padding-bottom: var(--nt-space-5) !important; }
|
|
80
|
+
|
|
81
|
+
@mixin ps-0() { padding-left: 0 !important; }
|
|
82
|
+
@mixin ps-1() { padding-left: var(--nt-space-1) !important; }
|
|
83
|
+
@mixin ps-2() { padding-left: var(--nt-space-2) !important; }
|
|
84
|
+
@mixin ps-3() { padding-left: var(--nt-space-3) !important; }
|
|
85
|
+
@mixin ps-4() { padding-left: var(--nt-space-4) !important; }
|
|
86
|
+
@mixin ps-5() { padding-left: var(--nt-space-5) !important; }
|
|
87
|
+
|
|
88
|
+
@mixin px-0() { padding-inline: 0 !important; }
|
|
89
|
+
@mixin px-1() { padding-inline: var(--nt-space-1) !important; }
|
|
90
|
+
@mixin px-2() { padding-inline: var(--nt-space-2) !important; }
|
|
91
|
+
@mixin px-3() { padding-inline: var(--nt-space-3) !important; }
|
|
92
|
+
@mixin px-4() { padding-inline: var(--nt-space-4) !important; }
|
|
93
|
+
@mixin px-5() { padding-inline: var(--nt-space-5) !important; }
|
|
94
|
+
|
|
95
|
+
@mixin py-0() { padding-block: 0 !important; }
|
|
96
|
+
@mixin py-1() { padding-block: var(--nt-space-1) !important; }
|
|
97
|
+
@mixin py-2() { padding-block: var(--nt-space-2) !important; }
|
|
98
|
+
@mixin py-3() { padding-block: var(--nt-space-3) !important; }
|
|
99
|
+
@mixin py-4() { padding-block: var(--nt-space-4) !important; }
|
|
100
|
+
@mixin py-5() { padding-block: var(--nt-space-5) !important; }
|
|
101
|
+
|
|
102
|
+
@mixin m-auto() { margin: auto !important; }
|
|
103
|
+
@mixin mt-auto() { margin-top: auto !important; }
|
|
104
|
+
@mixin me-auto() { margin-right: auto !important; }
|
|
105
|
+
@mixin mb-auto() { margin-bottom: auto !important; }
|
|
106
|
+
@mixin ms-auto() { margin-left: auto !important; }
|
|
107
|
+
@mixin mx-auto() { margin-inline: auto !important; }
|
|
108
|
+
@mixin my-auto() { margin-block: auto !important; }
|
|
109
|
+
@mixin p-auto() { padding: auto !important; }
|
|
110
|
+
@mixin pt-auto() { padding-top: auto !important; }
|
|
111
|
+
@mixin pe-auto() { padding-right: auto !important; }
|
|
112
|
+
@mixin pb-auto() { padding-bottom: auto !important; }
|
|
113
|
+
@mixin ps-auto() { padding-left: auto !important; }
|
|
114
|
+
@mixin px-auto() { padding-inline: auto !important; }
|
|
115
|
+
@mixin py-auto() { padding-block: auto !important; }
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Semantic surface mixins keep a readable background/foreground pair together.
|
|
2
|
+
|
|
3
|
+
@mixin _surface($background, $foreground) {
|
|
4
|
+
--nt-text: #{$foreground};
|
|
5
|
+
--nt-text-muted: color-mix(in oklch, #{$foreground} 72%, #{$background});
|
|
6
|
+
--nt-header: #{$foreground};
|
|
7
|
+
--nt-link: #{$foreground};
|
|
8
|
+
--nt-link-hover: #{$foreground};
|
|
9
|
+
background: #{$background} !important;
|
|
10
|
+
color: var(--nt-text) !important;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@mixin surface-primary() { @include _surface(var(--nt-primary), var(--nt-text-on-primary)); }
|
|
14
|
+
@mixin surface-secondary() { @include _surface(var(--nt-secondary), var(--nt-text-on-secondary)); }
|
|
15
|
+
@mixin surface-tertiary() { @include _surface(var(--nt-tertiary), var(--nt-text-on-tertiary)); }
|
|
16
|
+
@mixin surface-accent() { @include _surface(var(--nt-accent), var(--nt-text-on-accent)); }
|
|
17
|
+
@mixin surface-success() { @include _surface(var(--nt-success), var(--nt-text-on-success)); }
|
|
18
|
+
@mixin surface-info() { @include _surface(var(--nt-info), var(--nt-text-on-info)); }
|
|
19
|
+
@mixin surface-warning() { @include _surface(var(--nt-warning), var(--nt-text-on-warning)); }
|
|
20
|
+
@mixin surface-danger() { @include _surface(var(--nt-danger), var(--nt-text-on-danger)); }
|
|
21
|
+
@mixin surface-light() { @include _surface(var(--nt-light), var(--nt-text-on-light)); }
|
|
22
|
+
@mixin surface-dark() { @include _surface(var(--nt-dark), var(--nt-text-on-dark)); }
|
|
23
|
+
@mixin surface-white() { @include _surface(var(--nt-white), var(--nt-text-on-white)); }
|
|
24
|
+
@mixin surface-black() { @include _surface(var(--nt-black), var(--nt-text-on-black)); }
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Table utility mixins.
|
|
2
|
+
// Generic reusable table styles live in @nextrap/style-elements.
|
|
3
|
+
// These are kept for backward compatibility.
|
|
4
|
+
// Classes are generated in default.scss from these same mixins.
|
|
5
|
+
|
|
6
|
+
@mixin table() {
|
|
7
|
+
width: 100%;
|
|
8
|
+
caption-side: bottom;
|
|
9
|
+
border-collapse: collapse;
|
|
10
|
+
|
|
11
|
+
tbody,
|
|
12
|
+
td,
|
|
13
|
+
tfoot,
|
|
14
|
+
th,
|
|
15
|
+
thead,
|
|
16
|
+
tr {
|
|
17
|
+
border-color: inherit;
|
|
18
|
+
border-style: solid;
|
|
19
|
+
border-width: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
& > :not(caption) > * > * {
|
|
23
|
+
padding: var(--nt-space-2, 0.5rem) var(--nt-space-2, 0.5rem);
|
|
24
|
+
background-color: transparent;
|
|
25
|
+
border-bottom-width: var(--nt-border-width, 1px);
|
|
26
|
+
border-bottom-style: solid;
|
|
27
|
+
border-bottom-color: var(--nt-border, currentColor);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@mixin table-bordered() {
|
|
32
|
+
& > :not(caption) > * > * {
|
|
33
|
+
border-width: 1px;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Text color utility mixins — each mixin styles the current selector.
|
|
2
|
+
|
|
3
|
+
@mixin text-primary() { --text-color: var(--nt-primary) !important; color: var(--nt-primary) !important; }
|
|
4
|
+
@mixin text-secondary() { --text-color: var(--nt-secondary) !important; color: var(--nt-secondary) !important; }
|
|
5
|
+
@mixin text-tertiary() { --text-color: var(--nt-tertiary) !important; color: var(--nt-tertiary) !important; }
|
|
6
|
+
@mixin text-accent() { --text-color: var(--nt-accent) !important; color: var(--nt-accent) !important; }
|
|
7
|
+
@mixin text-success() { --text-color: var(--nt-success) !important; color: var(--nt-success) !important; }
|
|
8
|
+
@mixin text-info() { --text-color: var(--nt-info) !important; color: var(--nt-info) !important; }
|
|
9
|
+
@mixin text-warning() { --text-color: var(--nt-warning) !important; color: var(--nt-warning) !important; }
|
|
10
|
+
@mixin text-danger() { --text-color: var(--nt-danger) !important; color: var(--nt-danger) !important; }
|
|
11
|
+
@mixin text-light() { --text-color: var(--nt-light) !important; color: var(--nt-light) !important; }
|
|
12
|
+
@mixin text-dark() { --text-color: var(--nt-dark) !important; color: var(--nt-dark) !important; }
|
|
13
|
+
@mixin text-white() { --text-color: var(--nt-white) !important; color: var(--nt-white) !important; }
|
|
14
|
+
@mixin text-black() { --text-color: var(--nt-black) !important; color: var(--nt-black) !important; }
|
|
15
|
+
|
|
16
|
+
@mixin text-gray-100() { color: var(--nt-gray-100) !important; }
|
|
17
|
+
@mixin text-gray-200() { color: var(--nt-gray-200) !important; }
|
|
18
|
+
@mixin text-gray-300() { color: var(--nt-gray-300) !important; }
|
|
19
|
+
@mixin text-gray-400() { color: var(--nt-gray-400) !important; }
|
|
20
|
+
@mixin text-gray-500() { color: var(--nt-gray-500) !important; }
|
|
21
|
+
@mixin text-gray-600() { color: var(--nt-gray-600) !important; }
|
|
22
|
+
@mixin text-gray-700() { color: var(--nt-gray-700) !important; }
|
|
23
|
+
@mixin text-gray-800() { color: var(--nt-gray-800) !important; }
|
|
24
|
+
@mixin text-gray-900() { color: var(--nt-gray-900) !important; }
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Text utility mixins — each mixin styles the current selector.
|
|
2
|
+
// Classes are generated in default.scss from these same mixins.
|
|
3
|
+
|
|
4
|
+
@mixin text-start() { text-align: start !important; }
|
|
5
|
+
@mixin text-end() { text-align: end !important; }
|
|
6
|
+
@mixin text-center() { text-align: center !important; }
|
|
7
|
+
|
|
8
|
+
@mixin text-wrap() { white-space: normal !important; }
|
|
9
|
+
@mixin text-nowrap() { white-space: nowrap !important; }
|
|
10
|
+
|
|
11
|
+
@mixin text-break() {
|
|
12
|
+
overflow-wrap: break-word !important;
|
|
13
|
+
word-wrap: break-word !important;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@mixin text-truncate() {
|
|
17
|
+
overflow: hidden !important;
|
|
18
|
+
text-overflow: ellipsis !important;
|
|
19
|
+
white-space: nowrap !important;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@mixin text-lowercase() { text-transform: lowercase !important; }
|
|
23
|
+
@mixin text-uppercase() { text-transform: uppercase !important; }
|
|
24
|
+
@mixin text-capitalize() { text-transform: capitalize !important; }
|
|
25
|
+
|
|
26
|
+
@mixin text-decoration-none() { text-decoration: none !important; }
|
|
27
|
+
@mixin text-decoration-underline() { text-decoration: underline !important; }
|
|
28
|
+
@mixin text-decoration-line-through() { text-decoration: line-through !important; }
|