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.
Files changed (44) hide show
  1. package/README.md +101 -101
  2. package/dist/dropdown.js +36 -36
  3. package/dist/scrollspy.js +57 -57
  4. package/dist/tabs.js +30 -30
  5. package/dist/unigrid.css +4608 -4501
  6. package/dist/unigrid.js +173 -124
  7. package/dist/unigrid.min.css +1 -1
  8. package/dist/unigrid.min.js +1 -1
  9. package/package.json +70 -41
  10. package/src/js/dropdown.js +49 -49
  11. package/src/js/index.js +20 -19
  12. package/src/js/modal.js +81 -0
  13. package/src/js/scrollspy.js +87 -87
  14. package/src/js/tabs.js +58 -58
  15. package/src/scss/_accordion.scss +123 -123
  16. package/src/scss/_broadside.scss +125 -125
  17. package/src/scss/_buttons.scss +241 -241
  18. package/src/scss/_card.scss +168 -168
  19. package/src/scss/_components.scss +140 -140
  20. package/src/scss/_container.scss +53 -53
  21. package/src/scss/_dropdown.scss +178 -178
  22. package/src/scss/_footer.scss +147 -147
  23. package/src/scss/_formats.scss +64 -64
  24. package/src/scss/_forms.scss +192 -192
  25. package/src/scss/_grid.scss +114 -114
  26. package/src/scss/_header.scss +169 -169
  27. package/src/scss/_hero.scss +262 -262
  28. package/src/scss/_mixins.scss +120 -120
  29. package/src/scss/_modal.scss +158 -0
  30. package/src/scss/_modules.scss +238 -238
  31. package/src/scss/_navbar.scss +341 -341
  32. package/src/scss/_pagination.scss +160 -160
  33. package/src/scss/_prose.scss +393 -393
  34. package/src/scss/_reset.scss +82 -82
  35. package/src/scss/_scrollspy.scss +62 -62
  36. package/src/scss/_section.scss +91 -91
  37. package/src/scss/_sidebar.scss +147 -147
  38. package/src/scss/_table.scss +122 -122
  39. package/src/scss/_tabs.scss +178 -178
  40. package/src/scss/_typography.scss +105 -105
  41. package/src/scss/_utilities.scss +79 -79
  42. package/src/scss/_variables.scss +183 -183
  43. package/src/scss/unigrid.scss +50 -49
  44. package/dist/index.js +0 -5
@@ -1,238 +1,238 @@
1
- // ==========================================================================
2
- // Unigrid CSS Framework — Square Module System
3
- //
4
- // Inspired by Uniweb (Arlandi Design) and Vignelli's original Unigrid.
5
- // The base unit "U" is a square module. All dimensions are multiples of U.
6
- // Uses vw units for viewport-proportional sizing.
7
- //
8
- // Responsive column reduction: 3 → 4 → 6 → 8 → 12 (mobile-first)
9
- //
10
- // Usage:
11
- // <div class="ug-modules">
12
- // <div class="ug-module ug-module--1x1">Square</div>
13
- // <div class="ug-module ug-module--1x2">Wide</div>
14
- // </div>
15
- //
16
- // Block: .ug-modules (container)
17
- // Block: .ug-module (individual module)
18
- // Modifiers: --{h}x{w} for height × width in module units
19
- // ==========================================================================
20
-
21
- @use "sass:math";
22
- @use "sass:map";
23
- @use "variables" as *;
24
- @use "mixins" as *;
25
-
26
- // ---- Module Grid Configuration ----
27
-
28
- $ug-module-grid: (
29
- "xs": (cols: 3, gutter: 2.3810vw, module: 28.5714vw, margin: 4.7619vw, max-w: 3),
30
- "sm": (cols: 4, gutter: 2.1277vw, module: 21.2766vw, margin: 4.2553vw, max-w: 4),
31
- "md": (cols: 6, gutter: 1.7544vw, module: 14.0351vw, margin: 3.5088vw, max-w: 6),
32
- "lg": (cols: 8, gutter: 1.4925vw, module: 10.4478vw, margin: 2.9851vw, max-w: 8),
33
- "xl": (cols: 12, gutter: 1.1494vw, module: 6.8966vw, margin: 2.2989vw, max-w: 12),
34
- ) !default;
35
-
36
- $ug-module-max-height: 6;
37
-
38
- // ---- Module Container ----
39
-
40
- .ug-modules {
41
- position: relative;
42
- display: flex;
43
- flex-wrap: wrap;
44
- box-sizing: border-box;
45
- width: 100%;
46
-
47
- &--flush {
48
- padding: 0;
49
- }
50
- }
51
-
52
- // ---- Individual Module ----
53
-
54
- .ug-module {
55
- position: relative;
56
- box-sizing: border-box;
57
- overflow: hidden;
58
- flex-shrink: 0;
59
- }
60
-
61
- // ---- Default (mobile / xs): 3 columns ----
62
-
63
- $_xs: map.get($ug-module-grid, "xs");
64
- $_xs-g: map.get($_xs, gutter);
65
- $_xs-m: map.get($_xs, module);
66
- $_xs-margin: map.get($_xs, margin);
67
-
68
- .ug-modules {
69
- padding: $_xs-g 0 0 $_xs-margin;
70
- gap: $_xs-g;
71
- }
72
-
73
- .ug-module {
74
- margin: 0;
75
- }
76
-
77
- @each $w in (1, 2, 3) {
78
- @for $h from 1 through $ug-module-max-height {
79
- .ug-module--#{$h}x#{$w} {
80
- @if $h == 1 and $w == 1 {
81
- height: $_xs-m;
82
- width: $_xs-m;
83
- } @else {
84
- height: calc(#{$_xs-m} * #{$h} + #{$_xs-g} * #{$h - 1});
85
- width: calc(#{$_xs-m} * #{$w} + #{$_xs-g} * #{$w - 1});
86
- }
87
- @if $h == 1 {
88
- height: $_xs-m;
89
- }
90
- @if $w == 1 {
91
- width: $_xs-m;
92
- }
93
- }
94
- }
95
- }
96
-
97
- .ug-module--auto-height { height: auto; }
98
- .ug-module--no-margin { margin-right: 0; }
99
-
100
- // ---- Phablet (sm): 4 columns ----
101
-
102
- @media screen and (min-width: 640px) {
103
- $_sm: map.get($ug-module-grid, "sm");
104
- $_sm-g: map.get($_sm, gutter);
105
- $_sm-m: map.get($_sm, module);
106
- $_sm-margin: map.get($_sm, margin);
107
-
108
- .ug-modules { padding: $_sm-g 0 0 $_sm-margin; gap: $_sm-g; }
109
- .ug-module { margin: 0; }
110
-
111
- @each $w in (1, 2, 3, 4) {
112
- @for $h from 1 through $ug-module-max-height {
113
- .ug-module--#{$h}x#{$w},
114
- .ug-module--sm-#{$h}x#{$w} {
115
- @if $w == 1 {
116
- height: calc(#{$_sm-m} * #{$h} + #{$_sm-g} * #{$h - 1});
117
- width: $_sm-m;
118
- } @else if $h == 1 {
119
- height: $_sm-m;
120
- width: calc(#{$_sm-m} * #{$w} + #{$_sm-g} * #{$w - 1});
121
- } @else {
122
- height: calc(#{$_sm-m} * #{$h} + #{$_sm-g} * #{$h - 1});
123
- width: calc(#{$_sm-m} * #{$w} + #{$_sm-g} * #{$w - 1});
124
- }
125
- }
126
- }
127
- }
128
-
129
- .ug-module--sm-auto-height { height: auto; }
130
- .ug-module--sm-no-margin { margin-right: 0; }
131
- }
132
-
133
- // ---- Tablet (md): 6 columns ----
134
-
135
- @media screen and (min-width: 1024px) {
136
- $_md: map.get($ug-module-grid, "md");
137
- $_md-g: map.get($_md, gutter);
138
- $_md-m: map.get($_md, module);
139
- $_md-margin: map.get($_md, margin);
140
-
141
- .ug-modules { padding: $_md-g 0 0 $_md-margin; gap: $_md-g; }
142
- .ug-module { margin: 0; }
143
-
144
- @each $w in (1, 2, 3, 4, 6) {
145
- @for $h from 1 through $ug-module-max-height {
146
- .ug-module--#{$h}x#{$w},
147
- .ug-module--md-#{$h}x#{$w} {
148
- @if $w == 1 {
149
- height: calc(#{$_md-m} * #{$h} + #{$_md-g} * #{$h - 1});
150
- width: $_md-m;
151
- } @else if $h == 1 {
152
- height: $_md-m;
153
- width: calc(#{$_md-m} * #{$w} + #{$_md-g} * #{$w - 1});
154
- } @else {
155
- height: calc(#{$_md-m} * #{$h} + #{$_md-g} * #{$h - 1});
156
- width: calc(#{$_md-m} * #{$w} + #{$_md-g} * #{$w - 1});
157
- }
158
- }
159
- }
160
- }
161
-
162
- .ug-module--md-auto-height { height: auto; }
163
- .ug-module--md-no-margin { margin-right: 0; }
164
- }
165
-
166
- // ---- Laptop (lg): 8 columns ----
167
-
168
- @media screen and (min-width: 1300px) {
169
- $_lg: map.get($ug-module-grid, "lg");
170
- $_lg-g: map.get($_lg, gutter);
171
- $_lg-m: map.get($_lg, module);
172
- $_lg-margin: map.get($_lg, margin);
173
-
174
- .ug-modules { padding: $_lg-g 0 0 $_lg-margin; gap: $_lg-g; }
175
- .ug-module { margin: 0; }
176
-
177
- @each $w in (1, 2, 3, 4, 6, 8) {
178
- @for $h from 1 through $ug-module-max-height {
179
- .ug-module--#{$h}x#{$w},
180
- .ug-module--lg-#{$h}x#{$w} {
181
- @if $w == 1 {
182
- height: calc(#{$_lg-m} * #{$h} + #{$_lg-g} * #{$h - 1});
183
- width: $_lg-m;
184
- } @else if $h == 1 {
185
- height: $_lg-m;
186
- width: calc(#{$_lg-m} * #{$w} + #{$_lg-g} * #{$w - 1});
187
- } @else {
188
- height: calc(#{$_lg-m} * #{$h} + #{$_lg-g} * #{$h - 1});
189
- width: calc(#{$_lg-m} * #{$w} + #{$_lg-g} * #{$w - 1});
190
- }
191
- }
192
- }
193
- }
194
-
195
- .ug-module--lg-auto-height { height: auto; }
196
- .ug-module--lg-no-margin { margin-right: 0; }
197
- }
198
-
199
- // ---- Desktop (xl): 12 columns ----
200
-
201
- @media screen and (min-width: 1600px) {
202
- $_xl: map.get($ug-module-grid, "xl");
203
- $_xl-g: map.get($_xl, gutter);
204
- $_xl-m: map.get($_xl, module);
205
- $_xl-margin: map.get($_xl, margin);
206
-
207
- .ug-modules { padding: $_xl-g 0 0 $_xl-margin; gap: $_xl-g; }
208
- .ug-module { margin: 0; }
209
-
210
- @each $w in (1, 2, 3, 4, 6, 8, 12) {
211
- @for $h from 1 through $ug-module-max-height {
212
- .ug-module--#{$h}x#{$w},
213
- .ug-module--xl-#{$h}x#{$w} {
214
- @if $w == 1 {
215
- height: calc(#{$_xl-m} * #{$h} + #{$_xl-g} * #{$h - 1});
216
- width: $_xl-m;
217
- } @else if $h == 1 {
218
- height: $_xl-m;
219
- width: calc(#{$_xl-m} * #{$w} + #{$_xl-g} * #{$w - 1});
220
- } @else {
221
- height: calc(#{$_xl-m} * #{$h} + #{$_xl-g} * #{$h - 1});
222
- width: calc(#{$_xl-m} * #{$w} + #{$_xl-g} * #{$w - 1});
223
- }
224
- }
225
- }
226
- }
227
-
228
- .ug-module--xl-auto-height { height: auto; }
229
- .ug-module--xl-no-margin { margin-right: 0; }
230
- }
231
-
232
- // ---- Responsive Visibility ----
233
-
234
- .ug-module--hidden-xl { @media screen and (min-width: 1600px) { display: none; } }
235
- .ug-module--hidden-lg { @media screen and (min-width: 1300px) and (max-width: 1599px) { display: none; } }
236
- .ug-module--hidden-md { @media screen and (min-width: 1024px) and (max-width: 1299px) { display: none; } }
237
- .ug-module--hidden-sm { @media screen and (min-width: 640px) and (max-width: 1023px) { display: none; } }
238
- .ug-module--hidden-xs { @media screen and (max-width: 639px) { display: none; } }
1
+ // ==========================================================================
2
+ // Unigrid CSS Framework — Square Module System
3
+ //
4
+ // Inspired by Uniweb (Arlandi Design) and Vignelli's original Unigrid.
5
+ // The base unit "U" is a square module. All dimensions are multiples of U.
6
+ // Uses vw units for viewport-proportional sizing.
7
+ //
8
+ // Responsive column reduction: 3 → 4 → 6 → 8 → 12 (mobile-first)
9
+ //
10
+ // Usage:
11
+ // <div class="ug-modules">
12
+ // <div class="ug-module ug-module--1x1">Square</div>
13
+ // <div class="ug-module ug-module--1x2">Wide</div>
14
+ // </div>
15
+ //
16
+ // Block: .ug-modules (container)
17
+ // Block: .ug-module (individual module)
18
+ // Modifiers: --{h}x{w} for height × width in module units
19
+ // ==========================================================================
20
+
21
+ @use "sass:math";
22
+ @use "sass:map";
23
+ @use "variables" as *;
24
+ @use "mixins" as *;
25
+
26
+ // ---- Module Grid Configuration ----
27
+
28
+ $ug-module-grid: (
29
+ "xs": (cols: 3, gutter: 2.3810vw, module: 28.5714vw, margin: 4.7619vw, max-w: 3),
30
+ "sm": (cols: 4, gutter: 2.1277vw, module: 21.2766vw, margin: 4.2553vw, max-w: 4),
31
+ "md": (cols: 6, gutter: 1.7544vw, module: 14.0351vw, margin: 3.5088vw, max-w: 6),
32
+ "lg": (cols: 8, gutter: 1.4925vw, module: 10.4478vw, margin: 2.9851vw, max-w: 8),
33
+ "xl": (cols: 12, gutter: 1.1494vw, module: 6.8966vw, margin: 2.2989vw, max-w: 12),
34
+ ) !default;
35
+
36
+ $ug-module-max-height: 6;
37
+
38
+ // ---- Module Container ----
39
+
40
+ .ug-modules {
41
+ position: relative;
42
+ display: flex;
43
+ flex-wrap: wrap;
44
+ box-sizing: border-box;
45
+ width: 100%;
46
+
47
+ &--flush {
48
+ padding: 0;
49
+ }
50
+ }
51
+
52
+ // ---- Individual Module ----
53
+
54
+ .ug-module {
55
+ position: relative;
56
+ box-sizing: border-box;
57
+ overflow: hidden;
58
+ flex-shrink: 0;
59
+ }
60
+
61
+ // ---- Default (mobile / xs): 3 columns ----
62
+
63
+ $_xs: map.get($ug-module-grid, "xs");
64
+ $_xs-g: map.get($_xs, gutter);
65
+ $_xs-m: map.get($_xs, module);
66
+ $_xs-margin: map.get($_xs, margin);
67
+
68
+ .ug-modules {
69
+ padding: $_xs-g 0 0 $_xs-margin;
70
+ gap: $_xs-g;
71
+ }
72
+
73
+ .ug-module {
74
+ margin: 0;
75
+ }
76
+
77
+ @each $w in (1, 2, 3) {
78
+ @for $h from 1 through $ug-module-max-height {
79
+ .ug-module--#{$h}x#{$w} {
80
+ @if $h == 1 and $w == 1 {
81
+ height: $_xs-m;
82
+ width: $_xs-m;
83
+ } @else {
84
+ height: calc(#{$_xs-m} * #{$h} + #{$_xs-g} * #{$h - 1});
85
+ width: calc(#{$_xs-m} * #{$w} + #{$_xs-g} * #{$w - 1});
86
+ }
87
+ @if $h == 1 {
88
+ height: $_xs-m;
89
+ }
90
+ @if $w == 1 {
91
+ width: $_xs-m;
92
+ }
93
+ }
94
+ }
95
+ }
96
+
97
+ .ug-module--auto-height { height: auto; }
98
+ .ug-module--no-margin { margin-right: 0; }
99
+
100
+ // ---- Phablet (sm): 4 columns ----
101
+
102
+ @media screen and (min-width: 640px) {
103
+ $_sm: map.get($ug-module-grid, "sm");
104
+ $_sm-g: map.get($_sm, gutter);
105
+ $_sm-m: map.get($_sm, module);
106
+ $_sm-margin: map.get($_sm, margin);
107
+
108
+ .ug-modules { padding: $_sm-g 0 0 $_sm-margin; gap: $_sm-g; }
109
+ .ug-module { margin: 0; }
110
+
111
+ @each $w in (1, 2, 3, 4) {
112
+ @for $h from 1 through $ug-module-max-height {
113
+ .ug-module--#{$h}x#{$w},
114
+ .ug-module--sm-#{$h}x#{$w} {
115
+ @if $w == 1 {
116
+ height: calc(#{$_sm-m} * #{$h} + #{$_sm-g} * #{$h - 1});
117
+ width: $_sm-m;
118
+ } @else if $h == 1 {
119
+ height: $_sm-m;
120
+ width: calc(#{$_sm-m} * #{$w} + #{$_sm-g} * #{$w - 1});
121
+ } @else {
122
+ height: calc(#{$_sm-m} * #{$h} + #{$_sm-g} * #{$h - 1});
123
+ width: calc(#{$_sm-m} * #{$w} + #{$_sm-g} * #{$w - 1});
124
+ }
125
+ }
126
+ }
127
+ }
128
+
129
+ .ug-module--sm-auto-height { height: auto; }
130
+ .ug-module--sm-no-margin { margin-right: 0; }
131
+ }
132
+
133
+ // ---- Tablet (md): 6 columns ----
134
+
135
+ @media screen and (min-width: 1024px) {
136
+ $_md: map.get($ug-module-grid, "md");
137
+ $_md-g: map.get($_md, gutter);
138
+ $_md-m: map.get($_md, module);
139
+ $_md-margin: map.get($_md, margin);
140
+
141
+ .ug-modules { padding: $_md-g 0 0 $_md-margin; gap: $_md-g; }
142
+ .ug-module { margin: 0; }
143
+
144
+ @each $w in (1, 2, 3, 4, 6) {
145
+ @for $h from 1 through $ug-module-max-height {
146
+ .ug-module--#{$h}x#{$w},
147
+ .ug-module--md-#{$h}x#{$w} {
148
+ @if $w == 1 {
149
+ height: calc(#{$_md-m} * #{$h} + #{$_md-g} * #{$h - 1});
150
+ width: $_md-m;
151
+ } @else if $h == 1 {
152
+ height: $_md-m;
153
+ width: calc(#{$_md-m} * #{$w} + #{$_md-g} * #{$w - 1});
154
+ } @else {
155
+ height: calc(#{$_md-m} * #{$h} + #{$_md-g} * #{$h - 1});
156
+ width: calc(#{$_md-m} * #{$w} + #{$_md-g} * #{$w - 1});
157
+ }
158
+ }
159
+ }
160
+ }
161
+
162
+ .ug-module--md-auto-height { height: auto; }
163
+ .ug-module--md-no-margin { margin-right: 0; }
164
+ }
165
+
166
+ // ---- Laptop (lg): 8 columns ----
167
+
168
+ @media screen and (min-width: 1300px) {
169
+ $_lg: map.get($ug-module-grid, "lg");
170
+ $_lg-g: map.get($_lg, gutter);
171
+ $_lg-m: map.get($_lg, module);
172
+ $_lg-margin: map.get($_lg, margin);
173
+
174
+ .ug-modules { padding: $_lg-g 0 0 $_lg-margin; gap: $_lg-g; }
175
+ .ug-module { margin: 0; }
176
+
177
+ @each $w in (1, 2, 3, 4, 6, 8) {
178
+ @for $h from 1 through $ug-module-max-height {
179
+ .ug-module--#{$h}x#{$w},
180
+ .ug-module--lg-#{$h}x#{$w} {
181
+ @if $w == 1 {
182
+ height: calc(#{$_lg-m} * #{$h} + #{$_lg-g} * #{$h - 1});
183
+ width: $_lg-m;
184
+ } @else if $h == 1 {
185
+ height: $_lg-m;
186
+ width: calc(#{$_lg-m} * #{$w} + #{$_lg-g} * #{$w - 1});
187
+ } @else {
188
+ height: calc(#{$_lg-m} * #{$h} + #{$_lg-g} * #{$h - 1});
189
+ width: calc(#{$_lg-m} * #{$w} + #{$_lg-g} * #{$w - 1});
190
+ }
191
+ }
192
+ }
193
+ }
194
+
195
+ .ug-module--lg-auto-height { height: auto; }
196
+ .ug-module--lg-no-margin { margin-right: 0; }
197
+ }
198
+
199
+ // ---- Desktop (xl): 12 columns ----
200
+
201
+ @media screen and (min-width: 1600px) {
202
+ $_xl: map.get($ug-module-grid, "xl");
203
+ $_xl-g: map.get($_xl, gutter);
204
+ $_xl-m: map.get($_xl, module);
205
+ $_xl-margin: map.get($_xl, margin);
206
+
207
+ .ug-modules { padding: $_xl-g 0 0 $_xl-margin; gap: $_xl-g; }
208
+ .ug-module { margin: 0; }
209
+
210
+ @each $w in (1, 2, 3, 4, 6, 8, 12) {
211
+ @for $h from 1 through $ug-module-max-height {
212
+ .ug-module--#{$h}x#{$w},
213
+ .ug-module--xl-#{$h}x#{$w} {
214
+ @if $w == 1 {
215
+ height: calc(#{$_xl-m} * #{$h} + #{$_xl-g} * #{$h - 1});
216
+ width: $_xl-m;
217
+ } @else if $h == 1 {
218
+ height: $_xl-m;
219
+ width: calc(#{$_xl-m} * #{$w} + #{$_xl-g} * #{$w - 1});
220
+ } @else {
221
+ height: calc(#{$_xl-m} * #{$h} + #{$_xl-g} * #{$h - 1});
222
+ width: calc(#{$_xl-m} * #{$w} + #{$_xl-g} * #{$w - 1});
223
+ }
224
+ }
225
+ }
226
+ }
227
+
228
+ .ug-module--xl-auto-height { height: auto; }
229
+ .ug-module--xl-no-margin { margin-right: 0; }
230
+ }
231
+
232
+ // ---- Responsive Visibility ----
233
+
234
+ .ug-module--hidden-xl { @media screen and (min-width: 1600px) { display: none; } }
235
+ .ug-module--hidden-lg { @media screen and (min-width: 1300px) and (max-width: 1599px) { display: none; } }
236
+ .ug-module--hidden-md { @media screen and (min-width: 1024px) and (max-width: 1299px) { display: none; } }
237
+ .ug-module--hidden-sm { @media screen and (min-width: 640px) and (max-width: 1023px) { display: none; } }
238
+ .ug-module--hidden-xs { @media screen and (max-width: 639px) { display: none; } }