diff --git a/app/assets/stylesheets/admin/components/progress.scss b/app/assets/stylesheets/admin/components/progress.scss index d0ac790eda..189689c764 100644 --- a/app/assets/stylesheets/admin/components/progress.scss +++ b/app/assets/stylesheets/admin/components/progress.scss @@ -1,3 +1,6 @@ +@import 'admin/globals/variables'; +@import 'admin/globals/mixins'; + #progress { display: none; position: fixed; diff --git a/app/assets/stylesheets/admin/globals/functions.scss b/app/assets/stylesheets/admin/globals/functions.scss new file mode 100644 index 0000000000..0abf3546f6 --- /dev/null +++ b/app/assets/stylesheets/admin/globals/functions.scss @@ -0,0 +1,25 @@ +// Make color very close to white +@function very-light($color, $adjust: 3){ + @if type-of($adjust) == 'number' and $adjust > 0 { + @for $i from 0 through 100 { + @if lighten($color, $i) == white and ($i - $adjust) > $adjust { + @return lighten($color, $i - $adjust); + } + } + } + @else { + @debug "Please correct $adjust value. It should be number and larger then 0. Currently it is '#{type-of($adjust)}' with value '#{$adjust}'" + } +}; + +// Quick fix for dynamic variables missing in SASS +@function get-value($prop, $val, $search) { + $n1: index($prop, $search); + $n2: index($val, $search); + + @if($n1) { + @return nth($val, $n1); + } @else { + @return nth($prop, $n2); + } +} diff --git a/app/assets/stylesheets/admin/plugins/select2.scss b/app/assets/stylesheets/admin/plugins/select2.scss index 1bc0d5d938..d290394819 100644 --- a/app/assets/stylesheets/admin/plugins/select2.scss +++ b/app/assets/stylesheets/admin/plugins/select2.scss @@ -1,3 +1,11 @@ +@import 'admin/globals/functions'; +@import 'admin/globals/variables'; +@import 'admin/globals/mixins'; + +@import 'admin/shared/forms'; + +@import 'admin/plugins/font-awesome'; + .select2-container { &:hover .select2-choice, &.select2-container-active .select2-choice { background-color: $color-sel-hover-bg !important;