mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2025-02-21 14:10:39 +03:00
Fix base-level &
.
Fix is according to sass/sass#1873. Signed-off-by: JP-Ellis <josh@jpellis.me>
This commit is contained in:
parent
b4fb7e4056
commit
f729cf1fa1
|
@ -10,16 +10,16 @@
|
||||||
border-color: $focus-border;
|
border-color: $focus-border;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:focus,
|
#{if(&, "&", "*")}:focus,
|
||||||
&.focus {
|
#{if(&, "&", "*")}.focus {
|
||||||
color: $color;
|
color: $color;
|
||||||
background-color: $focus-background;
|
background-color: $focus-background;
|
||||||
border-color: $focus-border;
|
border-color: $focus-border;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:active,
|
#{if(&, "&", "*")}:active,
|
||||||
&.active,
|
#{if(&, "&", "*")}.active,
|
||||||
.open > &.dropdown-toggle {
|
.open > #{if(&, "&", "*")}.dropdown-toggle {
|
||||||
color: $color;
|
color: $color;
|
||||||
background-color: $focus-background;
|
background-color: $focus-background;
|
||||||
border-color: $focus-border;
|
border-color: $focus-border;
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// when it is an icon, kill the active bg on open dropdown, but stabilize on hover
|
// when it is an icon, kill the active bg on open dropdown, but stabilize on hover
|
||||||
.open > &.dropdown-toggle.bmd-btn-icon {
|
.open > #{if(&, "&", "*")}.dropdown-toggle.bmd-btn-icon {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
background-color: $background;
|
background-color: $background;
|
||||||
|
|
||||||
|
@ -44,8 +44,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.disabled,
|
#{if(&, "&", "*")}.disabled,
|
||||||
&:disabled {
|
#{if(&, "&", "*")}:disabled {
|
||||||
&:focus,
|
&:focus,
|
||||||
&.focus {
|
&.focus {
|
||||||
background-color: $background;
|
background-color: $background;
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
$active-border);
|
$active-border);
|
||||||
|
|
||||||
// inverse color scheme
|
// inverse color scheme
|
||||||
.bg-inverse & {
|
.bg-inverse #{if(&, "&", "*")} {
|
||||||
$focus-background: $mdb-inverse-btn-focus-bg;
|
$focus-background: $mdb-inverse-btn-focus-bg;
|
||||||
$focus-border: $mdb-inverse-btn-focus-bg;
|
$focus-border: $mdb-inverse-btn-focus-bg;
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// reverse the above for links
|
// reverse the above for links
|
||||||
&.btn-link {
|
#{if(&, "&", "*")}.btn-link {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -105,22 +105,22 @@
|
||||||
@include bmd-flat-button-variant($mdb-btn-color);
|
@include bmd-flat-button-variant($mdb-btn-color);
|
||||||
|
|
||||||
// flat bg with text color variations
|
// flat bg with text color variations
|
||||||
&.btn-primary {
|
#{if(&, "&", "*")}.btn-primary {
|
||||||
@include bmd-flat-button-variant($btn-primary-bg);
|
@include bmd-flat-button-variant($btn-primary-bg);
|
||||||
}
|
}
|
||||||
&.btn-secondary {
|
#{if(&, "&", "*")}.btn-secondary {
|
||||||
@include bmd-flat-button-variant($btn-secondary-color);
|
@include bmd-flat-button-variant($btn-secondary-color);
|
||||||
}
|
}
|
||||||
&.btn-info {
|
#{if(&, "&", "*")}.btn-info {
|
||||||
@include bmd-flat-button-variant($btn-info-bg);
|
@include bmd-flat-button-variant($btn-info-bg);
|
||||||
}
|
}
|
||||||
&.btn-success {
|
#{if(&, "&", "*")}.btn-success {
|
||||||
@include bmd-flat-button-variant($btn-success-bg);
|
@include bmd-flat-button-variant($btn-success-bg);
|
||||||
}
|
}
|
||||||
&.btn-warning {
|
#{if(&, "&", "*")}.btn-warning {
|
||||||
@include bmd-flat-button-variant($btn-warning-bg);
|
@include bmd-flat-button-variant($btn-warning-bg);
|
||||||
}
|
}
|
||||||
&.btn-danger {
|
#{if(&, "&", "*")}.btn-danger {
|
||||||
@include bmd-flat-button-variant($btn-danger-bg);
|
@include bmd-flat-button-variant($btn-danger-bg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -147,31 +147,31 @@
|
||||||
|
|
||||||
@mixin bmd-raised-button-color() {
|
@mixin bmd-raised-button-color() {
|
||||||
|
|
||||||
&.btn-primary {
|
#{if(&, "&", "*")}.btn-primary {
|
||||||
@include bmd-raised-button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border);
|
@include bmd-raised-button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border);
|
||||||
}
|
}
|
||||||
&.btn-secondary {
|
#{if(&, "&", "*")}.btn-secondary {
|
||||||
@include bmd-raised-button-variant($btn-secondary-color, $btn-secondary-bg, $btn-secondary-border);
|
@include bmd-raised-button-variant($btn-secondary-color, $btn-secondary-bg, $btn-secondary-border);
|
||||||
}
|
}
|
||||||
&.btn-info {
|
#{if(&, "&", "*")}.btn-info {
|
||||||
@include bmd-raised-button-variant($btn-info-color, $btn-info-bg, $btn-info-border);
|
@include bmd-raised-button-variant($btn-info-color, $btn-info-bg, $btn-info-border);
|
||||||
}
|
}
|
||||||
&.btn-success {
|
#{if(&, "&", "*")}.btn-success {
|
||||||
@include bmd-raised-button-variant($btn-success-color, $btn-success-bg, $btn-success-border);
|
@include bmd-raised-button-variant($btn-success-color, $btn-success-bg, $btn-success-border);
|
||||||
}
|
}
|
||||||
&.btn-warning {
|
#{if(&, "&", "*")}.btn-warning {
|
||||||
@include bmd-raised-button-variant($btn-warning-color, $btn-warning-bg, $btn-warning-border);
|
@include bmd-raised-button-variant($btn-warning-color, $btn-warning-bg, $btn-warning-border);
|
||||||
}
|
}
|
||||||
&.btn-danger {
|
#{if(&, "&", "*")}.btn-danger {
|
||||||
@include bmd-raised-button-variant($btn-danger-color, $btn-danger-bg, $btn-danger-border);
|
@include bmd-raised-button-variant($btn-danger-color, $btn-danger-bg, $btn-danger-border);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin undo-bs-tab-focus() {
|
@mixin undo-bs-tab-focus() {
|
||||||
// clear out the tab-focus() from BS
|
// clear out the tab-focus() from BS
|
||||||
&,
|
#{if(&, "&", "*")},
|
||||||
&:active,
|
#{if(&, "&", "*")}:active,
|
||||||
&.active {
|
#{if(&, "&", "*")}.active {
|
||||||
&:focus,
|
&:focus,
|
||||||
&.focus {
|
&.focus {
|
||||||
//@include tab-focus();
|
//@include tab-focus();
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
@mixin bmd-drawer-x-out($size) {
|
@mixin bmd-drawer-x-out($size) {
|
||||||
@each $side, $abbrev in (left: l, right: r) {
|
@each $side, $abbrev in (left: l, right: r) {
|
||||||
&.bmd-drawer-f-#{$abbrev} {
|
#{if(&, "&", "*")}.bmd-drawer-f-#{$abbrev} {
|
||||||
> .bmd-layout-drawer {
|
> .bmd-layout-drawer {
|
||||||
// position
|
// position
|
||||||
top: 0;
|
top: 0;
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
@mixin bmd-drawer-y-out($size) {
|
@mixin bmd-drawer-y-out($size) {
|
||||||
@each $side, $abbrev in (top: t, bottom: b) {
|
@each $side, $abbrev in (top: t, bottom: b) {
|
||||||
&.bmd-drawer-f-#{$abbrev} {
|
#{if(&, "&", "*")}.bmd-drawer-f-#{$abbrev} {
|
||||||
> .bmd-layout-drawer {
|
> .bmd-layout-drawer {
|
||||||
// position
|
// position
|
||||||
#{$side}: 0;
|
#{$side}: 0;
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
|
|
||||||
@mixin bmd-drawer-x-in($size) {
|
@mixin bmd-drawer-x-in($size) {
|
||||||
@each $side, $abbrev in (left: l, right: r) {
|
@each $side, $abbrev in (left: l, right: r) {
|
||||||
&.bmd-drawer-f-#{$abbrev} {
|
#{if(&, "&", "*")}.bmd-drawer-f-#{$abbrev} {
|
||||||
// Push - drawer will push the header and content (default behavior)
|
// Push - drawer will push the header and content (default behavior)
|
||||||
> .bmd-layout-header {
|
> .bmd-layout-header {
|
||||||
width: calc(100% - #{$size});
|
width: calc(100% - #{$size});
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
|
|
||||||
@mixin bmd-drawer-y-in($size) {
|
@mixin bmd-drawer-y-in($size) {
|
||||||
@each $side, $abbrev in (top: t, bottom: b) {
|
@each $side, $abbrev in (top: t, bottom: b) {
|
||||||
&.bmd-drawer-f-#{$abbrev} {
|
#{if(&, "&", "*")}.bmd-drawer-f-#{$abbrev} {
|
||||||
|
|
||||||
// 1. Push - drawer will push the header or content
|
// 1. Push - drawer will push the header or content
|
||||||
> .bmd-layout-header {
|
> .bmd-layout-header {
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
// e.g. &, &-sm, &-md, &-lg
|
// e.g. &, &-sm, &-md, &-lg
|
||||||
$name: bmd-drawer-breakpoint-name($breakpoint, "-up");
|
$name: bmd-drawer-breakpoint-name($breakpoint, "-up");
|
||||||
|
|
||||||
&.bmd-drawer-in {
|
#{if(&, "&", "*")}.bmd-drawer-in {
|
||||||
#{unquote($name)} { // bmd-drawer-in, bmd-drawer-in-sm, bmd-drawer-in-md, bmd-drawer-in-lg
|
#{unquote($name)} { // bmd-drawer-in, bmd-drawer-in-sm, bmd-drawer-in-md, bmd-drawer-in-lg
|
||||||
|
|
||||||
@if $breakpoint == xs {
|
@if $breakpoint == xs {
|
||||||
|
@ -132,7 +132,7 @@
|
||||||
// e.g. &, &-sm, &-md, &-lg
|
// e.g. &, &-sm, &-md, &-lg
|
||||||
$name: bmd-drawer-breakpoint-name($breakpoint, "-up");
|
$name: bmd-drawer-breakpoint-name($breakpoint, "-up");
|
||||||
|
|
||||||
&.bmd-drawer-in {
|
#{if(&, "&", "*")}.bmd-drawer-in {
|
||||||
#{unquote($name)} { // bmd-drawer-in, bmd-drawer-in-sm, bmd-drawer-in-md, bmd-drawer-in-lg
|
#{unquote($name)} { // bmd-drawer-in, bmd-drawer-in-sm, bmd-drawer-in-md, bmd-drawer-in-lg
|
||||||
|
|
||||||
@if $breakpoint == xs {
|
@if $breakpoint == xs {
|
||||||
|
@ -154,7 +154,7 @@
|
||||||
@include bmd-layout-backdrop-in();
|
@include bmd-layout-backdrop-in();
|
||||||
|
|
||||||
@each $side, $abbrev in (left: l, right: r) {
|
@each $side, $abbrev in (left: l, right: r) {
|
||||||
&.bmd-drawer-f-#{$abbrev} {
|
#{if(&, "&", "*")}.bmd-drawer-f-#{$abbrev} {
|
||||||
> .bmd-layout-header,
|
> .bmd-layout-header,
|
||||||
> .bmd-layout-content {
|
> .bmd-layout-content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -168,7 +168,7 @@
|
||||||
@include bmd-layout-backdrop-in();
|
@include bmd-layout-backdrop-in();
|
||||||
|
|
||||||
@each $side, $abbrev in (top: t, bottom: b) {
|
@each $side, $abbrev in (top: t, bottom: b) {
|
||||||
&.bmd-drawer-f-#{$abbrev} {
|
#{if(&, "&", "*")}.bmd-drawer-f-#{$abbrev} {
|
||||||
> .bmd-layout-header {
|
> .bmd-layout-header {
|
||||||
@if $side == top { // only add margin-top on a header when the drawer is at the top
|
@if $side == top { // only add margin-top on a header when the drawer is at the top
|
||||||
margin-#{$side}: 0;
|
margin-#{$side}: 0;
|
||||||
|
@ -189,7 +189,7 @@
|
||||||
// e.g. &, &-sm, &-md, &-lg
|
// e.g. &, &-sm, &-md, &-lg
|
||||||
$name: bmd-drawer-breakpoint-name($breakpoint, "-down");
|
$name: bmd-drawer-breakpoint-name($breakpoint, "-down");
|
||||||
|
|
||||||
&.bmd-drawer-overlay {
|
#{if(&, "&", "*")}.bmd-drawer-overlay {
|
||||||
#{unquote($name)} { // bmd-drawer-overlay, bmd-drawer-overlay-sm, bmd-drawer-overlay-md, bmd-drawer-overlay-lg
|
#{unquote($name)} { // bmd-drawer-overlay, bmd-drawer-overlay-sm, bmd-drawer-overlay-md, bmd-drawer-overlay-lg
|
||||||
|
|
||||||
// x - left/right
|
// x - left/right
|
||||||
|
@ -215,7 +215,7 @@
|
||||||
// e.g. &, &-sm, &-md, &-lg
|
// e.g. &, &-sm, &-md, &-lg
|
||||||
$name: bmd-drawer-breakpoint-name($breakpoint, "-down");
|
$name: bmd-drawer-breakpoint-name($breakpoint, "-down");
|
||||||
|
|
||||||
&.bmd-drawer-overlay {
|
#{if(&, "&", "*")}.bmd-drawer-overlay {
|
||||||
#{unquote($name)} { // bmd-drawer-overlay, bmd-drawer-overlay-sm, bmd-drawer-overlay-md, bmd-drawer-overlay-lg
|
#{unquote($name)} { // bmd-drawer-overlay, bmd-drawer-overlay-sm, bmd-drawer-overlay-md, bmd-drawer-overlay-lg
|
||||||
//// y - top/bottom
|
//// y - top/bottom
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
@mixin bmd-disabled() {
|
@mixin bmd-disabled() {
|
||||||
fieldset[disabled][disabled] &,
|
fieldset[disabled][disabled] #{if(&, "&", "*")},
|
||||||
&.disabled,
|
#{if(&, "&", "*")}.disabled,
|
||||||
&:disabled,
|
#{if(&, "&", "*")}:disabled,
|
||||||
&[disabled] {
|
#{if(&, "&", "*")}[disabled] {
|
||||||
@content
|
@content
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.is-focused, // may or may not be a form-group or bmd-form-group
|
.is-focused, // may or may not be a form-group or bmd-form-group
|
||||||
&.is-focused {
|
#{if(&, "&", "*")}.is-focused {
|
||||||
// on focus set borders and labels to the validation color
|
// on focus set borders and labels to the validation color
|
||||||
|
|
||||||
// Use the BS provided mixin for the bulk of the color
|
// Use the BS provided mixin for the bulk of the color
|
||||||
|
@ -218,9 +218,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// floating focused/filled will look like static
|
// floating focused/filled will look like static
|
||||||
&.is-focused,
|
#{if(&, "&", "*")}.is-focused,
|
||||||
.is-focused,
|
.is-focused,
|
||||||
&.is-filled,
|
#{if(&, "&", "*")}.is-filled,
|
||||||
.is-filled {
|
.is-filled {
|
||||||
.bmd-label-floating {
|
.bmd-label-floating {
|
||||||
@include bmd-label-static($label-static-top, $static-font-size);
|
@include bmd-label-static($label-static-top, $static-font-size);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
@mixin bmd-hover-focus-active {
|
@mixin bmd-hover-focus-active {
|
||||||
// add the .active to the whole mix of hover-focus-active
|
// add the .active to the whole mix of hover-focus-active
|
||||||
&.active {
|
#{if(&, "&", "*")}.active {
|
||||||
@content
|
@content
|
||||||
}
|
}
|
||||||
@include hover-focus-active() {
|
@include hover-focus-active() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user