2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-17 19:21:23 +03:00

Switch up some split button stuff

- New vars
- New function for stripping units so we can combine rems and ems in math functions
- Add new classes for sizing and spacing around the split dropdown toggle so that the caret isn't misaligned
This commit is contained in:
Mark Otto
2016-01-08 13:23:24 -08:00
parent 3740d8f2ac
commit f6ad665c26
6 changed files with 75 additions and 22 deletions
+17
View File
@@ -0,0 +1,17 @@
//
// Functions
//
// Remove the unit of a length
// Source: https://css-tricks.com/snippets/sass/strip-unit-function/
//
// @param {Number} $number - Number to remove unit from
// @return {Number} - Unitless number
@function strip-unit($number) {
@if type-of($number) == 'number' and not unitless($number) {
@return $number / ($number * 0 + 1);
}
@return $number;
}