mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-11 04:07:55 +03:00
reuse top calculation to find vertical center
This commit is contained in:
parent
e04df20616
commit
cd91af205e
|
@ -5,7 +5,7 @@ label.radio-inline {
|
|||
|
||||
span {
|
||||
position: absolute;
|
||||
top: (($line-height * $font-size-base) - $mdb-radio-size) / 2; // vertical center of line-height
|
||||
top: calc-top($line-height, $font-size-base, $mdb-radio-size); // vertical center of line-height
|
||||
left: 0;
|
||||
display: inline-block;
|
||||
width: $mdb-radio-size;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
.mdb-switch-track {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
top: calc-top($line-height, $font-size-base, $mdb-switch-height);
|
||||
left: 0;
|
||||
display: inline-block;
|
||||
width: $mdb-switch-width;
|
||||
|
|
|
@ -147,7 +147,8 @@
|
|||
.radio label,
|
||||
label.radio-inline,
|
||||
.checkbox label,
|
||||
label.checkbox-inline {
|
||||
label.checkbox-inline,
|
||||
.switch label {
|
||||
line-height: $line-height; // keep the same line height for radios and checkboxes
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
// This file is here to emulate the less #contrast function
|
||||
@function calc-top($line-height, $font-size, $component-height) {
|
||||
@return (($line-height * $font-size) - $component-height) / 2; // vertical center of line-height
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Emulate the less #contrast function
|
||||
// TODO: this may be useful for the inverse theme, but if not, remove (it is unused after the removal of fullpalette)
|
||||
|
||||
// contrast-color and brightness borrowed from compass
|
||||
// Copyright (c) 2009-2014 Christopher M. Eppstein
|
||||
// Complies with license: https://github.com/Compass/compass/blob/stable/LICENSE.markdown
|
||||
|
|
Loading…
Reference in New Issue
Block a user