unigrid.css 0.3.0 → 0.3.1

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 (42) 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 +4501 -4501
  6. package/dist/unigrid.js +124 -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 +19 -19
  12. package/src/js/scrollspy.js +87 -87
  13. package/src/js/tabs.js +58 -58
  14. package/src/scss/_accordion.scss +123 -123
  15. package/src/scss/_broadside.scss +125 -125
  16. package/src/scss/_buttons.scss +241 -241
  17. package/src/scss/_card.scss +168 -168
  18. package/src/scss/_components.scss +140 -140
  19. package/src/scss/_container.scss +53 -53
  20. package/src/scss/_dropdown.scss +178 -178
  21. package/src/scss/_footer.scss +147 -147
  22. package/src/scss/_formats.scss +64 -64
  23. package/src/scss/_forms.scss +192 -192
  24. package/src/scss/_grid.scss +114 -114
  25. package/src/scss/_header.scss +169 -169
  26. package/src/scss/_hero.scss +262 -262
  27. package/src/scss/_mixins.scss +120 -120
  28. package/src/scss/_modules.scss +238 -238
  29. package/src/scss/_navbar.scss +341 -341
  30. package/src/scss/_pagination.scss +160 -160
  31. package/src/scss/_prose.scss +393 -393
  32. package/src/scss/_reset.scss +82 -82
  33. package/src/scss/_scrollspy.scss +62 -62
  34. package/src/scss/_section.scss +91 -91
  35. package/src/scss/_sidebar.scss +147 -147
  36. package/src/scss/_table.scss +122 -122
  37. package/src/scss/_tabs.scss +178 -178
  38. package/src/scss/_typography.scss +105 -105
  39. package/src/scss/_utilities.scss +79 -79
  40. package/src/scss/_variables.scss +183 -183
  41. package/src/scss/unigrid.scss +49 -49
  42. package/dist/index.js +0 -5
@@ -1,168 +1,168 @@
1
- // ==========================================================================
2
- // Unigrid CSS Framework — Card (BEM)
3
- //
4
- // Block: .ug-card
5
- // Elements: __image, __body, __title, __subtitle, __text, __footer, __actions
6
- // Modifiers: --dark, --bordered, --flat, --horizontal
7
- // ==========================================================================
8
-
9
- @use "variables" as *;
10
- @use "mixins" as *;
11
-
12
- .ug-card {
13
- display: flex;
14
- flex-direction: column;
15
- background-color: $ug-white;
16
- border: 1px solid $ug-light-gray;
17
- overflow: hidden;
18
-
19
- // ---- Image ----
20
- &__image {
21
- display: block;
22
- width: 100%;
23
- overflow: hidden;
24
-
25
- img {
26
- width: 100%;
27
- height: 100%;
28
- object-fit: cover;
29
- display: block;
30
- }
31
-
32
- // Fixed aspect ratios
33
- &--square { aspect-ratio: 1; }
34
- &--landscape { aspect-ratio: 16 / 9; }
35
- &--din { aspect-ratio: 1.4142 / 1; }
36
- }
37
-
38
- // ---- Body ----
39
- &__body {
40
- display: flex;
41
- flex-direction: column;
42
- flex: 1;
43
- padding: var(--ug-leading) calc(var(--ug-leading) * 1.5);
44
- }
45
-
46
- // ---- Title ----
47
- &__title {
48
- @include ug-rhythm-font-size(1.2);
49
- @include ug-rhythm-line-height(1);
50
- @include ug-font-weight("bold");
51
- @include ug-rhythm-margin-bottom(0.5);
52
- margin-top: 0;
53
- }
54
-
55
- // ---- Subtitle ----
56
- &__subtitle {
57
- @include ug-font-size("sm");
58
- @include ug-rhythm-line-height(1);
59
- color: $ug-medium-gray;
60
- margin-top: 0;
61
- @include ug-rhythm-margin-bottom(0.5);
62
- }
63
-
64
- // ---- Text ----
65
- &__text {
66
- @include ug-font-size("sm");
67
- @include ug-rhythm-line-height(1);
68
- color: $ug-dark-gray;
69
- flex: 1;
70
- }
71
-
72
- // ---- Footer ----
73
- &__footer {
74
- padding: calc(var(--ug-leading) * 0.5) calc(var(--ug-leading) * 1.5);
75
- border-top: 1px solid $ug-light-gray;
76
- @include ug-font-size("xs");
77
- @include ug-rhythm-line-height(1);
78
- color: $ug-medium-gray;
79
- }
80
-
81
- // ---- Actions (buttons area) ----
82
- &__actions {
83
- display: flex;
84
- gap: calc(var(--ug-leading) * 0.5);
85
- padding: var(--ug-leading) calc(var(--ug-leading) * 1.5);
86
- padding-top: 0;
87
- }
88
-
89
- // ==============================
90
- // Modifiers
91
- // ==============================
92
-
93
- // Dark card
94
- &--dark {
95
- background-color: $ug-black;
96
- border-color: $ug-black;
97
- color: $ug-white;
98
-
99
- .ug-card__text { color: rgba(255, 255, 255, 0.7); }
100
- .ug-card__subtitle { color: rgba(255, 255, 255, 0.5); }
101
- .ug-card__footer { border-top-color: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.5); }
102
- }
103
-
104
- // Bordered (heavier border)
105
- &--bordered {
106
- border-width: 2px;
107
- border-color: $ug-black;
108
- }
109
-
110
- // Flat (no border, shadow instead)
111
- &--flat {
112
- border: none;
113
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
114
- }
115
-
116
- // Horizontal layout (image left, body right)
117
- &--horizontal {
118
- flex-direction: row;
119
-
120
- .ug-card__image {
121
- width: 40%;
122
- flex-shrink: 0;
123
-
124
- img { height: 100%; }
125
- }
126
-
127
- .ug-card__body {
128
- flex: 1;
129
- }
130
-
131
- @include ug-breakpoint-down("md") {
132
- flex-direction: column;
133
-
134
- .ug-card__image {
135
- width: 100%;
136
- }
137
- }
138
- }
139
-
140
- // NPS color accents (top border)
141
- &--accent-red { border-top: 3px solid $ug-red; }
142
- &--accent-brown { border-top: 3px solid $ug-brown; }
143
- &--accent-green { border-top: 3px solid $ug-green; }
144
- &--accent-blue { border-top: 3px solid $ug-blue; }
145
- }
146
-
147
- // ---- Card Grid Helper ----
148
- // Responsive card grid using CSS grid
149
-
150
- .ug-card-grid {
151
- display: grid;
152
- gap: var(--ug-leading);
153
-
154
- &--2 { grid-template-columns: repeat(2, 1fr); }
155
- &--3 { grid-template-columns: repeat(3, 1fr); }
156
- &--4 { grid-template-columns: repeat(4, 1fr); }
157
-
158
- @include ug-breakpoint-down("lg") {
159
- &--4 { grid-template-columns: repeat(2, 1fr); }
160
- &--3 { grid-template-columns: repeat(2, 1fr); }
161
- }
162
-
163
- @include ug-breakpoint-down("md") {
164
- &--2,
165
- &--3,
166
- &--4 { grid-template-columns: 1fr; }
167
- }
168
- }
1
+ // ==========================================================================
2
+ // Unigrid CSS Framework — Card (BEM)
3
+ //
4
+ // Block: .ug-card
5
+ // Elements: __image, __body, __title, __subtitle, __text, __footer, __actions
6
+ // Modifiers: --dark, --bordered, --flat, --horizontal
7
+ // ==========================================================================
8
+
9
+ @use "variables" as *;
10
+ @use "mixins" as *;
11
+
12
+ .ug-card {
13
+ display: flex;
14
+ flex-direction: column;
15
+ background-color: $ug-white;
16
+ border: 1px solid $ug-light-gray;
17
+ overflow: hidden;
18
+
19
+ // ---- Image ----
20
+ &__image {
21
+ display: block;
22
+ width: 100%;
23
+ overflow: hidden;
24
+
25
+ img {
26
+ width: 100%;
27
+ height: 100%;
28
+ object-fit: cover;
29
+ display: block;
30
+ }
31
+
32
+ // Fixed aspect ratios
33
+ &--square { aspect-ratio: 1; }
34
+ &--landscape { aspect-ratio: 16 / 9; }
35
+ &--din { aspect-ratio: 1.4142 / 1; }
36
+ }
37
+
38
+ // ---- Body ----
39
+ &__body {
40
+ display: flex;
41
+ flex-direction: column;
42
+ flex: 1;
43
+ padding: var(--ug-leading) calc(var(--ug-leading) * 1.5);
44
+ }
45
+
46
+ // ---- Title ----
47
+ &__title {
48
+ @include ug-rhythm-font-size(1.2);
49
+ @include ug-rhythm-line-height(1);
50
+ @include ug-font-weight("bold");
51
+ @include ug-rhythm-margin-bottom(0.5);
52
+ margin-top: 0;
53
+ }
54
+
55
+ // ---- Subtitle ----
56
+ &__subtitle {
57
+ @include ug-font-size("sm");
58
+ @include ug-rhythm-line-height(1);
59
+ color: $ug-medium-gray;
60
+ margin-top: 0;
61
+ @include ug-rhythm-margin-bottom(0.5);
62
+ }
63
+
64
+ // ---- Text ----
65
+ &__text {
66
+ @include ug-font-size("sm");
67
+ @include ug-rhythm-line-height(1);
68
+ color: $ug-dark-gray;
69
+ flex: 1;
70
+ }
71
+
72
+ // ---- Footer ----
73
+ &__footer {
74
+ padding: calc(var(--ug-leading) * 0.5) calc(var(--ug-leading) * 1.5);
75
+ border-top: 1px solid $ug-light-gray;
76
+ @include ug-font-size("xs");
77
+ @include ug-rhythm-line-height(1);
78
+ color: $ug-medium-gray;
79
+ }
80
+
81
+ // ---- Actions (buttons area) ----
82
+ &__actions {
83
+ display: flex;
84
+ gap: calc(var(--ug-leading) * 0.5);
85
+ padding: var(--ug-leading) calc(var(--ug-leading) * 1.5);
86
+ padding-top: 0;
87
+ }
88
+
89
+ // ==============================
90
+ // Modifiers
91
+ // ==============================
92
+
93
+ // Dark card
94
+ &--dark {
95
+ background-color: $ug-black;
96
+ border-color: $ug-black;
97
+ color: $ug-white;
98
+
99
+ .ug-card__text { color: rgba(255, 255, 255, 0.7); }
100
+ .ug-card__subtitle { color: rgba(255, 255, 255, 0.5); }
101
+ .ug-card__footer { border-top-color: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.5); }
102
+ }
103
+
104
+ // Bordered (heavier border)
105
+ &--bordered {
106
+ border-width: 2px;
107
+ border-color: $ug-black;
108
+ }
109
+
110
+ // Flat (no border, shadow instead)
111
+ &--flat {
112
+ border: none;
113
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
114
+ }
115
+
116
+ // Horizontal layout (image left, body right)
117
+ &--horizontal {
118
+ flex-direction: row;
119
+
120
+ .ug-card__image {
121
+ width: 40%;
122
+ flex-shrink: 0;
123
+
124
+ img { height: 100%; }
125
+ }
126
+
127
+ .ug-card__body {
128
+ flex: 1;
129
+ }
130
+
131
+ @include ug-breakpoint-down("md") {
132
+ flex-direction: column;
133
+
134
+ .ug-card__image {
135
+ width: 100%;
136
+ }
137
+ }
138
+ }
139
+
140
+ // NPS color accents (top border)
141
+ &--accent-red { border-top: 3px solid $ug-red; }
142
+ &--accent-brown { border-top: 3px solid $ug-brown; }
143
+ &--accent-green { border-top: 3px solid $ug-green; }
144
+ &--accent-blue { border-top: 3px solid $ug-blue; }
145
+ }
146
+
147
+ // ---- Card Grid Helper ----
148
+ // Responsive card grid using CSS grid
149
+
150
+ .ug-card-grid {
151
+ display: grid;
152
+ gap: var(--ug-leading);
153
+
154
+ &--2 { grid-template-columns: repeat(2, 1fr); }
155
+ &--3 { grid-template-columns: repeat(3, 1fr); }
156
+ &--4 { grid-template-columns: repeat(4, 1fr); }
157
+
158
+ @include ug-breakpoint-down("lg") {
159
+ &--4 { grid-template-columns: repeat(2, 1fr); }
160
+ &--3 { grid-template-columns: repeat(2, 1fr); }
161
+ }
162
+
163
+ @include ug-breakpoint-down("md") {
164
+ &--2,
165
+ &--3,
166
+ &--4 { grid-template-columns: 1fr; }
167
+ }
168
+ }
@@ -1,140 +1,140 @@
1
- // ==========================================================================
2
- // Unigrid CSS Framework — Components (BEM)
3
- //
4
- // Reusable components: infobox, map, image, divider, block.
5
- // Vertical spacing aligned to leading ($ug-leading-rem) for rhythm.
6
- // ==========================================================================
7
-
8
- // ---- Block ----
9
-
10
-
11
- @use "variables" as *;
12
- @use "mixins" as *;
13
-
14
- .ug-block {
15
- @include ug-rhythm-padding(1, 1);
16
-
17
- &--flush {
18
- padding: 0;
19
- }
20
-
21
- & + & {
22
- @include ug-rhythm-margin-top(1);
23
- }
24
- }
25
-
26
- // ---- Map ----
27
-
28
- .ug-map {
29
- width: 100%;
30
- min-height: calc(var(--ug-leading) * 12 - 2px);
31
- background-color: $ug-warm-gray;
32
- border: 1px solid $ug-light-gray;
33
- overflow: hidden;
34
- position: relative;
35
-
36
- img {
37
- width: 100%;
38
- height: 100%;
39
- object-fit: cover;
40
- }
41
-
42
- &--full {
43
- grid-column: 1 / -1;
44
- min-height: 50vh;
45
- }
46
- }
47
-
48
- // ---- Infobox ----
49
-
50
- .ug-infobox {
51
- background-color: $ug-warm-gray;
52
- @include ug-rhythm-padding(1, 1);
53
- border-left: 3px solid $ug-black;
54
-
55
- &--dark {
56
- background-color: $ug-black;
57
- color: $ug-white;
58
- border-left-color: $ug-white;
59
- }
60
-
61
- &__title {
62
- @include ug-font-size("sm");
63
- @include ug-font-weight("bold");
64
- @include ug-rhythm-line-height(1);
65
- text-transform: uppercase;
66
- letter-spacing: 0.08em;
67
- margin-bottom: 0;
68
- }
69
- }
70
-
71
- // ---- Image ----
72
-
73
- .ug-image {
74
- width: 100%;
75
- overflow: hidden;
76
-
77
- img {
78
- width: 100%;
79
- height: 100%;
80
- object-fit: cover;
81
- }
82
-
83
- &--contain img {
84
- object-fit: contain;
85
- }
86
-
87
- &--din {
88
- @include ug-ratio-din(false);
89
- }
90
-
91
- &--din-landscape {
92
- @include ug-ratio-din(true);
93
- }
94
- }
95
-
96
- // ---- Divider ----
97
- // Total: 1 leading = padding-top(0.5) + border + padding-bottom(0.5)
98
- // The border sits in the vertical center of the 1 leading space.
99
-
100
- .ug-divider {
101
- border: none;
102
- border-top: 1px solid $ug-light-gray;
103
- padding-top: calc(var(--ug-leading) * 0.5 - 1px);
104
- padding-bottom: calc(var(--ug-leading) * 0.5);
105
- grid-column: 1 / -1;
106
-
107
- &--bold {
108
- border-top: 3px solid $ug-black;
109
- padding-top: calc(var(--ug-leading) * 0.5 - 3px);
110
- }
111
- }
112
-
113
- // ---- Label Divider ----
114
- // Uppercase label with bottom border as subsection separator.
115
- // padding-bottom + border = exactly 1 leading, keeping content on-grid.
116
- //
117
- // Block: .ug-label-divider
118
- // Modifiers: --bold, --light
119
-
120
- .ug-label-divider {
121
- @include ug-font-size("sm");
122
- @include ug-font-weight("bold");
123
- line-height: calc(var(--ug-leading) - 2px);
124
- margin-bottom: calc(var(--ug-leading) * 0.5 - 2px);
125
- text-transform: uppercase;
126
- letter-spacing: 0.1em;
127
- color: $ug-medium-gray;
128
- border-bottom: 2px solid $ug-black;
129
- @include ug-rhythm-margin-top(0.5);
130
-
131
- &--bold {
132
- line-height: calc(var(--ug-leading) - 3px);
133
- border-bottom-width: 3px;
134
- margin-bottom: calc(var(--ug-leading) * 0.5 - 3px);
135
- }
136
-
137
- &--light {
138
- border-bottom-color: $ug-light-gray;
139
- }
140
- }
1
+ // ==========================================================================
2
+ // Unigrid CSS Framework — Components (BEM)
3
+ //
4
+ // Reusable components: infobox, map, image, divider, block.
5
+ // Vertical spacing aligned to leading ($ug-leading-rem) for rhythm.
6
+ // ==========================================================================
7
+
8
+ // ---- Block ----
9
+
10
+
11
+ @use "variables" as *;
12
+ @use "mixins" as *;
13
+
14
+ .ug-block {
15
+ @include ug-rhythm-padding(1, 1);
16
+
17
+ &--flush {
18
+ padding: 0;
19
+ }
20
+
21
+ & + & {
22
+ @include ug-rhythm-margin-top(1);
23
+ }
24
+ }
25
+
26
+ // ---- Map ----
27
+
28
+ .ug-map {
29
+ width: 100%;
30
+ min-height: calc(var(--ug-leading) * 12 - 2px);
31
+ background-color: $ug-warm-gray;
32
+ border: 1px solid $ug-light-gray;
33
+ overflow: hidden;
34
+ position: relative;
35
+
36
+ img {
37
+ width: 100%;
38
+ height: 100%;
39
+ object-fit: cover;
40
+ }
41
+
42
+ &--full {
43
+ grid-column: 1 / -1;
44
+ min-height: 50vh;
45
+ }
46
+ }
47
+
48
+ // ---- Infobox ----
49
+
50
+ .ug-infobox {
51
+ background-color: $ug-warm-gray;
52
+ @include ug-rhythm-padding(1, 1);
53
+ border-left: 3px solid $ug-black;
54
+
55
+ &--dark {
56
+ background-color: $ug-black;
57
+ color: $ug-white;
58
+ border-left-color: $ug-white;
59
+ }
60
+
61
+ &__title {
62
+ @include ug-font-size("sm");
63
+ @include ug-font-weight("bold");
64
+ @include ug-rhythm-line-height(1);
65
+ text-transform: uppercase;
66
+ letter-spacing: 0.08em;
67
+ margin-bottom: 0;
68
+ }
69
+ }
70
+
71
+ // ---- Image ----
72
+
73
+ .ug-image {
74
+ width: 100%;
75
+ overflow: hidden;
76
+
77
+ img {
78
+ width: 100%;
79
+ height: 100%;
80
+ object-fit: cover;
81
+ }
82
+
83
+ &--contain img {
84
+ object-fit: contain;
85
+ }
86
+
87
+ &--din {
88
+ @include ug-ratio-din(false);
89
+ }
90
+
91
+ &--din-landscape {
92
+ @include ug-ratio-din(true);
93
+ }
94
+ }
95
+
96
+ // ---- Divider ----
97
+ // Total: 1 leading = padding-top(0.5) + border + padding-bottom(0.5)
98
+ // The border sits in the vertical center of the 1 leading space.
99
+
100
+ .ug-divider {
101
+ border: none;
102
+ border-top: 1px solid $ug-light-gray;
103
+ padding-top: calc(var(--ug-leading) * 0.5 - 1px);
104
+ padding-bottom: calc(var(--ug-leading) * 0.5);
105
+ grid-column: 1 / -1;
106
+
107
+ &--bold {
108
+ border-top: 3px solid $ug-black;
109
+ padding-top: calc(var(--ug-leading) * 0.5 - 3px);
110
+ }
111
+ }
112
+
113
+ // ---- Label Divider ----
114
+ // Uppercase label with bottom border as subsection separator.
115
+ // padding-bottom + border = exactly 1 leading, keeping content on-grid.
116
+ //
117
+ // Block: .ug-label-divider
118
+ // Modifiers: --bold, --light
119
+
120
+ .ug-label-divider {
121
+ @include ug-font-size("sm");
122
+ @include ug-font-weight("bold");
123
+ line-height: calc(var(--ug-leading) - 2px);
124
+ margin-bottom: calc(var(--ug-leading) * 0.5 - 2px);
125
+ text-transform: uppercase;
126
+ letter-spacing: 0.1em;
127
+ color: $ug-medium-gray;
128
+ border-bottom: 2px solid $ug-black;
129
+ @include ug-rhythm-margin-top(0.5);
130
+
131
+ &--bold {
132
+ line-height: calc(var(--ug-leading) - 3px);
133
+ border-bottom-width: 3px;
134
+ margin-bottom: calc(var(--ug-leading) * 0.5 - 3px);
135
+ }
136
+
137
+ &--light {
138
+ border-bottom-color: $ug-light-gray;
139
+ }
140
+ }