unigrid.css 0.3.0 → 0.3.2
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/README.md +101 -101
- package/dist/dropdown.js +36 -36
- package/dist/scrollspy.js +57 -57
- package/dist/tabs.js +30 -30
- package/dist/unigrid.css +4608 -4501
- package/dist/unigrid.js +173 -124
- package/dist/unigrid.min.css +1 -1
- package/dist/unigrid.min.js +1 -1
- package/package.json +70 -41
- package/src/js/dropdown.js +49 -49
- package/src/js/index.js +20 -19
- package/src/js/modal.js +81 -0
- package/src/js/scrollspy.js +87 -87
- package/src/js/tabs.js +58 -58
- package/src/scss/_accordion.scss +123 -123
- package/src/scss/_broadside.scss +125 -125
- package/src/scss/_buttons.scss +241 -241
- package/src/scss/_card.scss +168 -168
- package/src/scss/_components.scss +140 -140
- package/src/scss/_container.scss +53 -53
- package/src/scss/_dropdown.scss +178 -178
- package/src/scss/_footer.scss +147 -147
- package/src/scss/_formats.scss +64 -64
- package/src/scss/_forms.scss +192 -192
- package/src/scss/_grid.scss +114 -114
- package/src/scss/_header.scss +169 -169
- package/src/scss/_hero.scss +262 -262
- package/src/scss/_mixins.scss +120 -120
- package/src/scss/_modal.scss +158 -0
- package/src/scss/_modules.scss +238 -238
- package/src/scss/_navbar.scss +341 -341
- package/src/scss/_pagination.scss +160 -160
- package/src/scss/_prose.scss +393 -393
- package/src/scss/_reset.scss +82 -82
- package/src/scss/_scrollspy.scss +62 -62
- package/src/scss/_section.scss +91 -91
- package/src/scss/_sidebar.scss +147 -147
- package/src/scss/_table.scss +122 -122
- package/src/scss/_tabs.scss +178 -178
- package/src/scss/_typography.scss +105 -105
- package/src/scss/_utilities.scss +79 -79
- package/src/scss/_variables.scss +183 -183
- package/src/scss/unigrid.scss +50 -49
- package/dist/index.js +0 -5
package/src/scss/_footer.scss
CHANGED
|
@@ -1,147 +1,147 @@
|
|
|
1
|
-
// ==========================================================================
|
|
2
|
-
// Unigrid CSS Framework — Footer (BEM)
|
|
3
|
-
//
|
|
4
|
-
// Sticky footer that always sits at the bottom of the viewport.
|
|
5
|
-
// All spacing aligned to var(--ug-leading).
|
|
6
|
-
//
|
|
7
|
-
// Block: .ug-footer
|
|
8
|
-
// Elements: __inner, __brand, __text, __nav, __link, __divider
|
|
9
|
-
// Modifiers: --compact, --dark (default), --light
|
|
10
|
-
// ==========================================================================
|
|
11
|
-
|
|
12
|
-
@use "variables" as *;
|
|
13
|
-
@use "mixins" as *;
|
|
14
|
-
|
|
15
|
-
// Ensure footer stays at bottom
|
|
16
|
-
html, body {
|
|
17
|
-
min-height: 100vh;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
body {
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
|
|
24
|
-
> *:not(.ug-footer) {
|
|
25
|
-
flex-shrink: 0;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
> .ug-footer {
|
|
29
|
-
margin-top: auto;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.ug-footer {
|
|
34
|
-
width: 100%;
|
|
35
|
-
background-color: $ug-black;
|
|
36
|
-
color: $ug-white;
|
|
37
|
-
padding: calc(var(--ug-leading) * 3) calc(var(--ug-leading) * 1.5);
|
|
38
|
-
|
|
39
|
-
// ---- Inner container ----
|
|
40
|
-
&__inner {
|
|
41
|
-
max-width: $ug-container-max-width;
|
|
42
|
-
margin: 0 auto;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// ---- Brand ----
|
|
46
|
-
&__brand {
|
|
47
|
-
@include ug-font-size("lg");
|
|
48
|
-
@include ug-font-weight("bold");
|
|
49
|
-
@include ug-rhythm-line-height(1);
|
|
50
|
-
@include ug-rhythm-margin-bottom(1);
|
|
51
|
-
color: $ug-white;
|
|
52
|
-
text-decoration: none;
|
|
53
|
-
display: block;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// ---- Text ----
|
|
57
|
-
&__text {
|
|
58
|
-
@include ug-font-size("sm");
|
|
59
|
-
@include ug-rhythm-line-height(1);
|
|
60
|
-
color: rgba(255, 255, 255, 0.5);
|
|
61
|
-
margin: 0;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// ---- Navigation ----
|
|
65
|
-
&__nav {
|
|
66
|
-
display: flex;
|
|
67
|
-
flex-wrap: wrap;
|
|
68
|
-
gap: var(--ug-leading);
|
|
69
|
-
list-style: none;
|
|
70
|
-
margin: 0;
|
|
71
|
-
padding: 0;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
&__link {
|
|
75
|
-
@include ug-font-size("sm");
|
|
76
|
-
@include ug-rhythm-line-height(1);
|
|
77
|
-
color: rgba(255, 255, 255, 0.7);
|
|
78
|
-
text-decoration: none;
|
|
79
|
-
transition: color 0.15s;
|
|
80
|
-
|
|
81
|
-
&:hover {
|
|
82
|
-
color: $ug-white;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// ---- Divider ----
|
|
87
|
-
// 1 leading height: padding-top + 1px border = 1 leading
|
|
88
|
-
&__divider {
|
|
89
|
-
border: none;
|
|
90
|
-
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
|
91
|
-
padding-top: calc(var(--ug-leading) - 1px);
|
|
92
|
-
margin: 0;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// ==============================
|
|
96
|
-
// Modifiers
|
|
97
|
-
// ==============================
|
|
98
|
-
|
|
99
|
-
// Compact: 1 leading padding, single line
|
|
100
|
-
// Total: padding(1) + content(1 line-height) + padding(1) = 3 leading
|
|
101
|
-
&--compact {
|
|
102
|
-
padding: var(--ug-leading) calc(var(--ug-leading) * 1.5);
|
|
103
|
-
|
|
104
|
-
.ug-footer__inner {
|
|
105
|
-
display: flex;
|
|
106
|
-
align-items: center;
|
|
107
|
-
justify-content: space-between;
|
|
108
|
-
flex-wrap: wrap;
|
|
109
|
-
gap: var(--ug-leading);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.ug-footer__brand {
|
|
113
|
-
margin-bottom: 0;
|
|
114
|
-
@include ug-font-size("sm");
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.ug-footer__nav {
|
|
118
|
-
margin-bottom: 0;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// Light
|
|
123
|
-
&--light {
|
|
124
|
-
background-color: $ug-warm-gray;
|
|
125
|
-
color: $ug-black;
|
|
126
|
-
|
|
127
|
-
.ug-footer__brand { color: $ug-black; }
|
|
128
|
-
.ug-footer__text { color: $ug-medium-gray; }
|
|
129
|
-
.ug-footer__link {
|
|
130
|
-
color: $ug-dark-gray;
|
|
131
|
-
&:hover { color: $ug-black; }
|
|
132
|
-
}
|
|
133
|
-
.ug-footer__divider { border-top-color: $ug-light-gray; }
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// ==============================
|
|
137
|
-
// Responsive
|
|
138
|
-
// ==============================
|
|
139
|
-
|
|
140
|
-
@include ug-breakpoint-down("md") {
|
|
141
|
-
padding: calc(var(--ug-leading) * 2) var(--ug-leading);
|
|
142
|
-
|
|
143
|
-
&--compact {
|
|
144
|
-
padding: var(--ug-leading);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
1
|
+
// ==========================================================================
|
|
2
|
+
// Unigrid CSS Framework — Footer (BEM)
|
|
3
|
+
//
|
|
4
|
+
// Sticky footer that always sits at the bottom of the viewport.
|
|
5
|
+
// All spacing aligned to var(--ug-leading).
|
|
6
|
+
//
|
|
7
|
+
// Block: .ug-footer
|
|
8
|
+
// Elements: __inner, __brand, __text, __nav, __link, __divider
|
|
9
|
+
// Modifiers: --compact, --dark (default), --light
|
|
10
|
+
// ==========================================================================
|
|
11
|
+
|
|
12
|
+
@use "variables" as *;
|
|
13
|
+
@use "mixins" as *;
|
|
14
|
+
|
|
15
|
+
// Ensure footer stays at bottom
|
|
16
|
+
html, body {
|
|
17
|
+
min-height: 100vh;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
body {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
|
|
24
|
+
> *:not(.ug-footer) {
|
|
25
|
+
flex-shrink: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
> .ug-footer {
|
|
29
|
+
margin-top: auto;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.ug-footer {
|
|
34
|
+
width: 100%;
|
|
35
|
+
background-color: $ug-black;
|
|
36
|
+
color: $ug-white;
|
|
37
|
+
padding: calc(var(--ug-leading) * 3) calc(var(--ug-leading) * 1.5);
|
|
38
|
+
|
|
39
|
+
// ---- Inner container ----
|
|
40
|
+
&__inner {
|
|
41
|
+
max-width: $ug-container-max-width;
|
|
42
|
+
margin: 0 auto;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// ---- Brand ----
|
|
46
|
+
&__brand {
|
|
47
|
+
@include ug-font-size("lg");
|
|
48
|
+
@include ug-font-weight("bold");
|
|
49
|
+
@include ug-rhythm-line-height(1);
|
|
50
|
+
@include ug-rhythm-margin-bottom(1);
|
|
51
|
+
color: $ug-white;
|
|
52
|
+
text-decoration: none;
|
|
53
|
+
display: block;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// ---- Text ----
|
|
57
|
+
&__text {
|
|
58
|
+
@include ug-font-size("sm");
|
|
59
|
+
@include ug-rhythm-line-height(1);
|
|
60
|
+
color: rgba(255, 255, 255, 0.5);
|
|
61
|
+
margin: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// ---- Navigation ----
|
|
65
|
+
&__nav {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-wrap: wrap;
|
|
68
|
+
gap: var(--ug-leading);
|
|
69
|
+
list-style: none;
|
|
70
|
+
margin: 0;
|
|
71
|
+
padding: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&__link {
|
|
75
|
+
@include ug-font-size("sm");
|
|
76
|
+
@include ug-rhythm-line-height(1);
|
|
77
|
+
color: rgba(255, 255, 255, 0.7);
|
|
78
|
+
text-decoration: none;
|
|
79
|
+
transition: color 0.15s;
|
|
80
|
+
|
|
81
|
+
&:hover {
|
|
82
|
+
color: $ug-white;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// ---- Divider ----
|
|
87
|
+
// 1 leading height: padding-top + 1px border = 1 leading
|
|
88
|
+
&__divider {
|
|
89
|
+
border: none;
|
|
90
|
+
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
|
91
|
+
padding-top: calc(var(--ug-leading) - 1px);
|
|
92
|
+
margin: 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// ==============================
|
|
96
|
+
// Modifiers
|
|
97
|
+
// ==============================
|
|
98
|
+
|
|
99
|
+
// Compact: 1 leading padding, single line
|
|
100
|
+
// Total: padding(1) + content(1 line-height) + padding(1) = 3 leading
|
|
101
|
+
&--compact {
|
|
102
|
+
padding: var(--ug-leading) calc(var(--ug-leading) * 1.5);
|
|
103
|
+
|
|
104
|
+
.ug-footer__inner {
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
justify-content: space-between;
|
|
108
|
+
flex-wrap: wrap;
|
|
109
|
+
gap: var(--ug-leading);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ug-footer__brand {
|
|
113
|
+
margin-bottom: 0;
|
|
114
|
+
@include ug-font-size("sm");
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.ug-footer__nav {
|
|
118
|
+
margin-bottom: 0;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Light
|
|
123
|
+
&--light {
|
|
124
|
+
background-color: $ug-warm-gray;
|
|
125
|
+
color: $ug-black;
|
|
126
|
+
|
|
127
|
+
.ug-footer__brand { color: $ug-black; }
|
|
128
|
+
.ug-footer__text { color: $ug-medium-gray; }
|
|
129
|
+
.ug-footer__link {
|
|
130
|
+
color: $ug-dark-gray;
|
|
131
|
+
&:hover { color: $ug-black; }
|
|
132
|
+
}
|
|
133
|
+
.ug-footer__divider { border-top-color: $ug-light-gray; }
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// ==============================
|
|
137
|
+
// Responsive
|
|
138
|
+
// ==============================
|
|
139
|
+
|
|
140
|
+
@include ug-breakpoint-down("md") {
|
|
141
|
+
padding: calc(var(--ug-leading) * 2) var(--ug-leading);
|
|
142
|
+
|
|
143
|
+
&--compact {
|
|
144
|
+
padding: var(--ug-leading);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
package/src/scss/_formats.scss
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
// ==========================================================================
|
|
2
|
-
// Unigrid CSS Framework — 10 Basic Formats (BEM)
|
|
3
|
-
//
|
|
4
|
-
// Real Unigrid specifications:
|
|
5
|
-
// - A-series: 1 panel wide × N panels long (A1, A2, A3, A4, A6)
|
|
6
|
-
// - B-series: 2 panels wide × N panels long (B1, B2, B3, B4, B6)
|
|
7
|
-
// - No A5 or B5 — intentionally skipped
|
|
8
|
-
// - Panel unit: 99 × 210 mm (folded size is always constant)
|
|
9
|
-
// - B6 = DIN/ISO A2 = root-two rectangle (420 × 594 mm)
|
|
10
|
-
//
|
|
11
|
-
// Block: .ug-format
|
|
12
|
-
// Modifiers: --a1, --a2, --a3, --a4, --a6, --b1, --b2, --b3, --b4, --b6
|
|
13
|
-
// ==========================================================================
|
|
14
|
-
|
|
15
|
-
@use "sass:map";
|
|
16
|
-
@use "variables" as *;
|
|
17
|
-
@use "mixins" as *;
|
|
18
|
-
|
|
19
|
-
// ---- Base Format Block ----
|
|
20
|
-
|
|
21
|
-
.ug-format {
|
|
22
|
-
width: 100%;
|
|
23
|
-
max-width: 100%;
|
|
24
|
-
margin-inline: auto;
|
|
25
|
-
position: relative;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// ---- Generate Format Modifiers ----
|
|
29
|
-
|
|
30
|
-
@each $name, $config in $ug-formats {
|
|
31
|
-
$panels-wide: map.get($config, panels-wide);
|
|
32
|
-
$panels-long: map.get($config, panels-long);
|
|
33
|
-
$cols: $panels-long;
|
|
34
|
-
|
|
35
|
-
.ug-format--#{$name} {
|
|
36
|
-
--ug-panels-wide: #{$panels-wide};
|
|
37
|
-
--ug-panels-long: #{$panels-long};
|
|
38
|
-
--ug-format-cols: #{$cols};
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// ---- Format Grid Override ----
|
|
43
|
-
|
|
44
|
-
@each $name, $config in $ug-formats {
|
|
45
|
-
$panels-long: map.get($config, panels-long);
|
|
46
|
-
|
|
47
|
-
.ug-format--#{$name} > .ug-broadside,
|
|
48
|
-
.ug-format--#{$name} > .ug-grid {
|
|
49
|
-
grid-template-columns: repeat(#{$panels-long}, 1fr);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// ---- DIN Aspect Ratio Helpers ----
|
|
54
|
-
|
|
55
|
-
.ug-ratio {
|
|
56
|
-
&--din {
|
|
57
|
-
aspect-ratio: 1 #{"/"} #{$ug-ratio};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&--din-landscape {
|
|
61
|
-
aspect-ratio: #{$ug-ratio} #{"/"} 1;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
1
|
+
// ==========================================================================
|
|
2
|
+
// Unigrid CSS Framework — 10 Basic Formats (BEM)
|
|
3
|
+
//
|
|
4
|
+
// Real Unigrid specifications:
|
|
5
|
+
// - A-series: 1 panel wide × N panels long (A1, A2, A3, A4, A6)
|
|
6
|
+
// - B-series: 2 panels wide × N panels long (B1, B2, B3, B4, B6)
|
|
7
|
+
// - No A5 or B5 — intentionally skipped
|
|
8
|
+
// - Panel unit: 99 × 210 mm (folded size is always constant)
|
|
9
|
+
// - B6 = DIN/ISO A2 = root-two rectangle (420 × 594 mm)
|
|
10
|
+
//
|
|
11
|
+
// Block: .ug-format
|
|
12
|
+
// Modifiers: --a1, --a2, --a3, --a4, --a6, --b1, --b2, --b3, --b4, --b6
|
|
13
|
+
// ==========================================================================
|
|
14
|
+
|
|
15
|
+
@use "sass:map";
|
|
16
|
+
@use "variables" as *;
|
|
17
|
+
@use "mixins" as *;
|
|
18
|
+
|
|
19
|
+
// ---- Base Format Block ----
|
|
20
|
+
|
|
21
|
+
.ug-format {
|
|
22
|
+
width: 100%;
|
|
23
|
+
max-width: 100%;
|
|
24
|
+
margin-inline: auto;
|
|
25
|
+
position: relative;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// ---- Generate Format Modifiers ----
|
|
29
|
+
|
|
30
|
+
@each $name, $config in $ug-formats {
|
|
31
|
+
$panels-wide: map.get($config, panels-wide);
|
|
32
|
+
$panels-long: map.get($config, panels-long);
|
|
33
|
+
$cols: $panels-long;
|
|
34
|
+
|
|
35
|
+
.ug-format--#{$name} {
|
|
36
|
+
--ug-panels-wide: #{$panels-wide};
|
|
37
|
+
--ug-panels-long: #{$panels-long};
|
|
38
|
+
--ug-format-cols: #{$cols};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// ---- Format Grid Override ----
|
|
43
|
+
|
|
44
|
+
@each $name, $config in $ug-formats {
|
|
45
|
+
$panels-long: map.get($config, panels-long);
|
|
46
|
+
|
|
47
|
+
.ug-format--#{$name} > .ug-broadside,
|
|
48
|
+
.ug-format--#{$name} > .ug-grid {
|
|
49
|
+
grid-template-columns: repeat(#{$panels-long}, 1fr);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// ---- DIN Aspect Ratio Helpers ----
|
|
54
|
+
|
|
55
|
+
.ug-ratio {
|
|
56
|
+
&--din {
|
|
57
|
+
aspect-ratio: 1 #{"/"} #{$ug-ratio};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&--din-landscape {
|
|
61
|
+
aspect-ratio: #{$ug-ratio} #{"/"} 1;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|