From a89f32b5691efdcbd6d6fae78723ba9ac978903e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Garc=C3=ADa?= Date: Mon, 25 Jan 2016 23:37:58 +0100 Subject: [PATCH] add buttons components --- src/scss/cdb-components/buttons.scss | 164 +++++++++++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 src/scss/cdb-components/buttons.scss diff --git a/src/scss/cdb-components/buttons.scss b/src/scss/cdb-components/buttons.scss new file mode 100644 index 0000000..c6ffb21 --- /dev/null +++ b/src/scss/cdb-components/buttons.scss @@ -0,0 +1,164 @@ +// Buttons styles +// ---------------------------------------------- + +/* SG +# Buttons/Primary + +``` + + + + + + + + +
+
+
+ +
+ + + + + + + +
+ +``` +*/ + +@import '../cdb-utilities/mixins'; +@import '../cdb-variables/sizes'; +@import '../cdb-variables/colors'; + + +.CDB-Button { + padding: 8px 20px; + border-radius: 4px; + cursor: pointer; + + &.is-mini { + padding: 5px 12px; + } + .CDB-Button-Text { + display: block; + } + &.is-disabled { + cursor: default; + opacity: 0.24; + } +} + +.CDB-Button--primary { + background: $cBlue; + color: $cWhite; + + &:hover { + background: darken($cBlue, 8%); + } + &:active { + background: darken($cBlue, 16%); + } + + &.is-disabled { + &:hover { + background: $cBlue; + } + &:active { + background: $cBlue; + } + } +} + + + +// Buttons styles +// ---------------------------------------------- + +/* SG +# Buttons/Secondary + +``` + + + + + + + + +
+
+
+ +
+ + + + + + + +
+ +``` +*/ + + +.CDB-Button--secondary { + border: 1px solid $cBlue; + background: $cWhite; + color: $cBlue; + + &:hover { + background: rgba($cBlue, 0.08); + } + &:active { + background: $cBlue; + color: $cWhite; + } + + &.is-disabled { + &:hover { + background: $cWhite; + } + &:active { + background: $cWhite; + } + } +}