-
-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathcalc.css
More file actions
36 lines (31 loc) · 632 Bytes
/
calc.css
File metadata and controls
36 lines (31 loc) · 632 Bytes
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
:root{
/*These are the root vars*/
--para-color:#333;
--title-color: aquamarine;
--high-color: orange;
}
body{
overflow-x: hidden;
margin: 0;
}
h1{
color: var(--title-color);
background-color: var(--para-color);
/*
calc(-50vw + 50%) is a trick to make it streatch for entire screen
*/
margin: 0 calc(-50vw + 50%);
padding: 10px 0.5em;
/*
Increase the font size using the calc funtion
*/
font-size: calc(1vw + 2rem);
}
p{
color: var(--para-color);
}
.highlight{
background-color: var(--high-color);
margin: 0 calc(-50vw + 50%);
padding: 10px;
}