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,192 +1,192 @@
1
- // ==========================================================================
2
- // Unigrid CSS Framework — Forms (BEM)
3
- //
4
- // Block: .ug-form
5
- // Elements: __group, __label, __input, __select, __textarea, __checkbox,
6
- // __radio, __help, __error
7
- // Modifiers: --inline, --disabled
8
- // __input--sm, __input--lg
9
- // ==========================================================================
10
-
11
- @use "sass:color";
12
- @use "variables" as *;
13
- @use "mixins" as *;
14
-
15
- .ug-form {
16
-
17
- // ---- Form Group (label + input pair) ----
18
- &__group {
19
- @include ug-rhythm-margin-bottom(0.5);
20
- }
21
-
22
- // ---- Label ----
23
- &__label {
24
- display: block;
25
- @include ug-font-size("sm");
26
- @include ug-font-weight("bold");
27
- @include ug-rhythm-line-height(1);
28
- @include ug-rhythm-margin-top(0.5);
29
- margin-bottom: 0;
30
- color: $ug-black;
31
- }
32
-
33
- // ---- Text Input, Email, Password, Number, etc. ----
34
- &__input {
35
- display: block;
36
- width: 100%;
37
- height: calc(var(--ug-leading) * 1.5);
38
- padding: 0 calc(var(--ug-leading) * 0.5);
39
- @include ug-font-size("base");
40
- font-family: inherit;
41
- color: $ug-black;
42
- background-color: $ug-white;
43
- border: 1px solid $ug-light-gray;
44
- transition: border-color 0.15s;
45
-
46
- &::placeholder {
47
- color: $ug-medium-gray;
48
- }
49
-
50
- &:focus {
51
- outline: none;
52
- border-color: $ug-black;
53
- }
54
-
55
- // Sizes
56
- &--sm {
57
- height: calc(var(--ug-leading) * 1);
58
- @include ug-font-size("sm");
59
- }
60
-
61
- &--lg {
62
- height: calc(var(--ug-leading) * 2);
63
- @include ug-font-size("lg");
64
- }
65
- }
66
-
67
- // ---- Select ----
68
- &__select {
69
- display: block;
70
- width: 100%;
71
- height: calc(var(--ug-leading) * 1.5);
72
- padding: 0 calc(var(--ug-leading) * 1) 0 calc(var(--ug-leading) * 0.5);
73
- @include ug-font-size("base");
74
- font-family: inherit;
75
- color: $ug-black;
76
- background-color: $ug-white;
77
- border: 1px solid $ug-light-gray;
78
- appearance: none;
79
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='2' fill='none'/%3E%3C/svg%3E");
80
- background-repeat: no-repeat;
81
- background-position: right calc(var(--ug-leading) * 0.5) center;
82
- background-size: 12px;
83
- transition: border-color 0.15s;
84
-
85
- &:focus {
86
- outline: none;
87
- border-color: $ug-black;
88
- }
89
- }
90
-
91
- // ---- Textarea ----
92
- &__textarea {
93
- display: block;
94
- width: 100%;
95
- min-height: calc(var(--ug-leading) * 4);
96
- padding: calc(var(--ug-leading) * 0.5);
97
- @include ug-font-size("base");
98
- @include ug-rhythm-line-height(1);
99
- font-family: inherit;
100
- color: $ug-black;
101
- background-color: $ug-white;
102
- border: 1px solid $ug-light-gray;
103
- resize: vertical;
104
- transition: border-color 0.15s;
105
-
106
- &::placeholder {
107
- color: $ug-medium-gray;
108
- }
109
-
110
- &:focus {
111
- outline: none;
112
- border-color: $ug-black;
113
- }
114
- }
115
-
116
- // ---- Checkbox & Radio ----
117
- &__checkbox,
118
- &__radio {
119
- display: flex;
120
- align-items: center;
121
- gap: calc(var(--ug-leading) * 0.5);
122
- @include ug-rhythm-line-height(1);
123
- @include ug-rhythm-margin-bottom(0.5);
124
- cursor: pointer;
125
-
126
- input {
127
- width: 1em;
128
- height: 1em;
129
- margin: 0;
130
- accent-color: $ug-black;
131
- cursor: pointer;
132
- }
133
-
134
- span {
135
- @include ug-font-size("base");
136
- color: $ug-black;
137
- }
138
- }
139
-
140
- // ---- Help Text ----
141
- &__help {
142
- @include ug-font-size("xs");
143
- @include ug-rhythm-line-height(1);
144
- color: $ug-medium-gray;
145
- margin-top: calc(var(--ug-leading) * 0.25);
146
- }
147
-
148
- // ---- Error State ----
149
- &__error {
150
- @include ug-font-size("xs");
151
- @include ug-rhythm-line-height(1);
152
- color: $ug-red;
153
- margin-top: calc(var(--ug-leading) * 0.25);
154
- }
155
-
156
- &__input:invalid,
157
- &__textarea:invalid,
158
- &__select:invalid {
159
- border-color: $ug-red;
160
- }
161
-
162
- // ==============================
163
- // Modifiers
164
- // ==============================
165
-
166
- // Inline form (horizontal layout)
167
- &--inline {
168
- display: flex;
169
- align-items: flex-end;
170
- gap: calc(var(--ug-leading) * 0.5);
171
- flex-wrap: wrap;
172
-
173
- .ug-form__group {
174
- margin-bottom: 0;
175
- }
176
-
177
- .ug-form__input,
178
- .ug-form__select {
179
- width: auto;
180
- }
181
- }
182
-
183
- // Disabled state
184
- &--disabled,
185
- &__input:disabled,
186
- &__select:disabled,
187
- &__textarea:disabled {
188
- opacity: 0.5;
189
- cursor: not-allowed;
190
- pointer-events: none;
191
- }
192
- }
1
+ // ==========================================================================
2
+ // Unigrid CSS Framework — Forms (BEM)
3
+ //
4
+ // Block: .ug-form
5
+ // Elements: __group, __label, __input, __select, __textarea, __checkbox,
6
+ // __radio, __help, __error
7
+ // Modifiers: --inline, --disabled
8
+ // __input--sm, __input--lg
9
+ // ==========================================================================
10
+
11
+ @use "sass:color";
12
+ @use "variables" as *;
13
+ @use "mixins" as *;
14
+
15
+ .ug-form {
16
+
17
+ // ---- Form Group (label + input pair) ----
18
+ &__group {
19
+ @include ug-rhythm-margin-bottom(0.5);
20
+ }
21
+
22
+ // ---- Label ----
23
+ &__label {
24
+ display: block;
25
+ @include ug-font-size("sm");
26
+ @include ug-font-weight("bold");
27
+ @include ug-rhythm-line-height(1);
28
+ @include ug-rhythm-margin-top(0.5);
29
+ margin-bottom: 0;
30
+ color: $ug-black;
31
+ }
32
+
33
+ // ---- Text Input, Email, Password, Number, etc. ----
34
+ &__input {
35
+ display: block;
36
+ width: 100%;
37
+ height: calc(var(--ug-leading) * 1.5);
38
+ padding: 0 calc(var(--ug-leading) * 0.5);
39
+ @include ug-font-size("base");
40
+ font-family: inherit;
41
+ color: $ug-black;
42
+ background-color: $ug-white;
43
+ border: 1px solid $ug-light-gray;
44
+ transition: border-color 0.15s;
45
+
46
+ &::placeholder {
47
+ color: $ug-medium-gray;
48
+ }
49
+
50
+ &:focus {
51
+ outline: none;
52
+ border-color: $ug-black;
53
+ }
54
+
55
+ // Sizes
56
+ &--sm {
57
+ height: calc(var(--ug-leading) * 1);
58
+ @include ug-font-size("sm");
59
+ }
60
+
61
+ &--lg {
62
+ height: calc(var(--ug-leading) * 2);
63
+ @include ug-font-size("lg");
64
+ }
65
+ }
66
+
67
+ // ---- Select ----
68
+ &__select {
69
+ display: block;
70
+ width: 100%;
71
+ height: calc(var(--ug-leading) * 1.5);
72
+ padding: 0 calc(var(--ug-leading) * 1) 0 calc(var(--ug-leading) * 0.5);
73
+ @include ug-font-size("base");
74
+ font-family: inherit;
75
+ color: $ug-black;
76
+ background-color: $ug-white;
77
+ border: 1px solid $ug-light-gray;
78
+ appearance: none;
79
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='2' fill='none'/%3E%3C/svg%3E");
80
+ background-repeat: no-repeat;
81
+ background-position: right calc(var(--ug-leading) * 0.5) center;
82
+ background-size: 12px;
83
+ transition: border-color 0.15s;
84
+
85
+ &:focus {
86
+ outline: none;
87
+ border-color: $ug-black;
88
+ }
89
+ }
90
+
91
+ // ---- Textarea ----
92
+ &__textarea {
93
+ display: block;
94
+ width: 100%;
95
+ min-height: calc(var(--ug-leading) * 4);
96
+ padding: calc(var(--ug-leading) * 0.5);
97
+ @include ug-font-size("base");
98
+ @include ug-rhythm-line-height(1);
99
+ font-family: inherit;
100
+ color: $ug-black;
101
+ background-color: $ug-white;
102
+ border: 1px solid $ug-light-gray;
103
+ resize: vertical;
104
+ transition: border-color 0.15s;
105
+
106
+ &::placeholder {
107
+ color: $ug-medium-gray;
108
+ }
109
+
110
+ &:focus {
111
+ outline: none;
112
+ border-color: $ug-black;
113
+ }
114
+ }
115
+
116
+ // ---- Checkbox & Radio ----
117
+ &__checkbox,
118
+ &__radio {
119
+ display: flex;
120
+ align-items: center;
121
+ gap: calc(var(--ug-leading) * 0.5);
122
+ @include ug-rhythm-line-height(1);
123
+ @include ug-rhythm-margin-bottom(0.5);
124
+ cursor: pointer;
125
+
126
+ input {
127
+ width: 1em;
128
+ height: 1em;
129
+ margin: 0;
130
+ accent-color: $ug-black;
131
+ cursor: pointer;
132
+ }
133
+
134
+ span {
135
+ @include ug-font-size("base");
136
+ color: $ug-black;
137
+ }
138
+ }
139
+
140
+ // ---- Help Text ----
141
+ &__help {
142
+ @include ug-font-size("xs");
143
+ @include ug-rhythm-line-height(1);
144
+ color: $ug-medium-gray;
145
+ margin-top: calc(var(--ug-leading) * 0.25);
146
+ }
147
+
148
+ // ---- Error State ----
149
+ &__error {
150
+ @include ug-font-size("xs");
151
+ @include ug-rhythm-line-height(1);
152
+ color: $ug-red;
153
+ margin-top: calc(var(--ug-leading) * 0.25);
154
+ }
155
+
156
+ &__input:invalid,
157
+ &__textarea:invalid,
158
+ &__select:invalid {
159
+ border-color: $ug-red;
160
+ }
161
+
162
+ // ==============================
163
+ // Modifiers
164
+ // ==============================
165
+
166
+ // Inline form (horizontal layout)
167
+ &--inline {
168
+ display: flex;
169
+ align-items: flex-end;
170
+ gap: calc(var(--ug-leading) * 0.5);
171
+ flex-wrap: wrap;
172
+
173
+ .ug-form__group {
174
+ margin-bottom: 0;
175
+ }
176
+
177
+ .ug-form__input,
178
+ .ug-form__select {
179
+ width: auto;
180
+ }
181
+ }
182
+
183
+ // Disabled state
184
+ &--disabled,
185
+ &__input:disabled,
186
+ &__select:disabled,
187
+ &__textarea:disabled {
188
+ opacity: 0.5;
189
+ cursor: not-allowed;
190
+ pointer-events: none;
191
+ }
192
+ }
@@ -1,114 +1,114 @@
1
- // ==========================================================================
2
- // Unigrid CSS Framework — Grid System (BEM)
3
- //
4
- // Block: .ug-grid
5
- // Elements: (children use .ug-grid__col-{n})
6
- // Modifiers: --no-gap, --dense, --rows
7
- // ==========================================================================
8
-
9
- // ---- Grid Block ----
10
-
11
-
12
- @use "variables" as *;
13
- @use "mixins" as *;
14
-
15
- .ug-grid {
16
- display: grid;
17
- grid-template-columns: repeat($ug-columns, 1fr);
18
- gap: var(--ug-leading);
19
- width: 100%;
20
-
21
- // -- Modifiers --
22
- &--no-gap {
23
- gap: 0;
24
- }
25
-
26
- &--dense {
27
- grid-auto-flow: dense;
28
- }
29
-
30
- &--rows {
31
- grid-template-rows: repeat($ug-rows, 1fr);
32
- }
33
- }
34
-
35
- // ---- Column Spans ----
36
- // .ug-col--{1-12}
37
-
38
- @for $i from 1 through $ug-columns {
39
- .ug-col--#{$i} {
40
- grid-column: span $i;
41
- }
42
- }
43
-
44
- // ---- Column Start Positions ----
45
- // .ug-col--start-{1-12}
46
-
47
- @for $i from 1 through $ug-columns {
48
- .ug-col--start-#{$i} {
49
- grid-column-start: $i;
50
- }
51
- }
52
-
53
- // ---- Row Spans ----
54
- // .ug-row--{1-10}
55
-
56
- @for $i from 1 through 10 {
57
- .ug-row--#{$i} {
58
- grid-row: span $i;
59
- }
60
- }
61
-
62
- // ---- Row Start Positions ----
63
- // .ug-row--start-{1-10}
64
-
65
- @for $i from 1 through 10 {
66
- .ug-row--start-#{$i} {
67
- grid-row-start: $i;
68
- }
69
- }
70
-
71
- // ---- Subgrid ----
72
-
73
- .ug-subgrid {
74
- display: grid;
75
- grid-template-columns: subgrid;
76
-
77
- &--rows {
78
- grid-template-rows: subgrid;
79
- }
80
- }
81
-
82
- // ---- Responsive Column Spans ----
83
- // .ug-col--{bp}-{1-12}
84
-
85
- @each $bp-name, $bp-value in $ug-breakpoints {
86
- @media (min-width: $bp-value) {
87
- @for $i from 1 through $ug-columns {
88
- .ug-col--#{$bp-name}-#{$i} {
89
- grid-column: span $i;
90
- }
91
- }
92
- }
93
- }
94
-
95
- // ---- Alignment Utilities ----
96
-
97
- .ug-align {
98
- &--start { align-self: start; }
99
- &--center { align-self: center; }
100
- &--end { align-self: end; }
101
- &--stretch { align-self: stretch; }
102
- }
103
-
104
- .ug-justify {
105
- &--start { justify-self: start; }
106
- &--center { justify-self: center; }
107
- &--end { justify-self: end; }
108
- &--stretch { justify-self: stretch; }
109
- }
110
-
111
- .ug-place--center {
112
- align-self: center;
113
- justify-self: center;
114
- }
1
+ // ==========================================================================
2
+ // Unigrid CSS Framework — Grid System (BEM)
3
+ //
4
+ // Block: .ug-grid
5
+ // Elements: (children use .ug-grid__col-{n})
6
+ // Modifiers: --no-gap, --dense, --rows
7
+ // ==========================================================================
8
+
9
+ // ---- Grid Block ----
10
+
11
+
12
+ @use "variables" as *;
13
+ @use "mixins" as *;
14
+
15
+ .ug-grid {
16
+ display: grid;
17
+ grid-template-columns: repeat($ug-columns, 1fr);
18
+ gap: var(--ug-leading);
19
+ width: 100%;
20
+
21
+ // -- Modifiers --
22
+ &--no-gap {
23
+ gap: 0;
24
+ }
25
+
26
+ &--dense {
27
+ grid-auto-flow: dense;
28
+ }
29
+
30
+ &--rows {
31
+ grid-template-rows: repeat($ug-rows, 1fr);
32
+ }
33
+ }
34
+
35
+ // ---- Column Spans ----
36
+ // .ug-col--{1-12}
37
+
38
+ @for $i from 1 through $ug-columns {
39
+ .ug-col--#{$i} {
40
+ grid-column: span $i;
41
+ }
42
+ }
43
+
44
+ // ---- Column Start Positions ----
45
+ // .ug-col--start-{1-12}
46
+
47
+ @for $i from 1 through $ug-columns {
48
+ .ug-col--start-#{$i} {
49
+ grid-column-start: $i;
50
+ }
51
+ }
52
+
53
+ // ---- Row Spans ----
54
+ // .ug-row--{1-10}
55
+
56
+ @for $i from 1 through 10 {
57
+ .ug-row--#{$i} {
58
+ grid-row: span $i;
59
+ }
60
+ }
61
+
62
+ // ---- Row Start Positions ----
63
+ // .ug-row--start-{1-10}
64
+
65
+ @for $i from 1 through 10 {
66
+ .ug-row--start-#{$i} {
67
+ grid-row-start: $i;
68
+ }
69
+ }
70
+
71
+ // ---- Subgrid ----
72
+
73
+ .ug-subgrid {
74
+ display: grid;
75
+ grid-template-columns: subgrid;
76
+
77
+ &--rows {
78
+ grid-template-rows: subgrid;
79
+ }
80
+ }
81
+
82
+ // ---- Responsive Column Spans ----
83
+ // .ug-col--{bp}-{1-12}
84
+
85
+ @each $bp-name, $bp-value in $ug-breakpoints {
86
+ @media (min-width: $bp-value) {
87
+ @for $i from 1 through $ug-columns {
88
+ .ug-col--#{$bp-name}-#{$i} {
89
+ grid-column: span $i;
90
+ }
91
+ }
92
+ }
93
+ }
94
+
95
+ // ---- Alignment Utilities ----
96
+
97
+ .ug-align {
98
+ &--start { align-self: start; }
99
+ &--center { align-self: center; }
100
+ &--end { align-self: end; }
101
+ &--stretch { align-self: stretch; }
102
+ }
103
+
104
+ .ug-justify {
105
+ &--start { justify-self: start; }
106
+ &--center { justify-self: center; }
107
+ &--end { justify-self: end; }
108
+ &--stretch { justify-self: stretch; }
109
+ }
110
+
111
+ .ug-place--center {
112
+ align-self: center;
113
+ justify-self: center;
114
+ }