unigrid.css 0.3.0
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 -0
- package/dist/dropdown.js +36 -0
- package/dist/index.js +5 -0
- package/dist/scrollspy.js +57 -0
- package/dist/tabs.js +30 -0
- package/dist/unigrid.css +4501 -0
- package/dist/unigrid.js +124 -0
- package/dist/unigrid.min.css +1 -0
- package/dist/unigrid.min.js +1 -0
- package/package.json +41 -0
- package/src/js/dropdown.js +49 -0
- package/src/js/index.js +19 -0
- package/src/js/scrollspy.js +87 -0
- package/src/js/tabs.js +58 -0
- package/src/scss/_accordion.scss +123 -0
- package/src/scss/_broadside.scss +125 -0
- package/src/scss/_buttons.scss +241 -0
- package/src/scss/_card.scss +168 -0
- package/src/scss/_components.scss +140 -0
- package/src/scss/_container.scss +54 -0
- package/src/scss/_dropdown.scss +178 -0
- package/src/scss/_footer.scss +147 -0
- package/src/scss/_formats.scss +64 -0
- package/src/scss/_forms.scss +192 -0
- package/src/scss/_grid.scss +114 -0
- package/src/scss/_header.scss +169 -0
- package/src/scss/_hero.scss +262 -0
- package/src/scss/_mixins.scss +120 -0
- package/src/scss/_modules.scss +238 -0
- package/src/scss/_navbar.scss +341 -0
- package/src/scss/_pagination.scss +160 -0
- package/src/scss/_prose.scss +393 -0
- package/src/scss/_reset.scss +82 -0
- package/src/scss/_scrollspy.scss +62 -0
- package/src/scss/_section.scss +91 -0
- package/src/scss/_sidebar.scss +147 -0
- package/src/scss/_table.scss +122 -0
- package/src/scss/_tabs.scss +178 -0
- package/src/scss/_typography.scss +105 -0
- package/src/scss/_utilities.scss +79 -0
- package/src/scss/_variables.scss +183 -0
- package/src/scss/unigrid.scss +49 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// ==========================================================================
|
|
2
|
+
// Unigrid CSS Framework — Sidebar Layout (BEM)
|
|
3
|
+
//
|
|
4
|
+
// Flexible sidebar + main content layout. Sidebar width configurable
|
|
5
|
+
// via CSS custom property --ug-sidebar-width.
|
|
6
|
+
//
|
|
7
|
+
// Block: .ug-sidebar-layout
|
|
8
|
+
// Elements: __sidebar, __main
|
|
9
|
+
// Modifiers: --right, --sticky, --bordered
|
|
10
|
+
// __sidebar--collapse (hidden on mobile)
|
|
11
|
+
//
|
|
12
|
+
// Usage:
|
|
13
|
+
// <div class="ug-sidebar-layout" style="--ug-sidebar-width: 20rem">
|
|
14
|
+
// <aside class="ug-sidebar-layout__sidebar">...</aside>
|
|
15
|
+
// <main class="ug-sidebar-layout__main">...</main>
|
|
16
|
+
// </div>
|
|
17
|
+
// ==========================================================================
|
|
18
|
+
|
|
19
|
+
@use "variables" as *;
|
|
20
|
+
@use "mixins" as *;
|
|
21
|
+
|
|
22
|
+
.ug-sidebar-layout {
|
|
23
|
+
--ug-sidebar-width: calc(var(--ug-leading) * 12);
|
|
24
|
+
display: flex;
|
|
25
|
+
width: 100%;
|
|
26
|
+
min-height: 0;
|
|
27
|
+
|
|
28
|
+
// ---- Sidebar ----
|
|
29
|
+
&__sidebar {
|
|
30
|
+
width: var(--ug-sidebar-width);
|
|
31
|
+
flex-shrink: 0;
|
|
32
|
+
padding: var(--ug-leading) calc(var(--ug-leading) * 1.5);
|
|
33
|
+
|
|
34
|
+
// Collapse on mobile by default
|
|
35
|
+
@include ug-breakpoint-down("md") {
|
|
36
|
+
display: none;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// ---- Main Content ----
|
|
41
|
+
&__main {
|
|
42
|
+
flex: 1;
|
|
43
|
+
min-width: 0;
|
|
44
|
+
padding: var(--ug-leading) calc(var(--ug-leading) * 1.5);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// ==============================
|
|
48
|
+
// Modifiers
|
|
49
|
+
// ==============================
|
|
50
|
+
|
|
51
|
+
// Sidebar on the right
|
|
52
|
+
&--right {
|
|
53
|
+
flex-direction: row-reverse;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Sticky sidebar
|
|
57
|
+
&--sticky {
|
|
58
|
+
.ug-sidebar-layout__sidebar {
|
|
59
|
+
position: sticky;
|
|
60
|
+
top: 0;
|
|
61
|
+
align-self: flex-start;
|
|
62
|
+
max-height: 100vh;
|
|
63
|
+
overflow-y: auto;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Bordered separator
|
|
68
|
+
&--bordered {
|
|
69
|
+
.ug-sidebar-layout__sidebar {
|
|
70
|
+
border-right: 1px solid $ug-light-gray;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&.ug-sidebar-layout--right .ug-sidebar-layout__sidebar {
|
|
74
|
+
border-right: none;
|
|
75
|
+
border-left: 1px solid $ug-light-gray;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// ==============================
|
|
80
|
+
// Sidebar element modifiers
|
|
81
|
+
// ==============================
|
|
82
|
+
|
|
83
|
+
// Show sidebar on mobile (override default collapse)
|
|
84
|
+
&__sidebar--visible {
|
|
85
|
+
@include ug-breakpoint-down("md") {
|
|
86
|
+
display: block;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// ==============================
|
|
91
|
+
// Sidebar Navigation (optional)
|
|
92
|
+
// ==============================
|
|
93
|
+
|
|
94
|
+
&__nav {
|
|
95
|
+
list-style: none;
|
|
96
|
+
margin: 0;
|
|
97
|
+
padding: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&__nav-item {
|
|
101
|
+
display: block;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&__nav-link {
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
padding: calc(var(--ug-leading) * 0.5) 0;
|
|
108
|
+
@include ug-font-size("sm");
|
|
109
|
+
@include ug-rhythm-line-height(1);
|
|
110
|
+
color: $ug-dark-gray;
|
|
111
|
+
text-decoration: none;
|
|
112
|
+
border-bottom: 1px solid $ug-light-gray;
|
|
113
|
+
transition: color 0.15s;
|
|
114
|
+
|
|
115
|
+
&:hover {
|
|
116
|
+
color: $ug-black;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&--active {
|
|
120
|
+
@include ug-font-weight("bold");
|
|
121
|
+
color: $ug-black;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// ==============================
|
|
126
|
+
// Responsive
|
|
127
|
+
// ==============================
|
|
128
|
+
|
|
129
|
+
@include ug-breakpoint-down("md") {
|
|
130
|
+
flex-direction: column;
|
|
131
|
+
|
|
132
|
+
&__main {
|
|
133
|
+
padding: var(--ug-leading);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&--right {
|
|
137
|
+
flex-direction: column;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Remove border on mobile
|
|
141
|
+
&--bordered .ug-sidebar-layout__sidebar {
|
|
142
|
+
border-right: none;
|
|
143
|
+
border-left: none;
|
|
144
|
+
border-bottom: 1px solid $ug-light-gray;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// ==========================================================================
|
|
2
|
+
// Unigrid CSS Framework — Table (BEM)
|
|
3
|
+
//
|
|
4
|
+
// Block: .ug-table
|
|
5
|
+
// Elements: __header, __row, __cell
|
|
6
|
+
// Modifiers: --striped, --bordered, --compact, --dark, --hover
|
|
7
|
+
// ==========================================================================
|
|
8
|
+
|
|
9
|
+
@use "variables" as *;
|
|
10
|
+
@use "mixins" as *;
|
|
11
|
+
|
|
12
|
+
.ug-table {
|
|
13
|
+
width: 100%;
|
|
14
|
+
border-collapse: collapse;
|
|
15
|
+
border-spacing: 0;
|
|
16
|
+
@include ug-rhythm-margin-bottom(1);
|
|
17
|
+
|
|
18
|
+
font-feature-settings: 'tnum' 1;
|
|
19
|
+
|
|
20
|
+
// ---- Header ----
|
|
21
|
+
th {
|
|
22
|
+
@include ug-font-size("sm");
|
|
23
|
+
@include ug-font-weight("bold");
|
|
24
|
+
@include ug-rhythm-line-height(1);
|
|
25
|
+
text-align: left;
|
|
26
|
+
text-transform: uppercase;
|
|
27
|
+
letter-spacing: 0.05em;
|
|
28
|
+
color: $ug-medium-gray;
|
|
29
|
+
padding: calc(var(--ug-leading) * 0.5) calc(var(--ug-leading) * 0.5);
|
|
30
|
+
border-bottom: 2px solid $ug-black;
|
|
31
|
+
vertical-align: bottom;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// ---- Cells ----
|
|
35
|
+
td {
|
|
36
|
+
@include ug-font-size("base");
|
|
37
|
+
@include ug-rhythm-line-height(1);
|
|
38
|
+
text-align: left;
|
|
39
|
+
padding: calc(var(--ug-leading) * 0.5) calc(var(--ug-leading) * 0.5);
|
|
40
|
+
border-bottom: 1px solid $ug-light-gray;
|
|
41
|
+
vertical-align: top;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// ---- Caption ----
|
|
45
|
+
caption {
|
|
46
|
+
@include ug-font-size("sm");
|
|
47
|
+
@include ug-rhythm-line-height(1);
|
|
48
|
+
@include ug-rhythm-margin-bottom(0.5);
|
|
49
|
+
color: $ug-medium-gray;
|
|
50
|
+
text-align: left;
|
|
51
|
+
caption-side: top;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// ==============================
|
|
55
|
+
// Modifiers
|
|
56
|
+
// ==============================
|
|
57
|
+
|
|
58
|
+
// Striped rows
|
|
59
|
+
&--striped {
|
|
60
|
+
tbody tr:nth-child(even) {
|
|
61
|
+
background-color: $ug-warm-gray;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// All borders
|
|
66
|
+
&--bordered {
|
|
67
|
+
th,
|
|
68
|
+
td {
|
|
69
|
+
border: 1px solid $ug-light-gray;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
th {
|
|
73
|
+
border-bottom-width: 2px;
|
|
74
|
+
border-bottom-color: $ug-black;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Compact: less padding
|
|
79
|
+
&--compact {
|
|
80
|
+
th,
|
|
81
|
+
td {
|
|
82
|
+
@include ug-font-size("sm");
|
|
83
|
+
padding: calc(var(--ug-leading) * 0.25) calc(var(--ug-leading) * 0.5);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Dark header
|
|
88
|
+
&--dark {
|
|
89
|
+
th {
|
|
90
|
+
background-color: $ug-black;
|
|
91
|
+
color: $ug-white;
|
|
92
|
+
border-bottom-color: $ug-black;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Row hover
|
|
97
|
+
&--hover {
|
|
98
|
+
tbody tr {
|
|
99
|
+
transition: background-color 0.1s;
|
|
100
|
+
|
|
101
|
+
&:hover {
|
|
102
|
+
background-color: $ug-warm-gray;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// ==============================
|
|
108
|
+
// Responsive wrapper
|
|
109
|
+
// ==============================
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Horizontally scrollable table on small screens
|
|
113
|
+
.ug-table-responsive {
|
|
114
|
+
width: 100%;
|
|
115
|
+
overflow-x: auto;
|
|
116
|
+
-webkit-overflow-scrolling: touch;
|
|
117
|
+
@include ug-rhythm-margin-bottom(1);
|
|
118
|
+
|
|
119
|
+
.ug-table {
|
|
120
|
+
margin-bottom: 0;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// ==========================================================================
|
|
2
|
+
// Unigrid CSS Framework — Utilities (BEM-compatible)
|
|
3
|
+
// ==========================================================================
|
|
4
|
+
|
|
5
|
+
// ---- Full Width ----
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@use "variables" as *;
|
|
9
|
+
@use "mixins" as *;
|
|
10
|
+
|
|
11
|
+
.ug-full-width {
|
|
12
|
+
grid-column: 1 / -1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// ---- Background Colors ----
|
|
16
|
+
|
|
17
|
+
@each $name, $color in $ug-colors {
|
|
18
|
+
.ug-bg--#{$name} {
|
|
19
|
+
background-color: $color;
|
|
20
|
+
|
|
21
|
+
// Auto light text on dark backgrounds
|
|
22
|
+
@if $name == "black" or $name == "brown" or $name == "red" or $name == "green" or $name == "blue" or $name == "dark-gray" {
|
|
23
|
+
color: $ug-white;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// ---- Spacing Utilities ----
|
|
29
|
+
// Uses var(--ug-leading) so values adapt at the desktop breakpoint.
|
|
30
|
+
// Multipliers: 0=0, 1=0.25, 2=0.5, 3=1, 4=1.5, 5=2, 6=3, 7=4, 8=6
|
|
31
|
+
|
|
32
|
+
$_ug-space-multipliers: (0: 0, 1: 0.25, 2: 0.5, 3: 1, 4: 1.5, 5: 2, 6: 3, 7: 4, 8: 6);
|
|
33
|
+
|
|
34
|
+
@each $n, $mult in $_ug-space-multipliers {
|
|
35
|
+
@if $n == 0 {
|
|
36
|
+
.ug-p--0 { padding: 0; }
|
|
37
|
+
.ug-m--0 { margin: 0; }
|
|
38
|
+
.ug-mt--0 { margin-top: 0; }
|
|
39
|
+
.ug-mb--0 { margin-bottom: 0; }
|
|
40
|
+
.ug-ml--0 { margin-left: 0; }
|
|
41
|
+
.ug-mr--0 { margin-right: 0; }
|
|
42
|
+
.ug-pt--0 { padding-top: 0; }
|
|
43
|
+
.ug-pb--0 { padding-bottom: 0; }
|
|
44
|
+
.ug-pl--0 { padding-left: 0; }
|
|
45
|
+
.ug-pr--0 { padding-right: 0; }
|
|
46
|
+
} @else {
|
|
47
|
+
.ug-p--#{$n} { padding: calc(var(--ug-leading) * #{$mult}); }
|
|
48
|
+
.ug-m--#{$n} { margin: calc(var(--ug-leading) * #{$mult}); }
|
|
49
|
+
.ug-mt--#{$n} { margin-top: calc(var(--ug-leading) * #{$mult}); }
|
|
50
|
+
.ug-mb--#{$n} { margin-bottom: calc(var(--ug-leading) * #{$mult}); }
|
|
51
|
+
.ug-ml--#{$n} { margin-left: calc(var(--ug-leading) * #{$mult}); }
|
|
52
|
+
.ug-mr--#{$n} { margin-right: calc(var(--ug-leading) * #{$mult}); }
|
|
53
|
+
.ug-pt--#{$n} { padding-top: calc(var(--ug-leading) * #{$mult}); }
|
|
54
|
+
.ug-pb--#{$n} { padding-bottom: calc(var(--ug-leading) * #{$mult}); }
|
|
55
|
+
.ug-pl--#{$n} { padding-left: calc(var(--ug-leading) * #{$mult}); }
|
|
56
|
+
.ug-pr--#{$n} { padding-right: calc(var(--ug-leading) * #{$mult}); }
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// ---- Display ----
|
|
61
|
+
|
|
62
|
+
.ug-hidden { display: none; }
|
|
63
|
+
.ug-block { display: block; }
|
|
64
|
+
|
|
65
|
+
// ---- Responsive visibility ----
|
|
66
|
+
|
|
67
|
+
@each $bp-name, $bp-value in $ug-breakpoints {
|
|
68
|
+
.ug-hidden--#{$bp-name}-up {
|
|
69
|
+
@media (min-width: $bp-value) {
|
|
70
|
+
display: none;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.ug-hidden--#{$bp-name}-down {
|
|
75
|
+
@media (max-width: $bp-value - 1px) {
|
|
76
|
+
display: none;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|