Skip to content

Commit 2b872ed

Browse files
committed
Merge pull request #5 from css-modules/values-demo
Demo of @value
2 parents 9e90747 + a95e708 commit 2b872ed

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

src/components/1-ScopedSelectors/ScopedSelectors.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
@value niceGray: #777;
2+
13
.root {
24
border-width: 2px;
35
border-style: solid;
4-
border-color: #777;
6+
border-color: niceGray;
57
padding: 0 20px;
68
margin: 0 6px;
79
max-width: 400px;
810
}
911

1012
.text {
11-
color: #777;
13+
color: niceGray;
1214
font-size: 24px;
1315
font-family: helvetica, arial, sans-serif;
1416
font-weight: 600;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@value duration: 0.6s;
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
@value bounceAmount: -20px;
2+
@value duration as bounceDuration from "./animation-values.css";
3+
14
@keyframes bounce {
2-
33% { transform: translateY(-20px); }
5+
33% { transform: translateY(bounceAmount); }
36
66% { transform: translateY(0px); }
47
}
58

69
.bounce {
7-
animation: bounce 1s infinite ease-in-out;
10+
animation: bounce bounceDuration infinite ease-in-out;
811
}

0 commit comments

Comments
 (0)