Skip to content

Commit 84f34e2

Browse files
committed
Separate CSS
1 parent 60b3afd commit 84f34e2

File tree

3 files changed

+46
-46
lines changed

3 files changed

+46
-46
lines changed

css/base.css

-46
Original file line numberDiff line numberDiff line change
@@ -190,52 +190,6 @@ main {
190190
outline: none;
191191
}
192192

193-
.particles {
194-
position: relative;
195-
grid-area: 1 / 1 / 2 / 2;
196-
}
197-
198-
.particles-canvas {
199-
position: absolute;
200-
pointer-events: none;
201-
top: 50%;
202-
left: 50%;
203-
transform: translate3d(-50%,-50%,0);
204-
}
205-
206-
.particles-wrapper {
207-
position: relative;
208-
display: inline-block;
209-
overflow: hidden;
210-
}
211-
212-
.particles-button {
213-
-webkit-touch-callout: none;
214-
-webkit-user-select: none;
215-
-khtml-user-select: none;
216-
-moz-user-select: none;
217-
-ms-user-select: none;
218-
user-select: none;
219-
position: relative;
220-
border-radius: 5px;
221-
border-radius: var(--radius-button);
222-
background: var(--color-button-bg);
223-
color: var(--color-button-text);
224-
border: 0;
225-
border: var(--border-button);
226-
margin: 0;
227-
padding: 1.5rem 3rem;
228-
padding: var(--button-padding);
229-
}
230-
231-
.particles-button:focus {
232-
outline: none;
233-
}
234-
235-
.no-js .particles-button {
236-
grid-area: 1 / 1 / 2 / 2;
237-
}
238-
239193
.theme-1 {
240194
--color-item-bg: linear-gradient(120deg, #a8edea 0%, #fed6e3 100%);
241195
--color-action: #121019;

css/particles.css

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
.particles {
2+
position: relative;
3+
grid-area: 1 / 1 / 2 / 2;
4+
}
5+
6+
.particles-canvas {
7+
position: absolute;
8+
pointer-events: none;
9+
top: 50%;
10+
left: 50%;
11+
transform: translate3d(-50%,-50%,0);
12+
}
13+
14+
.particles-wrapper {
15+
position: relative;
16+
display: inline-block;
17+
overflow: hidden;
18+
}
19+
20+
.particles-button {
21+
-webkit-touch-callout: none;
22+
-webkit-user-select: none;
23+
-khtml-user-select: none;
24+
-moz-user-select: none;
25+
-ms-user-select: none;
26+
user-select: none;
27+
position: relative;
28+
border-radius: 5px;
29+
border-radius: var(--radius-button);
30+
background: var(--color-button-bg);
31+
color: var(--color-button-text);
32+
border: 0;
33+
border: var(--border-button);
34+
margin: 0;
35+
padding: 1.5rem 3rem;
36+
padding: var(--button-padding);
37+
}
38+
39+
.particles-button:focus {
40+
outline: none;
41+
}
42+
43+
.no-js .particles-button {
44+
grid-area: 1 / 1 / 2 / 2;
45+
}

index.html

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<meta name="keywords" content="bursting, exploding, particles, buttons, canvas, animation, javascript" />
99
<meta name="author" content="Codrops" />
1010
<link rel="shortcut icon" href="favicon.ico">
11+
<link rel="stylesheet" type="text/css" href="css/particles.css" />
1112
<link rel="stylesheet" type="text/css" href="css/base.css" />
1213
<script>document.documentElement.className="js";var supportsCssVars=function(){var e,t=document.createElement("style");return t.innerHTML="root: { --tmp-var: bold; }",document.head.appendChild(t),e=!!(window.CSS&&window.CSS.supports&&window.CSS.supports("font-weight","var(--tmp-var)")),t.parentNode.removeChild(t),e};supportsCssVars()||alert("Please view this demo in a modern browser that supports CSS Variables.");</script>
1314
</head>

0 commit comments

Comments
 (0)