first commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
/* ------------------------------------------------------------------------------
|
||||
*
|
||||
* # Background mixin
|
||||
*
|
||||
* Override and extend default background mixin.
|
||||
*
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
// Contextual backgrounds
|
||||
@mixin bg-variant($parent, $color) {
|
||||
#{$parent} {
|
||||
background-color: $color !important;
|
||||
}
|
||||
}
|
||||
|
||||
// Gradient
|
||||
@mixin bg-gradient-variant($parent, $color) {
|
||||
#{$parent} {
|
||||
background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
/* ------------------------------------------------------------------------------
|
||||
*
|
||||
* # Badge mixin
|
||||
*
|
||||
* Override and extend default badge mixin.
|
||||
*
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
@mixin badge-variant($bg) {
|
||||
color: color-yiq($bg);
|
||||
background-color: $bg;
|
||||
|
||||
@at-root a#{&} {
|
||||
@include hover-focus {
|
||||
color: color-yiq($bg);
|
||||
text-decoration: none;
|
||||
|
||||
&:not(.badge-light) {
|
||||
box-shadow: $btn-dark-hover-box-shadow;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
/* ------------------------------------------------------------------------------
|
||||
*
|
||||
* # Buttons mixin
|
||||
*
|
||||
* Override and extend default buttons mixin.
|
||||
*
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
// Button variants
|
||||
//
|
||||
// Easily pump out default styles, as well as :hover, :focus, :active,
|
||||
// and disabled options for all buttons
|
||||
|
||||
// Primary buttons
|
||||
@mixin button-variant($background, $border, $hover-background: $background, $hover-border: $border, $active-background: $background, $active-border: $border) {
|
||||
color: color-yiq($background);
|
||||
@include gradient-bg($background);
|
||||
|
||||
@include hover {
|
||||
color: color-yiq($hover-background);
|
||||
@include gradient-bg($hover-background);
|
||||
}
|
||||
|
||||
&:not([disabled]):not(.disabled):active,
|
||||
&:not([disabled]):not(.disabled).active,
|
||||
.show > &.dropdown-toggle {
|
||||
@if $enable-gradients {
|
||||
background-image: none; // Remove the gradient for the pressed/active state
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Outline button
|
||||
@mixin button-outline-variant($color, $color-hover: #fff) {
|
||||
color: $color;
|
||||
background-color: transparent;
|
||||
background-image: none;
|
||||
border-color: $color;
|
||||
|
||||
@include hover {
|
||||
color: $color-hover;
|
||||
background-color: $color;
|
||||
border-color: $color;
|
||||
}
|
||||
|
||||
&.disabled,
|
||||
&:disabled {
|
||||
color: $color;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
&:not([disabled]):not(.disabled):active,
|
||||
&:not([disabled]):not(.disabled).active,
|
||||
.show > &.dropdown-toggle {
|
||||
color: $color-hover;
|
||||
background-color: $color;
|
||||
border-color: $color;
|
||||
}
|
||||
}
|
||||
|
||||
// Button sizes
|
||||
@mixin button-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
|
||||
padding: $padding-y $padding-x;
|
||||
font-size: $font-size;
|
||||
line-height: $line-height;
|
||||
@include border-radius($border-radius, 0);
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
/* ------------------------------------------------------------------------------
|
||||
*
|
||||
* # Caret mixin
|
||||
*
|
||||
* Override and extend default cared mixin.
|
||||
*
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
@mixin caret-down {
|
||||
content: $icon-caret-down;
|
||||
}
|
||||
|
||||
@mixin caret-up {
|
||||
content: $icon-caret-up;
|
||||
}
|
||||
|
||||
@mixin caret-right {
|
||||
content: $icon-caret-right;
|
||||
}
|
||||
|
||||
@mixin caret-left {
|
||||
content: $icon-caret-left;
|
||||
}
|
||||
|
||||
@mixin caret($caret-direction: down) {
|
||||
@if $enable-caret {
|
||||
&::after {
|
||||
font-family: $icon-font-family;
|
||||
display: inline-block;
|
||||
border: 0;
|
||||
vertical-align: $caret-vertical-align;
|
||||
font-size: $caret-font-size;
|
||||
margin-left: $caret-spacing;
|
||||
line-height: 1;
|
||||
position: relative;
|
||||
@if $caret-direction == down {
|
||||
@include caret-down;
|
||||
} @else if $caret-direction == up {
|
||||
@include caret-up;
|
||||
} @else if $caret-direction == right {
|
||||
@include caret-right;
|
||||
}
|
||||
}
|
||||
|
||||
@if $caret-direction == left {
|
||||
&::after {
|
||||
content: none;
|
||||
}
|
||||
|
||||
&::before {
|
||||
font-family: $icon-font-family;
|
||||
display: inline-block;
|
||||
border: 0;
|
||||
font-size: $caret-font-size;
|
||||
margin-right: ($element-spacer-x * .75);
|
||||
line-height: 1;
|
||||
position: relative;
|
||||
@include caret-left;
|
||||
}
|
||||
}
|
||||
|
||||
&:empty::after {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
/* ------------------------------------------------------------------------------
|
||||
*
|
||||
* # Forms mixin
|
||||
*
|
||||
* Override and extend default forms mixin.
|
||||
*
|
||||
* ---------------------------------------------------------------------------- */
|
||||
|
||||
// Form control focus state
|
||||
@mixin form-control-focus() {
|
||||
&:focus {
|
||||
outline: 0;
|
||||
@if $enable-shadows {
|
||||
box-shadow: $input-box-shadow, $input-focus-box-shadow;
|
||||
} @else {
|
||||
box-shadow: $input-focus-box-shadow;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.border-1):not(.border-2):not(.border-3):focus {
|
||||
border-color: $input-focus-border-color;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user