From bd177e26f03d7b9431b0269a132dae4f0bd0bc7a Mon Sep 17 00:00:00 2001 From: Kevin Ross Date: Tue, 24 Nov 2015 14:27:01 -0600 Subject: [PATCH] #745 btn and btn-group size variations --- bootstrap-elements.html | 8 ++++---- less/_buttons.less | 30 +++++++++++++----------------- less/_variables.less | 6 ++++++ 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/bootstrap-elements.html b/bootstrap-elements.html index cffc7ba5..64e05ce4 100644 --- a/bootstrap-elements.html +++ b/bootstrap-elements.html @@ -535,10 +535,10 @@

Button sizes

- Large button - Default button - Small button - Mini button + Large button + Default button + Small button + xs button

Floating action buttons

diff --git a/less/_buttons.less b/less/_buttons.less index c4d75346..dd969664 100644 --- a/less/_buttons.less +++ b/less/_buttons.less @@ -1,15 +1,7 @@ // specification: https://www.google.com/design/spec/components/buttons.html -//.btn-shadow() { -// .shadow-z-1(); -// transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1); -// &:active:not(.btn-link) { -// .shadow-z-1-hover(); -// } -//} - .typo-button(@colorContrast: false) { - font-size: 14px; + font-size: @mdb-btn-font-size-base; font-weight: 500; text-transform: uppercase; //line-height: 1; @@ -63,7 +55,8 @@ } } - // **raised** only styles (we are raised buttons by default) + //--- + // btn-raised &.btn-raised { .background-variations(~".btn", ~"", @mdb-btn-background-color); @@ -95,18 +88,21 @@ } // Size variations - &.btn-sm { + &.btn-lg, + .btn-group-lg & { + font-size: @mdb-btn-font-size-lg; + } + &.btn-sm, + .btn-group-sm & { padding: 5px 20px; + font-size: @mdb-btn-font-size-sm; } - &.btn-xs { + &.btn-xs, + .btn-group-xs & { padding: 4px 15px; - font-size: 10px; + font-size: @mdb-btn-font-size-xs; } - //&.btn-raised { - // .btn-shadow(); - //} - &.btn-fab { border-radius: 50%; font-size: @mdb-btn-fab-font-size; diff --git a/less/_variables.less b/less/_variables.less index 88a8fcc8..b7b107ae 100644 --- a/less/_variables.less +++ b/less/_variables.less @@ -142,6 +142,12 @@ @mdb-radio-border-color: @mdb-checkbox-border-color; // Buttons: +@mdb-btn-font-size-base: 14px; +@mdb-btn-font-size-lg: 16px; +@mdb-btn-font-size-sm: 12px; +@mdb-btn-font-size-xs: 10px; + + @mdb-btn-background-color: transparent; @mdb-btn-background-color-text: @mdb-text-color-primary;