Skip to content

Commit e88ce76

Browse files
committed
add basic style's
1 parent 0c946dd commit e88ce76

File tree

1 file changed

+91
-0
lines changed

1 file changed

+91
-0
lines changed

css/style.css

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
* {
2+
box-sizing: border-box;
3+
}
4+
:root {
5+
--x: 0;
6+
--y: 0;
7+
--xp: 0;
8+
--yp: 0;
9+
--hue: calc(0 + (var(--xp) * 500));
10+
--bg: hsl(0 0% 10%);
11+
--size: 100px;
12+
--glow: radial-gradient(
13+
50% 50% at center,
14+
hsl(var(--hue) 80% 85%),
15+
hsl(var(--hue) 80% 70%),
16+
transparent
17+
)
18+
calc((var(--x) * 1px) - (var(--size) * 0.5))
19+
calc((var(--y) * 1px) - (var(--size) * 0.5)) / var(--size) var(--size)
20+
no-repeat fixed;
21+
}
22+
23+
.controls {
24+
position: fixed;
25+
top: 2rem;
26+
right: 2rem;
27+
}
28+
29+
body {
30+
display: flex;
31+
place-items: center;
32+
gap: 1rem;
33+
flex-wrap: wrap;
34+
justify-content: center;
35+
min-height: 100vh;
36+
font-family: "SF Pro Text", "SF Pro Icons", "AOS Icons", "Helvetica Neue",
37+
Helvetica, Arial, sans-serif, system-ui;
38+
background: var(--bg);
39+
}
40+
41+
button {
42+
border-radius: 1rem;
43+
text-transform: uppercase;
44+
font-weight: bold;
45+
letter-spacing: 0.1ch;
46+
background: var(--bg);
47+
border: 4px solid transparent;
48+
box-shadow: 0 1px hsl(0 0% 100% / 0.15) inset;
49+
cursor: pointer;
50+
background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--glow),
51+
linear-gradient(black, black) border-box;
52+
transition: all 0.24s;
53+
touch-action: none;
54+
position: relative;
55+
padding: 1rem 2rem;
56+
}
57+
58+
button::before {
59+
content: "";
60+
position: absolute;
61+
inset: 0;
62+
box-shadow: 0 1px hsl(0 0% 100% / 0.15) inset;
63+
background: var(--bg);
64+
z-index: 2;
65+
border-radius: 1rem;
66+
}
67+
68+
button span {
69+
background: var(--glow), black;
70+
background-clip: text;
71+
color: transparent;
72+
height: 100%;
73+
width: 100%;
74+
z-index: 2;
75+
position: relative;
76+
inset: 0;
77+
}
78+
79+
:root:has(button:active) {
80+
--size: 300px;
81+
}
82+
83+
button::after {
84+
content: "";
85+
position: absolute;
86+
inset: -4px;
87+
filter: blur(20px);
88+
border: 4px solid transparent;
89+
background: var(--glow);
90+
border-radius: 1rem;
91+
}

0 commit comments

Comments
 (0)