From 586599108f3b2bde4b739c2b186e9bb705ad0278 Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Tue, 27 Jun 2017 22:59:33 +0800 Subject: Add Colors utilities #205 --- src/mixins.less | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/mixins.less') diff --git a/src/mixins.less b/src/mixins.less index f1d9c44..b161e0d 100644 --- a/src/mixins.less +++ b/src/mixins.less @@ -1,4 +1,5 @@ -// Core mixins +// Mixins +// Clearfix mixin .clearfix() { &::after { clear: both; @@ -37,6 +38,23 @@ color: @color; } +// Shadow mixin .shadow-variant(@offset) { box-shadow: 0 @offset (@offset+.1rem)*2 fade(@dark-color, 30%); } + +// Colors mixin +.text-color-variant(@color: @primary-color) { + color: @color; + + a& { + &:focus, + &:hover { + color: darken(@color, 5%); + } + } +} + +.bg-color-variant(@color: @primary-color) { + background: @color; +} \ No newline at end of file -- cgit v1.3.1-26-gb76a