Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/picturepan2/spectre.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/mixins/_color.scss')
-rw-r--r--src/mixins/_color.scss24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mixins/_color.scss b/src/mixins/_color.scss
new file mode 100644
index 0000000..f2e2e5c
--- /dev/null
+++ b/src/mixins/_color.scss
@@ -0,0 +1,24 @@
+// Background color utility mixin
+@mixin bg-color-variant($name: ".bg-primary", $color: $primary-color) {
+ #{$name} {
+ background: $color;
+
+ @if (lightness($color) < 60) {
+ color: $light-color;
+ }
+ }
+}
+
+// Text color utility mixin
+@mixin text-color-variant($name: ".text-primary", $color: $primary-color) {
+ #{$name} {
+ color: $color;
+ }
+
+ a#{$name} {
+ &:focus,
+ &:hover {
+ color: darken($color, 5%);
+ }
+ }
+}