-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcardinal.css
More file actions
253 lines (216 loc) · 4.91 KB
/
cardinal.css
File metadata and controls
253 lines (216 loc) · 4.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
/*
CARDINAL CSS FRAMEWORK
This file contains the basic styles of Cardinal CSS.
Create a custom CSS file in your project and import this file at the top of your custom CSS:
@import '@bobanm/cardinal'
Then in your custom CSS file extend these styles to fit your needs.
*/
@import 'https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,300;8..144,500&display=swap';
:root {
--red: hsl(0, 78%, 62%);
--cyan: hsl(180, 62%, 55%);
--orange: hsl(34, 97%, 64%);
--blue: hsl(212, 86%, 64%);
--veryDarkBlue: hsl(234, 12%, 34%);
--grayishBlue: hsl(229, 6%, 66%);
--veryLightGray: hsl(0, 0%, 98%);
--grayText: #6a6c71;
--weight1: 300;
--weight2: 500;
}
body {
font-size: 1.125rem;
font-family: 'Roboto Flex', sans-serif;
font-weight: var(--weight1);
color: var(--grayText);
background-color: var(--veryLightGray);
margin: 0.5em;
}
main {
display: grid;
grid-template-columns: 1fr;
gap: 0.5em;
max-width: 64em;
margin: 0.5em auto;
}
div, h2 {
text-overflow: ellipsis;
overflow: hidden;
}
h2 {
white-space: nowrap;
}
button, input, select, option {
font-family: inherit;
font-size: inherit;
font-weight: inherit;
color: inherit;
margin: 0.3em 0;
border-radius: 0.3em;
transition-duration: 0.5s;
transition-timing-function: ease-out;
}
input {
padding: 0.4em 0.4em;
border: 1px solid var(--grayishBlue);
outline: 0 none;
}
input:focus {
border-color: var(--grayishBlue);
box-shadow: 0 1px 1px var(--veryLightGray) inset, 0 0 10px var(--grayishBlue);
}
input.input-red:focus {
border-color: var(--red);
box-shadow: 0 1px 1px var(--veryLightGray) inset, 0 0 10px var(--red);
}
input.input-orange:focus {
border-color: var(--orange);
box-shadow: 0 1px 1px var(--veryLightGray) inset, 0 0 10px var(--orange);
}
button {
color: white;
cursor: pointer;
display: inline-block;
padding: 0.4em 1em;
background-color: var(--veryDarkBlue);
border: 1px solid var(--veryDarkBlue);
}
button.btn-red:enabled {
background-color: var(--red);
border: 1px solid var(--red);
}
button.btn-blue:enabled {
background-color: var(--blue);
border: 1px solid var(--blue);
}
button.btn-cyan:enabled {
background-color: var(--cyan);
border: 1px solid var(--cyan);
}
button.btn-orange:enabled {
background-color: var(--orange);
border: 1px solid var(--orange);
}
button.btn-red:hover:enabled, button.btn-red:active:enabled {
color: var(--red);
}
button.btn-blue:hover:enabled, button.btn-blue:active:enabled {
color: var(--blue);
}
button.btn-cyan:hover:enabled, button.btn-cyan:active:enabled {
color: var(--cyan);
}
button.btn-orange:hover:enabled, button.btn-orange:active:enabled {
color: var(--orange);
}
button:disabled, input:disabled {
color: var(--grayText);
border: 1px solid var(--grayishBlue);
cursor: not-allowed;
}
button:disabled {
background-color: var(--grayishBlue);
}
button:hover:enabled, button:active:enabled {
background-color: initial;
color: var(--veryDarkBlue)
}
select {
margin: 0 0.5em;
padding: 0.1em 0.2em;
}
select:focus-visible {
outline: auto 0;
}
section {
background-color: var(--veryLightGray);
border-radius: 0.5em;
box-shadow: 0 0.5em 1.5em -0.5em var(--grayishBlue);
padding: 2em;
border-top: 3px solid;
overflow: hidden;
transition-duration: 0.25s;
transition-timing-function: ease-out;
}
section:hover {
box-shadow: 0 0.5em 2em -0.1em var(--grayishBlue);
}
section.top-cyan {
border-top-color: var(--cyan);
}
section.top-red {
border-top-color: var(--red);
}
section.top-blue {
border-top-color: var(--blue);
}
section.top-orange {
border-top-color: var(--orange);
}
img.right {
float: right;
}
img.zoom {
transition-duration: 0.25s;
transition-timing-function: ease-out;
}
img.zoom:hover {
transform: scale(1.2, 1.2);
}
ul {
list-style-type: square;
}
h2 {
color: var(--veryDarkBlue);
font-weight: var(--weight2);
margin-top: 0;
}
a {
text-decoration: none;
color: inherit;
}
footer {
margin-top: 2rem;
padding: 1rem;
text-align: center;
}
footer img {
margin: 0 1rem;
width: 64px;
}
#modal-mask {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
}
#modal-dialog {
position: absolute;
top: 50%;
left: 50%;
width: 85%;
height: 90%;
transform: translate(-50%, -50%);
}
@media (min-width: 50em) {
#modal-dialog {
top: 10%;
width: min(34rem, 75%);
height: auto;
transform: translate(-50%, 0%);
}
}
#modal-close {
float: right;
width: 1.5rem;
line-height: 1.5rem;
text-align: center;
cursor: pointer;
border-radius: 0.25rem;
background-color: lightgray;
}
#modal-close:hover {
background-color: darkgray;
}