Skip to content

Commit 557b0f9

Browse files
bahiirwaswashata
authored andcommitted
[cleanup] Remove unused mixins from the codebase. The autoprefixer in the build process makes some of the rules in the mixins obsolute.
1 parent a7927c4 commit 557b0f9

File tree

12 files changed

+56
-244
lines changed

12 files changed

+56
-244
lines changed

assets/scss/_mixins.scss

Lines changed: 8 additions & 196 deletions
Original file line numberDiff line numberDiff line change
@@ -31,52 +31,6 @@ $useIEFilters: 0;
3131
// might be 0 or 1. disabled by default.
3232
// ---- /LEGACY IE SUPPORT USING FILTERS ----
3333

34-
35-
@mixin background-size ($value) {
36-
-webkit-background-size: $value;
37-
background-size: $value;
38-
}
39-
40-
@mixin border-image ($path, $offsets, $repeats) {
41-
-moz-border-image: $path $offsets $repeats;
42-
-o-border-image: $path $offsets $repeats;
43-
-webkit-border-image: $path $offsets $repeats;
44-
border-image: $path $offsets $repeats;
45-
}
46-
47-
@mixin border-radius ($values...) {
48-
-moz-border-radius: $values;
49-
-webkit-border-radius: $values;
50-
border-radius: $values;
51-
/*-moz-background-clip: padding;
52-
-webkit-background-clip: padding-box;
53-
background-clip: padding-box;*/
54-
}
55-
56-
@mixin box-shadow ($values...) {
57-
-moz-box-shadow: $values;
58-
-webkit-box-shadow: $values;
59-
box-shadow: $values;
60-
}
61-
62-
//@mixin box-shadow ($x, $y, $offset, $hex, $ie: $useIEFilters, $inset: null, $spread:null) {
63-
// -moz-box-shadow: $x $y $offset $spread $hex $inset;
64-
// -webkit-box-shadow: $x $y $offset $spread $hex $inset;
65-
// box-shadow: $x $y $offset $spread $hex $inset;
66-
//
67-
// @if $ie == 1 {
68-
// $iecolor: '#' + red($hex) + green($hex) + blue($hex);
69-
// filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=#{$x}, OffY=#{$y}, Color='#{$iecolor}');
70-
// -ms-filter: quote(progid:DXImageTransform.Microsoft.dropshadow(OffX=#{$x}, OffY=#{$y}, Color='#{$iecolor}'));
71-
// }
72-
//}
73-
74-
@mixin box-sizing($value) {
75-
-moz-box-sizing: $value;
76-
-webkit-box-sizing: $value;
77-
box-sizing: $value;
78-
}
79-
8034
// requires sass 3.2
8135
@mixin keyframes($name){
8236
@-moz-keyframes #{$name} { @content; }
@@ -86,169 +40,27 @@ $useIEFilters: 0;
8640
@keyframes #{$name} { @content; }
8741
}
8842

89-
@mixin linear-gradient($from, $to, $ie: $useIEFilters) {
90-
@if $ie != 1 { background-color: $to; }
91-
92-
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, $from),color-stop(1, $to));
93-
background-image: -webkit-linear-gradient(top, $from, $to);
94-
background-image: -moz-linear-gradient(top, $from, $to);
95-
background-image: -ms-linear-gradient(top, $from, $to);
96-
background-image: -o-linear-gradient(top, $from, $to);
97-
background-image: linear-gradient(top, bottom, $from, $to);
98-
99-
@if $ie == 1 {
100-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$from}', endColorstr='#{$to}');
101-
}
102-
}
103-
104-
@mixin horizontal-gradient($startColor: #555, $endColor: #333, $ie: $useIEFilters) {
105-
@if $ie != 1 { background-color: $endColor; }
106-
107-
background-color: $endColor;
108-
background-image: -webkit-gradient(linear, 0 0, 100% 0, from($startColor), to($endColor)); // Safari 4+, Chrome 2+
109-
background-image: -webkit-linear-gradient(left, $startColor, $endColor); // Safari 5.1+, Chrome 10+
110-
background-image: -moz-linear-gradient(left, $startColor, $endColor); // FF 3.6+
111-
background-image: -o-linear-gradient(left, $startColor, $endColor); // Opera 11.10
112-
background-image: linear-gradient(to right, $startColor, $endColor); // Standard, IE10
113-
background-repeat: repeat-x;
114-
@if $ie == 1 {
115-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=1);
116-
}
117-
}
118-
119-
@mixin radial-gradient($from, $to, $ie: $useIEFilters) {
120-
@if $ie != 1 { background-color: $to; }
121-
122-
background: -moz-radial-gradient(center, circle cover, $from 0%, $to 100%);
123-
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, $from), color-stop(100%, $to));
124-
background: -webkit-radial-gradient(center, circle cover, $from 0%, $to 100%);
125-
background: -o-radial-gradient(center, circle cover, $from 0%, $to 100%);
126-
background: -ms-radial-gradient(center, circle cover, $from 0%, $to 100%);
127-
background: radial-gradient(center, circle cover, $from 0%, $to 100%);
128-
background-color: $from;
129-
130-
@if $ie == 1 {
131-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$from}', endColorstr='#{$to}', GradientType=1); /* IE6-9 fallback on horizontal gradient */
132-
}
133-
}
134-
135-
@mixin perspective($perspective) {
136-
-moz-perspective: $perspective;
137-
-ms-perspective: $perspective;
138-
-webkit-perspective: $perspective;
139-
perspective: $perspective;
140-
-moz-transform-style: preserve-3d;
141-
-ms-transform-style: preserve-3d;
142-
-webkit-transform-style: preserve-3d;
143-
transform-style: preserve-3d;
144-
}
145-
146-
@mixin transform ($transforms) {
43+
@mixin transform($transforms) {
14744
-moz-transform: $transforms;
14845
-o-transform: $transforms;
14946
-ms-transform: $transforms;
15047
-webkit-transform: $transforms;
15148
transform: $transforms;
15249
}
15350

154-
@mixin matrix ($a, $b, $c, $d, $e, $f) {
155-
-moz-transform: matrix($a, $b, $c, $d, #{$e}px, #{$f}px);
156-
-o-transform: matrix($a, $b, $c, $d, $e, $f);
157-
-ms-transform: matrix($a, $b, $c, $d, $e, $f);
158-
-webkit-transform: matrix($a, $b, $c, $d, $e, $f);
159-
transform: matrix($a, $b, $c, $d, $e, $f);
160-
}
161-
162-
@mixin rotate ($deg) {
163-
@include transform(rotate(#{$deg}deg));
164-
}
165-
166-
@mixin scale ($size) {
167-
@include transform(scale(#{$size}));
168-
}
169-
170-
@mixin translate ($x, $y) {
171-
@include transform(translate($x, $y));
172-
}
173-
174-
@mixin transition ($value...) {
175-
-moz-transition: $value;
176-
-o-transition: $value;
177-
-ms-transition: $value;
178-
-webkit-transition: $value;
179-
transition: $value;
180-
}
181-
182-
@mixin animation($str) {
183-
-webkit-animation: #{$str};
184-
-moz-animation: #{$str};
185-
-ms-animation: #{$str};
186-
-o-animation: #{$str};
187-
animation: #{$str};
51+
@mixin rotate($deg) {
52+
@include transform(rotate(#{$deg}deg));
18853
}
18954

190-
@mixin animation-name($str) {
191-
-webkit-animation-name: #{$str};
192-
-moz-animation-name: #{$str};
193-
-ms-animation-name: #{$str};
194-
-o-animation-name: #{$str};
195-
animation-name: #{$str};
55+
@mixin scale($size) {
56+
@include transform(scale(#{$size}));
19657
}
19758

198-
@mixin animation-duration($str) {
199-
-webkit-animation-duration: #{$str};
200-
-moz-animation-duration: #{$str};
201-
-ms-animation-duration: #{$str};
202-
-o-animation-duration: #{$str};
203-
animation-duration: #{$str};
204-
}
205-
206-
@mixin animation-direction($str) {
207-
-webkit-animation-direction: #{$str};
208-
-moz-animation-direction: #{$str};
209-
-ms-animation-direction: #{$str};
210-
-o-animation-direction: #{$str};
211-
animation-direction: #{$str};
212-
}
213-
214-
@mixin animation-delay($str) {
215-
animation-delay:#{$str};
216-
-o-animation-delay:#{$str};
217-
-ms-animation-delay:#{$str};
218-
-webkit-animation-delay:#{$str};
219-
-moz-animation-delay:#{$str};
220-
}
221-
222-
@mixin animation-iteration-count($str) {
223-
animation-iteration-count:#{$str};
224-
-o-animation-iteration-count:#{$str};
225-
-ms-animation-iteration-count:#{$str};
226-
-webkit-animation-iteration-count:#{$str};
227-
-moz-animation-iteration-count:#{$str};
228-
}
229-
230-
@mixin animation-timing-function($str) {
231-
-webkit-animation-timing-function: #{$str};
232-
-moz-animation-timing-function: #{$str};
233-
-ms-animation-timing-function: #{$str};
234-
-o-animation-timing-function: #{$str};
235-
animation-timing-function: #{$str};
59+
@mixin translate($x, $y) {
60+
@include transform(translate($x, $y));
23661
}
23762

23863
// ==== /CSS3 SASS MIXINS ====
239-
240-
@mixin opacity($opacity) {
241-
opacity: $opacity;
242-
$opacity-ie: $opacity * 100;
243-
filter: alpha(opacity=$opacity-ie); //IE8
244-
}
245-
246-
@mixin size($width, $height: $width)
247-
{
248-
width: $width;
249-
height: $height;
250-
}
251-
25264
@mixin clearfix
25365
{
25466
&:after {
@@ -267,4 +79,4 @@ $useIEFilters: 0;
26779
}
26880
&:-ms-input-placeholder { color: $color; } // Internet Explorer 10+
26981
&::-webkit-input-placeholder { color: $color; } // Safari and Chrome
270-
}
82+
}

assets/scss/admin/_ajax-loader.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ $size: 20;
1616
background-color: $color;
1717
width: #{$size}px;
1818
height: #{$size}px;
19-
@include animation-name(bounce_ajaxLoader);
20-
@include animation-duration(1.5s);
21-
@include animation-iteration-count(infinite);
22-
@include animation-direction(normal);
19+
animation-name: bounce_ajaxLoader;
20+
animation-duration: 1.5s;
21+
animation-iteration-count: infinite;
22+
animation-direction: normal;
2323
@include transform(.3);
2424
}
2525

@@ -28,7 +28,7 @@ $size: 20;
2828
.fs-ajax-loader-bar-#{$i + 1}
2929
{
3030
left: #{$i*($size - 1)}px;
31-
@include animation-delay(#{0.6 + $i*0.15}s);
31+
animation-delay: #{0.6 + $i*0.15}s;
3232
}
3333
}
3434
}
@@ -46,4 +46,4 @@ $size: 20;
4646
@include transform(scale(.3));
4747
background-color: $bkg-color;
4848
}
49-
}
49+
}

assets/scss/admin/_badge.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
color: white;
88
text-transform: uppercase;
99
padding: 5px 10px;
10-
@include border-radius(3px 0 0 3px);
10+
border-radius: 3px 0 0 3px;
1111
font-weight: bold;
1212
border-right: 0;
13-
@include box-shadow(0 2px 1px -1px rgba(0, 0, 0, .3));
14-
}
13+
box-shadow: 0 2px 1px -1px rgba(0, 0, 0, .3);
14+
}

assets/scss/admin/_modal-common.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@
124124
top: 12px;
125125
cursor: pointer;
126126
color: #bbb;
127-
@include border-radius(20px);
127+
border-radius: 20px;
128128
padding: 3px;
129-
@include transition(all 0.2s ease-in-out);
129+
transition: all 0.2s ease-in-out;
130130

131131
&:hover {
132132
color: #fff;
@@ -209,4 +209,4 @@
209209

210210
body.has-fs-modal {
211211
overflow: hidden;
212-
}
212+
}

assets/scss/admin/_switch.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ $switch-on-color: $wp-button-primary-background-color;
4040
background-image: linear-gradient(to bottom, #ececec, #fff);
4141
box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
4242
z-index: 999;
43-
@include transition(0.40s cubic-bezier(0.54, 1.6, 0.5, 1));
43+
transition: 0.40s cubic-bezier(0.54, 1.6, 0.5, 1);
4444
}
4545

4646
&.fs-off .fs-toggle
@@ -57,14 +57,14 @@ $switch-on-color: $wp-button-primary-background-color;
5757
{
5858
top: math.div($switch-size, 3);
5959
padding: 4px ($switch-size + 1px);
60-
@include border-radius($switch-size);
60+
border-radius: $switch-size;
6161

6262
.fs-toggle
6363
{
6464
top: 0;
6565
width: $switch-size;
6666
height: $switch-size;
67-
@include border-radius($switch-size);
67+
border-radius: $switch-size;
6868
}
6969

7070
&.fs-off .fs-toggle
@@ -94,7 +94,7 @@ $switch-on-color: $wp-button-primary-background-color;
9494
top: 0;
9595
width: $switch-small-size;
9696
height: $switch-small-size;
97-
@include border-radius($switch-small-size);
97+
border-radius: $switch-small-size;
9898
}
9999

100100
&.fs-on .fs-toggle
@@ -103,4 +103,4 @@ $switch-on-color: $wp-button-primary-background-color;
103103
}
104104
}
105105
}
106-
}
106+
}

assets/scss/admin/_tooltip.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{
1818
opacity: 0;
1919
visibility: hidden;
20-
@include transition(opacity 0.3s ease-in-out);
20+
transition: opacity 0.3s ease-in-out;
2121
position: absolute;
2222
background: $tooltip-bkg-color;
2323
color: $tooltip-color !important;
@@ -29,8 +29,8 @@
2929
margin-bottom: 5px;
3030
left: -17px;
3131
right: 0;
32-
@include border-radius(5px);
33-
@include box-shadow(1px 1px 1px rgba(0, 0, 0, 0.2));
32+
border-radius: 5px;
33+
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
3434
line-height: 1.3em;
3535
font-weight: bold;
3636
text-align: left;
@@ -72,4 +72,4 @@
7272
opacity: 1;
7373
}
7474
}
75-
}
75+
}

0 commit comments

Comments
 (0)