Skip to content

Commit

Permalink
Move mixins to the top of the files for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Oct 21, 2020
1 parent cc78ed3 commit 3ab266c
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 36 deletions.
8 changes: 6 additions & 2 deletions dist/cerulean/_bootswatch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
// Bootswatch


// Variables ===================================================================

$text-shadow: 0 1px 0 rgba(0, 0, 0, .05) !default;

// Mixins ======================================================================

@mixin btn-shadow($color){
@include gradient-y-three-colors(lighten($color, 8%), $color, 60%, darken($color, 4%));
}

$text-shadow: 0 1px 0 rgba(0, 0, 0, .05) !default;

// Navbar ======================================================================

.bg-primary {
Expand Down
2 changes: 2 additions & 0 deletions dist/lumen/_bootswatch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
$web-font-path: "https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,300;0,400;0,700;1,400&display=swap" !default;
@import url($web-font-path);

// Mixins ======================================================================

@mixin shadow($width: 4px){
border-style: solid;
border-width: 0 1px $width 1px;
Expand Down
66 changes: 33 additions & 33 deletions dist/materia/_bootswatch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" !default;
@import url($web-font-path);

// Effects =====================================================================
// Mixins ======================================================================

@mixin ripple($color){
position: relative;
Expand Down Expand Up @@ -44,6 +44,30 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;50
}
}

@mixin btn($class,$bg,$color){
.btn-#{$class} {
&:focus {
background-color: $bg;
box-shadow: 0 0 0 2px rgba(204, 204, 204, .5);
}

&:hover,
&:active:hover {
background-color: darken($bg, 6%);
}

&:active {
box-shadow: 2px 2px 4px rgba(0, 0, 0, .4);
}

@include ripple($color);
}

.btn-outline-#{$class} {
@include ripple($color);
}
}

.dropdown-toggle::after,
.dropup .dropdown-toggle::after,
.dropright .dropdown-toggle::after,
Expand Down Expand Up @@ -89,38 +113,14 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;50

// Buttons =====================================================================

@mixin btn($class,$bg,$color){
.btn-#{$class} {
&:focus {
background-color: $bg;
box-shadow: 0 0 0 2px rgba(204, 204, 204, .5);
}

&:hover,
&:active:hover {
background-color: darken($bg, 6%);
}

&:active {
box-shadow: 2px 2px 4px rgba(0, 0, 0, .4);
}

@include ripple($color);
}

.btn-outline-#{$class} {
@include ripple($color);
}
}

@include btn(primary,$primary,$white);
@include btn(secondary,$secondary,$gray-500);
@include btn(success,$success,$white);
@include btn(info,$info,$white);
@include btn(warning,$warning,$white);
@include btn(danger,$danger,$white);
@include btn(dark,$dark,$white);
@include btn(light,$light,$white);
@include btn(primary, $primary, $white);
@include btn(secondary, $secondary, $gray-500);
@include btn(success, $success, $white);
@include btn(info, $info, $white);
@include btn(warning, $warning, $white);
@include btn(danger, $danger, $white);
@include btn(dark, $dark, $white);
@include btn(light, $light, $white);

.btn {
text-transform: uppercase;
Expand Down
2 changes: 2 additions & 0 deletions dist/simplex/_bootswatch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
$web-font-path: "https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap" !default;
@import url($web-font-path);

// Mixins ======================================================================

@mixin btn-shadow($color){
@include gradient-y-three-colors(lighten($color, 3%), $color, 6%, darken($color, 3%));
filter: none;
Expand Down
2 changes: 1 addition & 1 deletion dist/slate/_bootswatch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Bootswatch


// Variables ===================================================================
// Mixins ======================================================================

@mixin btn-shadow($color){
@include gradient-y-three-colors(lighten($color, 6%), $color, 60%, darken($color, 4%));
Expand Down
2 changes: 2 additions & 0 deletions dist/spacelab/_bootswatch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
$web-font-path: "https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap" !default;
@import url($web-font-path);

// Mixins ======================================================================

@mixin btn-shadow($color){
@include gradient-y-three-colors(lighten($color, 15%), $color, 50%, darken($color, 4%));
filter: none;
Expand Down

0 comments on commit 3ab266c

Please sign in to comment.