-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Example-for-CSS-color-class-variables-and-Theme-CSS-rules.css
301 lines (222 loc) · 7.54 KB
/
Example-for-CSS-color-class-variables-and-Theme-CSS-rules.css
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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
@charset "UTF-8"; /* Set the encoding of file to UTF-8 */
/*
This is a working develeopment file for human readability.
Use the CSS optimizer to reduce file size for published websites or apps.
-++ LTS Flex CSS Theme websites and HTML apps. +++-
--- Original author :: Nik K. linkedin.com/in/nik--k---/ (19.April.2020).
--- Code adoption :: YourName (date).
--- License :: GNU General Public License v 3.0.
--- Latest version :: github.com/Dorson/LTS-flex-css-style-theme-generator
Global color, size and style settings first, then we can overwrite them in
exceptional cases below. Computers use the last mentioned CSS setting.
*/
/* Set default color variables. */
:root , :root.snow-white {
--color-html: #F9F9F9 ;
--color-body: #fdfdfd ;
--color-text: #051105 ;
--color-link: #1122D8 ;
--color-selected-text: #000 ;
--color-selected-bg: #CF7 ;
}
/* If "dark" is set as preferred color in user app settings. */
@media screen and (prefers-color-scheme: dark) {
html:not(.snow-white) {
--color-html: #0e0b0b ;
--color-body: #1a1010 ;
--color-text: #d1d1d1 ;
--color-link: #4fbcff ;
--color-selected-text: #000 ;
--color-selected-bg: #CF7 ;
}
}
/* Dark mode color variables, if "dark" is set as HTML tag's CSS class */
html.dark {
--color-html: #0e0b0b ;
--color-body: #1a1010 ;
--color-text: #d1d1d1 ;
--color-link: #4fbcff ;
--color-selected-text: #000 ;
--color-selected-bg: #CF7 ;
}
/* Deep Purple color variables, if "purple" is set as HTML tag's CSS class */
html.purple {
--color-html: #0a0614 ;
--color-body: #120b24 ;
--color-text: #d1d1d1 ;
--color-selected-text: #000 ;
--color-selected-bg: #CF7 ;
--color-link: #4fbcff ;
}
/* Deep Green color variables, if "green" is set as HTML tag's CSS class */
html.green {
--color-html: #04160a ;
--color-body: #072813 ;
--color-text: #d1d1d1 ;
--color-selected-text: #000 ;
--color-selected-bg: #CF7 ;
--color-link: #4fbcff ;
}
/* Cobalt Blue color variables, if "blue" is set as HTML tag's CSS class */
html.blue {
--color-html: #000d1a ;
--color-body: #001830 ;
--color-text: #d1d1d1 ;
--color-selected-text: #000 ;
--color-selected-bg: #CF7 ;
--color-link: #4fbcff ;
}
/*
body width is set to 99% to avoid screen overflow on all devices.
Font-size 115% in the html tag = 1rem unit = 17-20px, if 16px was user default,
then we reference that everywhere as global unit of global text line-hight.
It is the calculation in line heights, where size can be 0.7rem = 70% of
text-line height.
*/
/*
html box-sizing will include border margins,
all the rest use the size of their parent box
*/
html {box-sizing: border-box;}
html *, *:before, *:after {box-sizing: inherit;}
html {font-size:115%;padding:0px 1em 0px 1em;background:var(--color-html);}
html, body {margin: 0px;}
/* max-width:99.5%; for over-sized elements to avoid screen overflow on all devices. */
body,img,iframe,input,select,element,script,embed,form{
max-width:calc(100% - 4px);
}
body { padding: 7rem 3% 3rem 3% ;
min-height: 99% ; display: block ;
background: var(--color-body) ; color: var(--color-text) ;
}
/* Default minimal spacing between all elements. Set other, where needed. */
body * { margin: 0.5rem 0.3rem ; }
/* Typography Styles. rem unit size is best set as font size in html tag. */
@import url('https://fonts.googleapis.com/css?family=Montserrat&display=swap');
body, input, select, textarea, body iframe {
font:1.14em/1.5em Montserrat, sans-serif ;
}
h1,h2,h3,h4,h5,h6 {
margin: 1rem 0rem 1rem 0rem ;
font-family: Montserrat, Roboto, Verdana, sans-serif ;
letter-spacing: 0.1rem ;
}
h1 { font:1.555rem/1.777rem medium ; }
h2 { font:1.444rem/1.666rem medium ; }
h3 { font:1.333rem/1.555rem medium ; }
h4 { font:1.222rem/1.444rem sans ; }
h5 { font:1.161rem/1.333rem sans ; }
h6 { font:1.145rem/1.250rem sans ; }
* > h1:not(:first-of-type):not(:first-child ) ,
* > h2:not(:first-of-type):not(:first-child ) ,
* > h3:not(:first-of-type):not(:first-child ){
margin: 2rem 0rem 1rem 0rem ;
}
input,textarea,select {padding:0.3rem;}
input[type="checkbox"],input[type="radio"]{
width:1.5em; height:1.5em;
}
form{
padding:0.7rem;
position: relative;
display: flex;
max-width:98%;
vertical-align: top;
flex-wrap: wrap;
flex-direction: column;
justify-content:space-evenly;
align-items: space-evenly;
align-content: space-around;
}
form *{
position: relative;
margin:0.5em 0.1em 0.3em 0.1em;
max-width:99%;
display:inline-flex;
align-self:stretch;
}
/* GLOBAL COLORS that were not set before. */
form { background-color: rgba(240, 240, 240, 0.1) ; }
button , input[type=submit] {
margin: 0.244rem ;
box-shadow:inset 1px 3px 3px 0px #f7c5c0;
background: linear-gradient(to bottom, #f04257 1%, #e0122a 99%);
background-color: #e0122a ;
border-radius: 0.4rem ;
border: 0px ;
display: inline ;
cursor: pointer ;
color: #f1f1f1 ;
text-shadow: 0px 1px 1px #222 ;
font-family: Arial ;
font-size: 1.2rem ;
font-weight: bold ;
padding: 0.2rem 0.5rem 0.2rem 0.5rem ;
text-decoration: none ;
}
button:hover {
background: linear-gradient(to bottom, #ee2b41 3%, #f47181 99%) ;
background-color: #ee2b41 ;
box-shadow: 1px 2px 2px 0px #f04257 ;
}
button:active {
background: #e0122a ;
box-shadow: none ;
text-decoration: none ;
}
::selection{background:var(--color-selected-bg);color:var(--color-selected-text);}
/* GLOBAL style settings that were not set before. */
/* Style for links. */
a:link, a:visited { color : var(--color-link) ; text-decoration: none ; }
a:hover { border-bottom: 0.185rem dashed var(--color-link) ; border-radius: 0.4em ; }
input:hover, select:hover, textarea:hover {
box-shadow: 0.5em 0.5em 0.7em #aaa; cursor: pointer;
}
/* scrollbar style is fun, but could confuse some users. */
body::-webkit-scrollbar {
margin:0px;padding:0px;
width: 0.99rem;
background: transparent;
}
body::-webkit-scrollbar-thumb {
margin:0px;padding:0px;
width: 0.99rem;
border: 4px double #ccc;
background: #edf0f3; border-radius: 9px;
box-shadow: 0rem 0.1rem 0.3rem #ccc ;
}
/* GLOBAL CSS element classes, if needed. Keep them to the minimum.
Set CSS classes on individual pages, when they are NOT used globally.
/* Examples of CSS Global classes for content boxes.
.l-box {box, left on the screen}
.r-box {box, right on the screen}
.footer {bottom footer with quick links, final text, etc..}
*/
/* .header is the box at the top of screen
for logo, menu, links, search, login, etc. */
.header {margin:10px 0px 5px 0px; width:99%; display:block;}
/* .docker is the sticky menue bar at the bottom of screen
for quick settings and buttons */
.docker { background: transparent ; color: var(--color-text) ;
margin: 1px ; padding: 0px ; border: 0px ;
position: fixed ; bottom: 0% ; left: 15% ; z-index: 99 ; width: 13.5rem ; height: 2.7rem ;
text-align: left ; vertical-align: top ; overflow: hidden ;
}
.docker:hover , .docker:active { background: var(--color-body) ; color: var(--color-text) ;
margin: 1px ; padding: 0.1rem 0.4rem 3rem 0.4rem ;
position: fixed; bottom: 0px ; left: 2% ; z-index:250; width: 73% ; height: 75% ;
border-radius: 8px ; box-shadow: 0px 1px 33px #aaa ; border-bottom: 3rem double rgba(150, 150, 150, 0.1) ;
display: block ; overflow: auto ; vertical-align: top ; text-align: center ;
}
.v-center { vertical-align: middle; }
.h-center { text-align: center}
.all-center { vertical-align: middle; text-align: center; display: flex;
justify-content: center; }
/* Print exception rules. Very useful to print website as PDF and grandma :-) */
@media print {
.docker , .menue { visibility: hidden; }
.no-print, .no-print *
{
display: none !important;
}
}