Skip to content

Commit 88a82f9

Browse files
author
Valentin Hervieu
committed
Simplify the css rules by removing tag names when a css class is already used.
Closes #154.
1 parent 3aa77c5 commit 88a82f9

File tree

3 files changed

+79
-79
lines changed

3 files changed

+79
-79
lines changed

dist/rzslider.css

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ rzslider[disabled] {
2828
cursor: not-allowed;
2929
}
3030

31-
rzslider[disabled] span.rz-pointer {
31+
rzslider[disabled] .rz-pointer {
3232
cursor: not-allowed;
3333
background-color: #d8e0f3;
3434
}
@@ -39,13 +39,13 @@ rzslider span {
3939
white-space: nowrap;
4040
}
4141

42-
rzslider span.rz-base {
42+
rzslider .rz-base {
4343
width: 100%;
4444
height: 100%;
4545
padding: 0;
4646
}
4747

48-
rzslider span.rz-bar-wrapper {
48+
rzslider .rz-bar-wrapper {
4949
left: 0;
5050
z-index: 1;
5151
width: 100%;
@@ -55,7 +55,7 @@ rzslider span.rz-bar-wrapper {
5555
box-sizing: border-box;
5656
}
5757

58-
rzslider span.rz-bar {
58+
rzslider .rz-bar {
5959
left: 0;
6060
z-index: 1;
6161
width: 100%;
@@ -66,15 +66,15 @@ rzslider span.rz-bar {
6666
border-radius: 2px;
6767
}
6868

69-
rzslider span.rz-bar.rz-selection {
69+
rzslider .rz-bar.rz-selection {
7070
z-index: 2;
7171
background: #0db9f0;
7272
-webkit-border-radius: 2px;
7373
-moz-border-radius: 2px;
7474
border-radius: 2px;
7575
}
7676

77-
rzslider span.rz-pointer {
77+
rzslider .rz-pointer {
7878
top: -14px;
7979
z-index: 3;
8080
width: 32px;
@@ -86,7 +86,7 @@ rzslider span.rz-pointer {
8686
border-radius: 16px;
8787
}
8888

89-
rzslider span.rz-pointer:after {
89+
rzslider .rz-pointer:after {
9090
position: absolute;
9191
top: 12px;
9292
left: 12px;
@@ -99,26 +99,26 @@ rzslider span.rz-pointer:after {
9999
content: '';
100100
}
101101

102-
rzslider span.rz-pointer:hover:after {
102+
rzslider .rz-pointer:hover:after {
103103
background-color: #ffffff;
104104
}
105105

106-
rzslider span.rz-pointer.rz-active:after {
106+
rzslider .rz-pointer.rz-active:after {
107107
background-color: #451aff;
108108
}
109109

110-
rzslider span.rz-bubble {
110+
rzslider .rz-bubble {
111111
bottom: 16px;
112112
padding: 1px 3px;
113113
color: #55637d;
114114
cursor: default;
115115
}
116116

117-
rzslider span.rz-bubble.rz-selection {
117+
rzslider .rz-bubble.rz-selection {
118118
top: 16px;
119119
}
120120

121-
rzslider span.rz-bubble.rz-limit {
121+
rzslider .rz-bubble.rz-limit {
122122
color: #55637d;
123123
}
124124

dist/rzslider.min.css

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

src/rzslider.less

Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ rzslider {
2323

2424
&[disabled] {
2525
cursor: not-allowed;
26-
span.rz-pointer {
26+
.rz-pointer {
2727
cursor: not-allowed;
2828
background-color: @handleDisabledColor;
2929
}
@@ -33,80 +33,80 @@ rzslider {
3333
white-space: nowrap;
3434
position: absolute;
3535
display: inline-block;
36+
}
3637

37-
&.rz-base {
38-
width: 100%;
39-
height: 100%;
40-
padding: 0;
41-
}
38+
.rz-base {
39+
width: 100%;
40+
height: 100%;
41+
padding: 0;
42+
}
4243

43-
&.rz-bar-wrapper {
44-
left: 0;
45-
box-sizing: border-box;
46-
margin-top: -@handleSize / 2;
47-
padding-top: @handleSize / 2;
48-
width: 100%;
49-
height: @handleSize;
50-
z-index: 1;
51-
}
44+
.rz-bar-wrapper {
45+
left: 0;
46+
box-sizing: border-box;
47+
margin-top: -@handleSize / 2;
48+
padding-top: @handleSize / 2;
49+
width: 100%;
50+
height: @handleSize;
51+
z-index: 1;
52+
}
5253

53-
&.rz-bar {
54-
left: 0;
55-
width: 100%;
56-
height: @barHeight;
57-
z-index: 1;
58-
background: @barNormalColor;
59-
.rounded(@barHeight/2);
54+
.rz-bar {
55+
left: 0;
56+
width: 100%;
57+
height: @barHeight;
58+
z-index: 1;
59+
background: @barNormalColor;
60+
.rounded(@barHeight/2);
6061

61-
&.rz-selection {
62-
z-index: 2;
63-
background: @barFillColor;
64-
.rounded(@barHeight/2);
65-
}
62+
&.rz-selection {
63+
z-index: 2;
64+
background: @barFillColor;
65+
.rounded(@barHeight/2);
6666
}
67+
}
6768

68-
&.rz-pointer {
69-
cursor: pointer;
70-
width: @handleSize;
71-
height: @handleSize;
72-
top: -@handleSize/2 + @barHeight/2;
73-
background-color: @handleBgColor;
74-
z-index: 3;
75-
.rounded(@handleSize/2);
76-
// -webkit-transition:all linear 0.15s;
77-
// -moz-transition:all linear 0.15s;
78-
// -o-transition:all linear 0.15s;
79-
// transition:all linear 0.15s;
69+
.rz-pointer {
70+
cursor: pointer;
71+
width: @handleSize;
72+
height: @handleSize;
73+
top: -@handleSize/2 + @barHeight/2;
74+
background-color: @handleBgColor;
75+
z-index: 3;
76+
.rounded(@handleSize/2);
77+
// -webkit-transition:all linear 0.15s;
78+
// -moz-transition:all linear 0.15s;
79+
// -o-transition:all linear 0.15s;
80+
// transition:all linear 0.15s;
8081

81-
&:after {
82-
content: '';
83-
width: @handlePointerSize;
84-
height: @handlePointerSize;
85-
position: absolute;
86-
top: @handleSize/2 - @handlePointerSize/2;
87-
left: @handleSize/2 - @handlePointerSize/2;
88-
.rounded(@handlePointerSize/2);
89-
background: @handleInnerColor;
90-
}
91-
&:hover:after {
92-
background-color: @handleHoverColor;
93-
}
94-
&.rz-active:after {
95-
background-color: @handleActiveColor;
96-
}
82+
&:after {
83+
content: '';
84+
width: @handlePointerSize;
85+
height: @handlePointerSize;
86+
position: absolute;
87+
top: @handleSize/2 - @handlePointerSize/2;
88+
left: @handleSize/2 - @handlePointerSize/2;
89+
.rounded(@handlePointerSize/2);
90+
background: @handleInnerColor;
91+
}
92+
&:hover:after {
93+
background-color: @handleHoverColor;
9794
}
95+
&.rz-active:after {
96+
background-color: @handleActiveColor;
97+
}
98+
}
9899

99-
&.rz-bubble {
100-
cursor: default;
101-
bottom: @handleSize/2;
102-
padding: @bubblePadding;
103-
color: @labelTextColor;
104-
&.rz-selection {
105-
top: @handleSize/2;
106-
}
107-
&.rz-limit {
108-
color: @limitLabelTextColor;
109-
}
100+
.rz-bubble {
101+
cursor: default;
102+
bottom: @handleSize/2;
103+
padding: @bubblePadding;
104+
color: @labelTextColor;
105+
&.rz-selection {
106+
top: @handleSize/2;
107+
}
108+
&.rz-limit {
109+
color: @limitLabelTextColor;
110110
}
111111
}
112112

0 commit comments

Comments
 (0)