diff --git a/dist/ratchet.css b/dist/ratchet.css index 906f394..e03219f 100644 --- a/dist/ratchet.css +++ b/dist/ratchet.css @@ -559,54 +559,40 @@ select { vertical-align: top; cursor: pointer; background-color: transparent; - border: 1px solid rgba(0, 0, 0, 0.5); + border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 4px; } -[class*="button"]:active { +[class*="button"]:active, [class*="button"].button-filled { + color: #fff; background-color: #333; - transition: background-color .1s linear; + transition: opacity .1s linear, background-color .1s linear; } - -.button-main, -.button-positive, -.button-negative { - color: #fff; +[class*="button"]:active:active, [class*="button"].button-filled:active { + opacity: .6; } .button-main { color: #007aff; border: 1px solid #007aff; } +.button-main:active, .button-main.button-filled { + background-color: #007aff; +} .button-positive { color: #4cd964; border: 1px solid #4cd964; } - -.button-negative { - color: #e71e1e; - border: 1px solid #b51a1a; -} - -[class*="button"]:active, -.button-main:active, -.button-positive:active, -.button-negative:active { - color: #fff; -} - -.button-main:active { - color: #fff; - background-color: #007aff; -} - -.button-positive:active { - color: #fff; +.button-positive:active, .button-positive.button-filled { background-color: #4cd964; } -.button-negative:active { - background-color: #b21a1a; +.button-negative { + color: #dd524d; + border: 1px solid #dd524d; +} +.button-negative:active, .button-negative.button-filled { + background-color: #dd524d; } .button-block { diff --git a/dist/template.html b/dist/template.html index 887c766..161e9e7 100644 --- a/dist/template.html +++ b/dist/template.html @@ -47,7 +47,7 @@
Thanks for downloading Ratchet. This is an example HTML page that's linked up to compiled Ratchet CSS and JS, has the proper meta tags and the HTML structure. Need some more help before you start filling this with your own content? Check out some Ratchet resources:
-@@ -714,6 +719,11 @@ <a class="button-main button-block">Block button</a> <a class="button-positive button-block">Block button</a> <a class="button-negative button-block">Block button</a> + +<a class="button-block button-filled">Block button</a> +<a class="button-main button-block button-filled">Block button</a> +<a class="button-positive button-block button-filled">Block button</a> +<a class="button-negative button-block button-filled">Block button</a>diff --git a/lib/sass/buttons.scss b/lib/sass/buttons.scss index 515945d..8a6f8f8 100644 --- a/lib/sass/buttons.scss +++ b/lib/sass/buttons.scss @@ -14,61 +14,56 @@ vertical-align: top; cursor: pointer; background-color: transparent; - border: 1px solid rgba(0, 0, 0, .5); + border: 1px solid rgba(0, 0, 0, .2); border-radius: 4px; // Active - &:active { + &:active, + &.button-filled { + color: #fff; background-color: #333; - transition: background-color .1s linear; + transition: opacity .1s linear, background-color .1s linear; + + &:active { + opacity: .6; + } } } // Buttons modifiers // -------------------------------------------------- -// Overriding styles for buttons with modifiers -.button-main, -.button-positive, -.button-negative { - color: #fff; -} - // Main button .button-main { color: $app-color; border: 1px solid $app-color; + + &:active, + &.button-filled { + background-color: $app-color; + } } // Positive button .button-positive { color: #4cd964; border: 1px solid #4cd964; + + &:active, + &.button-filled { + background-color: #4cd964; + } } // Negative button .button-negative { - color: #e71e1e; - border: 1px solid #b51a1a; -} + color: #dd524d; + border: 1px solid #dd524d; -// Active state for buttons with modifiers -[class*="button"]:active, -.button-main:active, -.button-positive:active, -.button-negative:active { - color: #fff; -} -.button-main:active { - color: #fff; - background-color: $app-color; -} -.button-positive:active { - color: #fff; - background-color: #4cd964; -} -.button-negative:active { - background-color: #b21a1a; + &:active, + &.button-filled { + background-color: #dd524d; + } } // Block level buttons (full width buttons)