Skip to content

Commit 2a4b485

Browse files
committed
demo of @value
1 parent b6e8bd1 commit 2a4b485

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"brfs": "git://github.com/joshwnj/brfs#ignore-option",
3131
"browserify": "^11.0.1",
3232
"budo": "^4.0.0",
33-
"css-modulesify": "^0.6.1",
33+
"css-modulesify": "git://github.com/css-modules/css-modulesify#values-support",
3434
"garnish": "^2.1.3",
3535
"gh-pages": "git://github.com/markdalgleish/gh-pages#cli-message",
3636
"hyperscript": "^1.4.6",

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)