Skip to content

Commit f152476

Browse files
committed
add a separated file loading.utils.css
1 parent 129012e commit f152476

4 files changed

Lines changed: 92 additions & 3 deletions

File tree

build

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ echo "build src/shape.styl -> dist/shape.css ..."
88
echo "build animations..."
99
./node_modules/.bin/lsc tool/build-css.ls > dist/main.css
1010

11-
echo "merge css files into loading.css..."
11+
echo "merge css files into loading.css / loading.utils.css ..."
1212
cat dist/shape.css dist/ctrl.css dist/main.css > dist/loading.css
13-
echo "minifying loading.css ..."
13+
cat dist/shape.css dist/ctrl.css > dist/loading.utils.css
14+
echo "minifying loading.css / loading.utils.css ..."
1415
./node_modules/.bin/uglifycss dist/loading.css > dist/loading.min.css
16+
./node_modules/.bin/uglifycss dist/loading.utils.css > dist/loading.utils.min.css
1517
echo "zipping..."
16-
zip -r dist/loading-css.zip dist/loading.min.css
18+
zip -r dist/loading-css.zip dist/loading.min.css dist/loading.utils.min.css
1719
echo "clean up intermediate files..."
1820
rm dist/ctrl.css dist/shape.css dist/main.css
1921

dist/loading-css.zip

688 Bytes
Binary file not shown.

dist/loading.utils.css

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
.ld-ball,
2+
.ld-ring,
3+
.ld-hourglass,
4+
.ld-loader,
5+
.ld-cross,
6+
.ld-square,
7+
.ld-pie,
8+
.ld-spinner {
9+
width: 1em;
10+
height: 1em;
11+
position: relative;
12+
color: inherit;
13+
display: inline-block;
14+
}
15+
.ld-ball:after,
16+
.ld-ring:after,
17+
.ld-hourglass:after,
18+
.ld-loader:after,
19+
.ld-cross:after,
20+
.ld-square:after,
21+
.ld-pie:after,
22+
.ld-spinner:after {
23+
position: absolute;
24+
margin: auto;
25+
width: 100%;
26+
height: 100%;
27+
top: 0;
28+
left: 0;
29+
right: 0;
30+
bottom: 0;
31+
content: " ";
32+
display: inline-block;
33+
background: center center no-repeat;
34+
background-size: cover;
35+
}
36+
.ld-ball:after {
37+
border-radius: 50%;
38+
background: currentColor;
39+
}
40+
.ld-pie:after {
41+
width: 0;
42+
height: 0;
43+
border-radius: 50%;
44+
border-style: solid;
45+
border-width: 0.5em;
46+
-webkit-background-clip: padding-box;
47+
border-color: currentColor currentColor currentColor transparent;
48+
}
49+
.ld-ring:after {
50+
border-radius: 50%;
51+
border-style: solid;
52+
border-width: 0.15em;
53+
-webkit-background-clip: padding-box;
54+
border-color: currentColor currentColor currentColor transparent;
55+
box-sizing: border-box;
56+
}
57+
.ld-hourglass:after {
58+
width: 0;
59+
height: 0;
60+
background: none;
61+
border-radius: 50%;
62+
border-style: solid;
63+
border-width: 0.5em;
64+
border-color: currentColor transparent currentColor transparent;
65+
}
66+
.ld-cross:after {
67+
width: 18%;
68+
height: 18%;
69+
background: currentColor;
70+
box-shadow: 0 0.18em 0 1px currentColor, 0 -0.18em 0 1px currentColor, 0.18em 0 0 1px currentColor, -0.18em 0 0 1px currentColor, 0 0.36em 0 1px currentColor, 0 -0.36em 0 1px currentColor, 0.36em 0 0 1px currentColor, -0.36em 0 0 1px currentColor;
71+
}
72+
.ld-square:after {
73+
width: 90%;
74+
height: 90%;
75+
background: currentColor;
76+
}
77+
.ld-spinner:after {
78+
width: 20%;
79+
height: 20%;
80+
border-radius: 50%;
81+
background: none;
82+
box-shadow: 0 0.5em 0 0 currentColor,0 -.5em 0 0 currentColor,.5em 0 0 0 currentColor,-.5em 0 0 0 currentColor,.35355339059327373em .35355339059327373em 0 0 currentColor,-.35355339059327373em .35355339059327373em 0 0 currentColor,.35355339059327373em -.35355339059327373em 0 0 currentColor,-.35355339059327373em -.35355339059327373em 0 0 currentColor;
83+
}
84+
.ld-loader {
85+
background-size: cover;
86+
}

dist/loading.utils.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)