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,178 +1,178 @@
1
- // ==========================================================================
2
- // Unigrid CSS Framework — Tabs (BEM)
3
- //
4
- // Tab navigation with content panels. Toggle via JS (.ug-tab--active).
5
- //
6
- // Block: .ug-tabs
7
- // Elements: __nav, __item, __link, __content, __panel
8
- // Modifiers: --bordered, --pills, --vertical
9
- // __link--active, __panel--active
10
- // ==========================================================================
11
-
12
- @use "variables" as *;
13
- @use "mixins" as *;
14
-
15
- .ug-tabs {
16
-
17
- // ---- Tab Navigation ----
18
- &__nav {
19
- display: flex;
20
- list-style: none;
21
- margin: 0;
22
- padding: 0;
23
- border-bottom: 2px solid $ug-light-gray;
24
- }
25
-
26
- &__item {
27
- display: flex;
28
- }
29
-
30
- &__link {
31
- display: inline-flex;
32
- align-items: center;
33
- padding: calc(var(--ug-leading) * 0.5) var(--ug-leading);
34
- @include ug-font-size("sm");
35
- @include ug-font-weight("bold");
36
- @include ug-rhythm-line-height(1);
37
- color: $ug-medium-gray;
38
- text-decoration: none;
39
- border: none;
40
- background: none;
41
- cursor: pointer;
42
- font-family: inherit;
43
- position: relative;
44
- transition: color 0.15s;
45
- margin-bottom: -2px;
46
- border-bottom: 2px solid transparent;
47
-
48
- &:hover {
49
- color: $ug-black;
50
- }
51
-
52
- &--active {
53
- color: $ug-black;
54
- border-bottom-color: $ug-black;
55
- }
56
- }
57
-
58
- // ---- Tab Content ----
59
- &__content {
60
- padding: var(--ug-leading) 0;
61
- }
62
-
63
- &__panel {
64
- display: none;
65
-
66
- &--active {
67
- display: block;
68
- }
69
- }
70
-
71
- // ==============================
72
- // Modifiers
73
- // ==============================
74
-
75
- // Bordered tabs (box around active tab)
76
- &--bordered {
77
- .ug-tabs__nav {
78
- border-bottom: 1px solid $ug-light-gray;
79
- }
80
-
81
- .ug-tabs__link {
82
- border: 1px solid transparent;
83
- border-bottom: none;
84
- margin-bottom: -1px;
85
- padding: calc(var(--ug-leading) * 0.5) var(--ug-leading);
86
-
87
- &--active {
88
- border-color: $ug-light-gray;
89
- background-color: $ug-white;
90
- // Hide bottom border by overlapping the nav border
91
- box-shadow: 0 1px 0 0 $ug-white;
92
- }
93
- }
94
- }
95
-
96
- // Pill tabs (rounded backgrounds)
97
- &--pills {
98
- .ug-tabs__nav {
99
- border-bottom: none;
100
- gap: calc(var(--ug-leading) * 0.25);
101
- }
102
-
103
- .ug-tabs__link {
104
- border-bottom: none;
105
- margin-bottom: 0;
106
- border-radius: 2px;
107
-
108
- &:hover {
109
- background-color: $ug-warm-gray;
110
- }
111
-
112
- &--active {
113
- background-color: $ug-black;
114
- color: $ug-white;
115
-
116
- &:hover {
117
- background-color: $ug-dark-gray;
118
- }
119
- }
120
- }
121
- }
122
-
123
- // Vertical tabs (sidebar layout)
124
- &--vertical {
125
- display: flex;
126
- gap: var(--ug-leading);
127
-
128
- .ug-tabs__nav {
129
- flex-direction: column;
130
- border-bottom: none;
131
- border-right: 2px solid $ug-light-gray;
132
- flex-shrink: 0;
133
- min-width: calc(var(--ug-leading) * 8);
134
- }
135
-
136
- .ug-tabs__link {
137
- margin-bottom: 0;
138
- margin-right: -2px;
139
- border-bottom: none;
140
- border-right: 2px solid transparent;
141
-
142
- &--active {
143
- border-right-color: $ug-black;
144
- border-bottom-color: transparent;
145
- }
146
- }
147
-
148
- .ug-tabs__content {
149
- flex: 1;
150
- padding: 0;
151
- }
152
-
153
- @include ug-breakpoint-down("md") {
154
- flex-direction: column;
155
-
156
- .ug-tabs__nav {
157
- flex-direction: row;
158
- border-right: none;
159
- border-bottom: 2px solid $ug-light-gray;
160
- min-width: 0;
161
- overflow-x: auto;
162
- }
163
-
164
- .ug-tabs__link {
165
- margin-right: 0;
166
- margin-bottom: -2px;
167
- border-right: none;
168
- border-bottom: 2px solid transparent;
169
- white-space: nowrap;
170
-
171
- &--active {
172
- border-right-color: transparent;
173
- border-bottom-color: $ug-black;
174
- }
175
- }
176
- }
177
- }
178
- }
1
+ // ==========================================================================
2
+ // Unigrid CSS Framework — Tabs (BEM)
3
+ //
4
+ // Tab navigation with content panels. Toggle via JS (.ug-tab--active).
5
+ //
6
+ // Block: .ug-tabs
7
+ // Elements: __nav, __item, __link, __content, __panel
8
+ // Modifiers: --bordered, --pills, --vertical
9
+ // __link--active, __panel--active
10
+ // ==========================================================================
11
+
12
+ @use "variables" as *;
13
+ @use "mixins" as *;
14
+
15
+ .ug-tabs {
16
+
17
+ // ---- Tab Navigation ----
18
+ &__nav {
19
+ display: flex;
20
+ list-style: none;
21
+ margin: 0;
22
+ padding: 0;
23
+ border-bottom: 2px solid $ug-light-gray;
24
+ }
25
+
26
+ &__item {
27
+ display: flex;
28
+ }
29
+
30
+ &__link {
31
+ display: inline-flex;
32
+ align-items: center;
33
+ padding: calc(var(--ug-leading) * 0.5) var(--ug-leading);
34
+ @include ug-font-size("sm");
35
+ @include ug-font-weight("bold");
36
+ @include ug-rhythm-line-height(1);
37
+ color: $ug-medium-gray;
38
+ text-decoration: none;
39
+ border: none;
40
+ background: none;
41
+ cursor: pointer;
42
+ font-family: inherit;
43
+ position: relative;
44
+ transition: color 0.15s;
45
+ margin-bottom: -2px;
46
+ border-bottom: 2px solid transparent;
47
+
48
+ &:hover {
49
+ color: $ug-black;
50
+ }
51
+
52
+ &--active {
53
+ color: $ug-black;
54
+ border-bottom-color: $ug-black;
55
+ }
56
+ }
57
+
58
+ // ---- Tab Content ----
59
+ &__content {
60
+ padding: var(--ug-leading) 0;
61
+ }
62
+
63
+ &__panel {
64
+ display: none;
65
+
66
+ &--active {
67
+ display: block;
68
+ }
69
+ }
70
+
71
+ // ==============================
72
+ // Modifiers
73
+ // ==============================
74
+
75
+ // Bordered tabs (box around active tab)
76
+ &--bordered {
77
+ .ug-tabs__nav {
78
+ border-bottom: 1px solid $ug-light-gray;
79
+ }
80
+
81
+ .ug-tabs__link {
82
+ border: 1px solid transparent;
83
+ border-bottom: none;
84
+ margin-bottom: -1px;
85
+ padding: calc(var(--ug-leading) * 0.5) var(--ug-leading);
86
+
87
+ &--active {
88
+ border-color: $ug-light-gray;
89
+ background-color: $ug-white;
90
+ // Hide bottom border by overlapping the nav border
91
+ box-shadow: 0 1px 0 0 $ug-white;
92
+ }
93
+ }
94
+ }
95
+
96
+ // Pill tabs (rounded backgrounds)
97
+ &--pills {
98
+ .ug-tabs__nav {
99
+ border-bottom: none;
100
+ gap: calc(var(--ug-leading) * 0.25);
101
+ }
102
+
103
+ .ug-tabs__link {
104
+ border-bottom: none;
105
+ margin-bottom: 0;
106
+ border-radius: 2px;
107
+
108
+ &:hover {
109
+ background-color: $ug-warm-gray;
110
+ }
111
+
112
+ &--active {
113
+ background-color: $ug-black;
114
+ color: $ug-white;
115
+
116
+ &:hover {
117
+ background-color: $ug-dark-gray;
118
+ }
119
+ }
120
+ }
121
+ }
122
+
123
+ // Vertical tabs (sidebar layout)
124
+ &--vertical {
125
+ display: flex;
126
+ gap: var(--ug-leading);
127
+
128
+ .ug-tabs__nav {
129
+ flex-direction: column;
130
+ border-bottom: none;
131
+ border-right: 2px solid $ug-light-gray;
132
+ flex-shrink: 0;
133
+ min-width: calc(var(--ug-leading) * 8);
134
+ }
135
+
136
+ .ug-tabs__link {
137
+ margin-bottom: 0;
138
+ margin-right: -2px;
139
+ border-bottom: none;
140
+ border-right: 2px solid transparent;
141
+
142
+ &--active {
143
+ border-right-color: $ug-black;
144
+ border-bottom-color: transparent;
145
+ }
146
+ }
147
+
148
+ .ug-tabs__content {
149
+ flex: 1;
150
+ padding: 0;
151
+ }
152
+
153
+ @include ug-breakpoint-down("md") {
154
+ flex-direction: column;
155
+
156
+ .ug-tabs__nav {
157
+ flex-direction: row;
158
+ border-right: none;
159
+ border-bottom: 2px solid $ug-light-gray;
160
+ min-width: 0;
161
+ overflow-x: auto;
162
+ }
163
+
164
+ .ug-tabs__link {
165
+ margin-right: 0;
166
+ margin-bottom: -2px;
167
+ border-right: none;
168
+ border-bottom: 2px solid transparent;
169
+ white-space: nowrap;
170
+
171
+ &--active {
172
+ border-right-color: transparent;
173
+ border-bottom-color: $ug-black;
174
+ }
175
+ }
176
+ }
177
+ }
178
+ }
@@ -1,105 +1,105 @@
1
- // ==========================================================================
2
- // Unigrid CSS Framework — Typography (BEM)
3
- //
4
- // Utility classes for typography. Vertical spacing aligned to the
5
- // Gutenberg leading ($ug-leading-rem) for consistent rhythm.
6
- // ==========================================================================
7
-
8
- @use "sass:list";
9
- @use "sass:map";
10
- @use "variables" as *;
11
- @use "mixins" as *;
12
-
13
- // ---- Headings (from $ug-headings map) ----
14
- // Styles applied to both the HTML element (h1-h6) and the utility class (.ug-h1-.ug-h6).
15
- // The .ug-h* classes are for non-heading elements that need heading styling.
16
-
17
- @each $heading, $props in $ug-headings {
18
- #{$heading},
19
- .ug-#{$heading} {
20
- @include ug-rhythm-font-size(list.nth($props, 1));
21
- @include ug-rhythm-line-height(list.nth($props, 2));
22
- @include ug-font-weight("bold");
23
- @include ug-rhythm-margin-bottom(0.5);
24
- margin-top: 0;
25
-
26
- @if $heading == "h1" {
27
- @include ug-font-weight("extra-bold");
28
- letter-spacing: -0.02em;
29
- }
30
- }
31
- }
32
-
33
- // ---- Body Text ----
34
-
35
- .ug-body {
36
- @include ug-font-size("base");
37
- @include ug-font-weight("regular");
38
- @include ug-rhythm-line-height(1);
39
-
40
- &--sm {
41
- @include ug-font-size("sm");
42
- }
43
-
44
- &--lg {
45
- @include ug-font-size("lg");
46
- }
47
- }
48
-
49
- // ---- Lead / Intro Text ----
50
-
51
- .ug-lead {
52
- @include ug-rhythm-font-size(1.2);
53
- @include ug-font-weight("light");
54
- @include ug-rhythm-line-height(1);
55
- @include ug-rhythm-margin-bottom(0.5);
56
- margin-top: 0;
57
- }
58
-
59
- // ---- Caption ----
60
-
61
- .ug-caption {
62
- @include ug-font-size("xs");
63
- @include ug-font-weight("regular");
64
- @include ug-rhythm-line-height(1);
65
- color: $ug-medium-gray;
66
- }
67
-
68
- // ---- Label ----
69
-
70
- .ug-label {
71
- @include ug-font-size("xs");
72
- @include ug-font-weight("bold");
73
- @include ug-rhythm-line-height(1);
74
- text-transform: uppercase;
75
- letter-spacing: 0.08em;
76
- }
77
-
78
- // ---- Text Alignment ----
79
-
80
- .ug-text {
81
- &--left { text-align: left; }
82
- &--center { text-align: center; }
83
- &--right { text-align: right; }
84
- }
85
-
86
- // ---- Text Colors ----
87
-
88
- @each $name, $color in $ug-colors {
89
- .ug-text--#{$name} {
90
- color: $color;
91
- }
92
- }
93
-
94
- // ---- Multi-Column Text ----
95
-
96
- @for $i from 2 through 4 {
97
- .ug-text--cols-#{$i} {
98
- columns: $i;
99
- column-gap: calc(var(--ug-leading) * 1.5);
100
-
101
- @include ug-breakpoint-down("md") {
102
- columns: 1;
103
- }
104
- }
105
- }
1
+ // ==========================================================================
2
+ // Unigrid CSS Framework — Typography (BEM)
3
+ //
4
+ // Utility classes for typography. Vertical spacing aligned to the
5
+ // Gutenberg leading ($ug-leading-rem) for consistent rhythm.
6
+ // ==========================================================================
7
+
8
+ @use "sass:list";
9
+ @use "sass:map";
10
+ @use "variables" as *;
11
+ @use "mixins" as *;
12
+
13
+ // ---- Headings (from $ug-headings map) ----
14
+ // Styles applied to both the HTML element (h1-h6) and the utility class (.ug-h1-.ug-h6).
15
+ // The .ug-h* classes are for non-heading elements that need heading styling.
16
+
17
+ @each $heading, $props in $ug-headings {
18
+ #{$heading},
19
+ .ug-#{$heading} {
20
+ @include ug-rhythm-font-size(list.nth($props, 1));
21
+ @include ug-rhythm-line-height(list.nth($props, 2));
22
+ @include ug-font-weight("bold");
23
+ @include ug-rhythm-margin-bottom(0.5);
24
+ margin-top: 0;
25
+
26
+ @if $heading == "h1" {
27
+ @include ug-font-weight("extra-bold");
28
+ letter-spacing: -0.02em;
29
+ }
30
+ }
31
+ }
32
+
33
+ // ---- Body Text ----
34
+
35
+ .ug-body {
36
+ @include ug-font-size("base");
37
+ @include ug-font-weight("regular");
38
+ @include ug-rhythm-line-height(1);
39
+
40
+ &--sm {
41
+ @include ug-font-size("sm");
42
+ }
43
+
44
+ &--lg {
45
+ @include ug-font-size("lg");
46
+ }
47
+ }
48
+
49
+ // ---- Lead / Intro Text ----
50
+
51
+ .ug-lead {
52
+ @include ug-rhythm-font-size(1.2);
53
+ @include ug-font-weight("light");
54
+ @include ug-rhythm-line-height(1);
55
+ @include ug-rhythm-margin-bottom(0.5);
56
+ margin-top: 0;
57
+ }
58
+
59
+ // ---- Caption ----
60
+
61
+ .ug-caption {
62
+ @include ug-font-size("xs");
63
+ @include ug-font-weight("regular");
64
+ @include ug-rhythm-line-height(1);
65
+ color: $ug-medium-gray;
66
+ }
67
+
68
+ // ---- Label ----
69
+
70
+ .ug-label {
71
+ @include ug-font-size("xs");
72
+ @include ug-font-weight("bold");
73
+ @include ug-rhythm-line-height(1);
74
+ text-transform: uppercase;
75
+ letter-spacing: 0.08em;
76
+ }
77
+
78
+ // ---- Text Alignment ----
79
+
80
+ .ug-text {
81
+ &--left { text-align: left; }
82
+ &--center { text-align: center; }
83
+ &--right { text-align: right; }
84
+ }
85
+
86
+ // ---- Text Colors ----
87
+
88
+ @each $name, $color in $ug-colors {
89
+ .ug-text--#{$name} {
90
+ color: $color;
91
+ }
92
+ }
93
+
94
+ // ---- Multi-Column Text ----
95
+
96
+ @for $i from 2 through 4 {
97
+ .ug-text--cols-#{$i} {
98
+ columns: $i;
99
+ column-gap: calc(var(--ug-leading) * 1.5);
100
+
101
+ @include ug-breakpoint-down("md") {
102
+ columns: 1;
103
+ }
104
+ }
105
+ }