-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
90 lines (82 loc) · 2.13 KB
/
Copy pathstyle.css
File metadata and controls
90 lines (82 loc) · 2.13 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
:root{
box-sizing: border-box;
}
*, *::after, *::before{
box-sizing: inherit;
margin: 0;
padding: 0;
}
.product img{
max-width: 100%;
min-width: 20rem;
}
.container{
display: grid;
place-items: center;
height: 100vh;
width: 100vw;
padding: 0 2.5rem;
background-color: hsl(30, 50%, 75%);
}
.product::after{
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: hsl(30, 50%, 75%);
/* opacity: 0.5; */
mix-blend-mode: hue;
}
.product-nav{
position: relative;
}
.product-nav label{
display: inline-block;
width: 5vmin;
height: 5vmin;
background-color: hsl(30, 50%, 75%);
border-radius: 50%;
cursor: pointer;
box-shadow: 0 0 0 0.5em #fff,
0.5em 0.5em 1em -0.15em rgba(0, 0, 0, 0.25);
transition: 200ms all ease-in-out;
}
.product-nav label + label{
margin-left: 2.5em;
}
.product-nav label:nth-of-type(1),
#color-1:checked ~ .product::after{
background-color: hsl(30, 50%, 75%);
}
.product-nav label:nth-of-type(2),
#color-2:checked ~ .product::after{
background-color: hsl(120, 50%, 75%);
}
.product-nav label:nth-of-type(3),
#color-3:checked ~ .product::after{
background-color: hsl(210, 50%, 75%);
}
.product-nav label:nth-of-type(4),
#color-4:checked ~ .product::after{
background-color: hsl(300, 50%, 75%);
}
#color-1:checked ~ .product-nav > label:nth-of-type(1),
#color-2:checked ~ .product-nav > label:nth-of-type(2),
#color-3:checked ~ .product-nav > label:nth-of-type(3),
#color-4:checked ~ .product-nav > label:nth-of-type(4){
transform: scale(1.3);
}
#color-1:checked ~ .product-nav > label:nth-of-type(1){
background-color: hsl(30, 70%, 45%);
}
#color-2:checked ~ .product-nav > label:nth-of-type(2){
background-color: hsl(120, 70%, 45%);
}
#color-3:checked ~ .product-nav > label:nth-of-type(3){
background-color: hsl(210, 70%, 45%);
}
#color-4:checked ~ .product-nav > label:nth-of-type(4){
background-color: hsl(300, 70%, 45%);
}