mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2025-02-02 21:04:13 +03:00
- fixed toggle focus label colors so they were not distracting
- fixed select osx styling
This commit is contained in:
parent
1f8874a1d3
commit
6ce94151bd
|
@ -4,9 +4,10 @@ label.checkbox-inline,
|
||||||
.checkbox label,
|
.checkbox label,
|
||||||
.checkbox-inline label {
|
.checkbox-inline label {
|
||||||
padding-left: 0; // Reset for Bootstrap rule
|
padding-left: 0; // Reset for Bootstrap rule
|
||||||
color: $mdb-checkbox-label-color;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
@include mdb-label-color-toggle-focus();
|
||||||
|
|
||||||
// Hide native checkbox
|
// Hide native checkbox
|
||||||
input[type=checkbox] {
|
input[type=checkbox] {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
@ -1,9 +1,3 @@
|
||||||
// label variations
|
|
||||||
.label {
|
|
||||||
border-radius: $border-radius-small;
|
|
||||||
//@include variations(unquote(""), background-color, $grey);
|
|
||||||
}
|
|
||||||
|
|
||||||
// must be broken out for reuse - webkit selector breaks firefox
|
// must be broken out for reuse - webkit selector breaks firefox
|
||||||
@mixin label-static($label-top, $static-font-size, $static-line-height) {
|
@mixin label-static($label-top, $static-font-size, $static-line-height) {
|
||||||
label.control-label {
|
label.control-label {
|
||||||
|
@ -20,7 +14,6 @@
|
||||||
// @include material-placeholder {
|
// @include material-placeholder {
|
||||||
// font-size: $placeholder-font-size;
|
// font-size: $placeholder-font-size;
|
||||||
// line-height: $line-height;
|
// line-height: $line-height;
|
||||||
// color: $mdb-input-placeholder-color;
|
|
||||||
// font-weight: 400;
|
// font-weight: 400;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
|
@ -35,7 +28,6 @@
|
||||||
label {
|
label {
|
||||||
//font-size: $placeholder-font-size;
|
//font-size: $placeholder-font-size;
|
||||||
//line-height: $line-height;
|
//line-height: $line-height;
|
||||||
//color: $mdb-input-placeholder-color;
|
|
||||||
//font-weight: 400;
|
//font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,8 +35,6 @@
|
||||||
label.control-label {
|
label.control-label {
|
||||||
//font-size: $static-font-size;
|
//font-size: $static-font-size;
|
||||||
//line-height: $static-line-height;
|
//line-height: $static-line-height;
|
||||||
//color: $mdb-input-placeholder-color;
|
|
||||||
//font-weight: 400;
|
|
||||||
//margin: 16px 0 0 0; // std and lg
|
//margin: 16px 0 0 0; // std and lg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -264,21 +254,22 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.help-block {
|
//.help-block {
|
||||||
// display: block;
|
// display: block;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
textarea {
|
//textarea {
|
||||||
// resize: none;
|
// resize: none;
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
select {
|
||||||
//appearance: none; // Fix for OS X
|
&,
|
||||||
|
&.form-control {
|
||||||
~ .mdb-form-control-decorator::after {
|
// Use vendor prefixes as `appearance` isn't part of the CSS spec. OSX doesn't obey the border-radius: 0 without this.
|
||||||
//display: none;
|
-moz-appearance: none;
|
||||||
}
|
-webkit-appearance: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,23 +285,6 @@
|
||||||
// lg floating size/location
|
// lg floating size/location
|
||||||
@include mdb-form-group-size-variant(unquote(".mdb-form-group.mdb-form-group-lg"), $font-size-lg, $mdb-label-top-margin-lg, $mdb-input-padding-y-lg, $line-height-lg, $mdb-label-as-placeholder-shim-lg);
|
@include mdb-form-group-size-variant(unquote(".mdb-form-group.mdb-form-group-lg"), $font-size-lg, $mdb-label-top-margin-lg, $mdb-input-padding-y-lg, $line-height-lg, $mdb-label-as-placeholder-shim-lg);
|
||||||
|
|
||||||
select.form-control {
|
|
||||||
//border: 0;
|
|
||||||
//box-shadow: none;
|
|
||||||
//border-radius: 0;
|
|
||||||
|
|
||||||
.mdb-form-group.is-focused & {
|
|
||||||
//box-shadow: none;
|
|
||||||
//border-color: $mdb-input-underline-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
&[multiple] {
|
|
||||||
&,
|
|
||||||
.mdb-form-group.is-focused & {
|
|
||||||
//height: 85px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Input files - hide actual input - requires specific markup in the sample.
|
// Input files - hide actual input - requires specific markup in the sample.
|
||||||
//.mdb-form-group input[type=file] {
|
//.mdb-form-group input[type=file] {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@import "mixins/utilities";
|
@import "mixins/utilities";
|
||||||
@import "mixins/shadows";
|
@import "mixins/shadows";
|
||||||
@import "mixins/variations";
|
@import "mixins/variations";
|
||||||
@import "mixins/inputs";
|
@import "mixins/forms";
|
||||||
|
|
|
@ -19,7 +19,9 @@ label.radio-inline,
|
||||||
.radio-inline label {
|
.radio-inline label {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-left: 45px;
|
padding-left: 45px;
|
||||||
color: $mdb-radio-label-color;
|
|
||||||
|
@include mdb-label-color-toggle-focus();
|
||||||
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
label {
|
label {
|
||||||
color: $mdb-switch-label-color;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@include mdb-label-color-toggle-focus();
|
||||||
|
|
||||||
// Hide original checkbox
|
// Hide original checkbox
|
||||||
input[type=checkbox] {
|
input[type=checkbox] {
|
||||||
|
|
|
@ -46,7 +46,9 @@ $contrast-factor: 40% !default;
|
||||||
// inputs
|
// inputs
|
||||||
//$mdb-input-placeholder-color: #BDBDBD !default;
|
//$mdb-input-placeholder-color: #BDBDBD !default;
|
||||||
|
|
||||||
$mdb-label-color: rgba($black, 0.26) !default; // synced
|
$mdb-label-color: rgba($black, 0.26) !default;
|
||||||
|
$mdb-label-color-toggle-focus: rgba($black, .54) !default;
|
||||||
|
|
||||||
|
|
||||||
//$mdb-input-underline-color: #d2d2d2 !default;
|
//$mdb-input-underline-color: #d2d2d2 !default;
|
||||||
$mdb-label-static-size-ratio: 75 / 100 !default;
|
$mdb-label-static-size-ratio: 75 / 100 !default;
|
||||||
|
@ -79,9 +81,8 @@ $background-disabled: #eaeaea !default;
|
||||||
$mdb-checkbox-size: 20px !default;
|
$mdb-checkbox-size: 20px !default;
|
||||||
$mdb-checkbox-animation-ripple: 500ms !default;
|
$mdb-checkbox-animation-ripple: 500ms !default;
|
||||||
$mdb-checkbox-animation-check: 0.3s !default;
|
$mdb-checkbox-animation-check: 0.3s !default;
|
||||||
$mdb-checkbox-checked-color: #4caf50 !default;
|
$mdb-checkbox-checked-color: $brand-primary; // #4caf50 !default;
|
||||||
$mdb-checkbox-label-color: rgba($black, .54) !default;
|
$mdb-checkbox-border-color: $mdb-label-color-toggle-focus !default;
|
||||||
$mdb-checkbox-border-color: $mdb-checkbox-label-color !default;
|
|
||||||
|
|
||||||
// Popovers and Popups
|
// Popovers and Popups
|
||||||
$mdb-popover-background: rgba(101, 101, 101, 0.9) !default;
|
$mdb-popover-background: rgba(101, 101, 101, 0.9) !default;
|
||||||
|
@ -90,12 +91,8 @@ $mdb-popover-color: #ececec !default;
|
||||||
// Dropdown Menu
|
// Dropdown Menu
|
||||||
$mdb-dropdown-font-size: 16px !default;
|
$mdb-dropdown-font-size: 16px !default;
|
||||||
|
|
||||||
// Toggle
|
|
||||||
$mdb-switch-label-color: $mdb-checkbox-label-color !default;
|
|
||||||
|
|
||||||
// Radio:
|
// Radio:
|
||||||
$mdb-radio-label-color: $mdb-checkbox-label-color !default;
|
$mdb-radio-color-off: $mdb-label-color-toggle-focus !default;
|
||||||
$mdb-radio-color-off: $mdb-checkbox-border-color !default;
|
|
||||||
$mdb-radio-color-on: $brand-primary !default;
|
$mdb-radio-color-on: $brand-primary !default;
|
||||||
|
|
||||||
// Buttons:
|
// Buttons:
|
||||||
|
|
25
scss/mixins/_forms.scss
Normal file
25
scss/mixins/_forms.scss
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
@mixin mdb-label-color-toggle-focus() {
|
||||||
|
// override bootstrap focus and keep all the standard color (could be multiple radios in the form group)
|
||||||
|
.mdb-form-group.is-focused & {
|
||||||
|
color: $mdb-label-color;
|
||||||
|
|
||||||
|
// on focus just darken the specific labels, do not turn them to the brand-primary
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
color: $mdb-label-color-toggle-focus;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//// Placeholder text
|
||||||
|
//@mixin material-placeholder() {
|
||||||
|
// &::placeholder {
|
||||||
|
// @content;
|
||||||
|
// }
|
||||||
|
// // Firefox
|
||||||
|
// //&::-moz-placeholder {@content; } // Firefox
|
||||||
|
// //&:-ms-input-placeholder {@content; } // Internet Explorer 10+
|
||||||
|
// //&::-webkit-input-placeholder {@content; } // Safari and Chrome
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
// Placeholder text
|
|
||||||
@mixin material-placeholder() {
|
|
||||||
&::placeholder {
|
|
||||||
@content;
|
|
||||||
}
|
|
||||||
// Firefox
|
|
||||||
//&::-moz-placeholder {@content; } // Firefox
|
|
||||||
//&:-ms-input-placeholder {@content; } // Internet Explorer 10+
|
|
||||||
//&::-webkit-input-placeholder {@content; } // Safari and Chrome
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user