Skip to content

Commit

Permalink
Remove unnecessary use of @extend inside mixins (#2000)
Browse files Browse the repository at this point in the history
* Remove unnecessary use of @extend inside mixins

* Revert changes to +unselectable, +delete, and +loader

* Move @extend selector styling to their related mixin.
  • Loading branch information
Log1x authored and jgthms committed Aug 1, 2018
1 parent bff70ed commit 2c71629
Showing 1 changed file with 20 additions and 21 deletions.
41 changes: 20 additions & 21 deletions sass/utilities/mixins.sass
Expand Up @@ -130,18 +130,18 @@

// Placeholders
%unselectable
=unselectable
-webkit-touch-callout: none
-webkit-user-select: none
-moz-user-select: none
-ms-user-select: none
user-select: none

=unselectable
@extend %unselectable
%unselectable
+unselectable

%arrow
border: 3px solid transparent
=arrow($color: transparent)
border: 3px solid $color
border-radius: 2px
border-right: 0
border-top: 0
Expand All @@ -156,18 +156,17 @@
transform-origin: center
width: 0.625em

=arrow($color)
@extend %arrow
border-color: $color
%arrow
+arrow

%block
=block
&:not(:last-child)
margin-bottom: 1.5rem

=block
@extend %block
%block
+block

%delete
=delete
@extend %unselectable
-moz-appearance: none
-webkit-appearance: none
Expand Down Expand Up @@ -233,10 +232,10 @@
min-width: 32px
width: 32px

=delete
@extend %delete
%delete
+delete

%loader
=loader
animation: spinAround 500ms infinite linear
border: 2px solid $grey-lighter
border-radius: $radius-rounded
Expand All @@ -248,20 +247,20 @@
position: relative
width: 1em

=loader
@extend %loader
%loader
+loader

%overlay
=overlay($offset: 0)
bottom: 0
left: 0
position: absolute
right: 0
top: 0

=overlay($offset: 0)
@extend %overlay
@if $offset != 0
bottom: $offset
left: $offset
right: $offset
top: $offset

%overlay
+overlay

0 comments on commit 2c71629

Please sign in to comment.