mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-29 04:54:12 +03:00
sass conversion cleanup/removal of commented code
This commit is contained in:
parent
23b0750905
commit
77b731f78c
|
@ -16,10 +16,11 @@
|
|||
));
|
||||
|
||||
// FIXME: these colors are defined in _colors.scss. Since there is no way to access a variable as a string
|
||||
// FIXME: in sass, this needs to be changed to get a permutation as an actual variable.
|
||||
// FIXME: in sass, this needs to be changed to get a permutation as an actual variable object.
|
||||
// FIXME: http://krasimirtsonev.com/blog/article/SASS-interpolation-in-a-name-of-variable-nest-variables-within-variables
|
||||
|
||||
// FIXME: this shows a valid approach and adds a color function: https://github.com/darrenkopp/libsass-net/issues/12
|
||||
// FIXME: The following shows a valid approach and adds a color lookup function from a map, but would require changes in the less files:
|
||||
// FIXME: https://github.com/darrenkopp/libsass-net/issues/12
|
||||
@include generic-variations-color($args-variation-color)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,33 +1,6 @@
|
|||
// This file is NOT automatically converted and must be manually merged
|
||||
|
||||
// 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
|
||||
@function contrast-color($color, $dark: $contrasted-dark-default, $light: $contrasted-light-default, $threshold: null) {
|
||||
@if $threshold {
|
||||
// Deprecated in Compass 0.13
|
||||
@warn "The $threshold argment to contrast-color is no longer needed and will be removed in the next release.";
|
||||
}
|
||||
@if $color == null {
|
||||
@return null;
|
||||
}
|
||||
@else {
|
||||
$color-brightness: brightness($color);
|
||||
$dark-text-brightness: brightness($dark);
|
||||
$light-text-brightness: brightness($light);
|
||||
@return if(abs($color-brightness - $light-text-brightness) > abs($color-brightness - $dark-text-brightness), $light, $dark);
|
||||
}
|
||||
}
|
||||
|
||||
@function brightness($color) {
|
||||
@if type-of($color) == color {
|
||||
@return (red($color) * 0.299 + green($color) * 0.587 + blue($color) * 0.114) / 255 * 100%;
|
||||
}
|
||||
@else {
|
||||
@return unquote("brightness(#{$color})");
|
||||
}
|
||||
}
|
||||
|
||||
@import "mixins-utilities";
|
||||
|
||||
// variations(unquote(""), background-color, #FFF);
|
||||
@mixin variations($extra, $material-param-1, $default) {
|
||||
|
|
29
sass/_mixins-utilities.scss
Normal file
29
sass/_mixins-utilities.scss
Normal file
|
@ -0,0 +1,29 @@
|
|||
// This file is here to emulate the less #contrast function
|
||||
|
||||
// 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
|
||||
@function contrast-color($color, $dark: $contrasted-dark-default, $light: $contrasted-light-default, $threshold: null) {
|
||||
@if $threshold {
|
||||
// Deprecated in Compass 0.13
|
||||
@warn "The $threshold argment to contrast-color is no longer needed and will be removed in the next release.";
|
||||
}
|
||||
@if $color == null {
|
||||
@return null;
|
||||
}
|
||||
@else {
|
||||
$color-brightness: brightness($color);
|
||||
$dark-text-brightness: brightness($dark);
|
||||
$light-text-brightness: brightness($light);
|
||||
@return if(abs($color-brightness - $light-text-brightness) > abs($color-brightness - $dark-text-brightness), $light, $dark);
|
||||
}
|
||||
}
|
||||
|
||||
@function brightness($color) {
|
||||
@if type-of($color) == color {
|
||||
@return (red($color) * 0.299 + green($color) * 0.587 + blue($color) * 0.114) / 255 * 100%;
|
||||
}
|
||||
@else {
|
||||
@return unquote("brightness(#{$color})");
|
||||
}
|
||||
}
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
@mixin generic-variations-colors($args) {
|
||||
|
||||
//$material-color-names: $red $pink $purple $deep-purple $indigo $blue $light-blue $cyan $teal $green $light-green $lime $yellow $amber $orange $deep-orange $brown $grey $blue-grey;
|
||||
|
||||
$material-colors: (
|
||||
"red": $red,
|
||||
"pink": $pink,
|
||||
|
@ -37,24 +35,7 @@
|
|||
|
||||
@include generic-variations-color($args-variation-color)
|
||||
}
|
||||
|
||||
//@each $material-color-name in $material-color-names {
|
||||
// //// given a color build multiples depths
|
||||
// //$material-color-numbers: "" "-50" "-100" "-200" "-300" "-400" "-500" "-600" "-700" "-800" "-900" "-A100" "-A200" "-A400" "-A700";
|
||||
// //@each $material-color-number in $material-color-numbers {
|
||||
// // @include generic-variations-color($mixin-name, $extra, $default, $contrast-factor, $material-color-name, $material-color-number)
|
||||
// //}
|
||||
//
|
||||
// // build a single depth color palette
|
||||
// $args-variation-color: map-merge($args, (
|
||||
// material-color-name: $material-color-name,
|
||||
// material-color-number: ""
|
||||
// ));
|
||||
//
|
||||
// @include generic-variations-color($args-variation-color)
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
// http://hugogiraudel.com/2014/01/27/casting-types-in-sass/
|
||||
// https://github.com/HugoGiraudel/SassyJSON/blob/master/stylesheets/decode/helpers/color/_color.scss
|
||||
|
|
Loading…
Reference in New Issue
Block a user