From 5d52b19c2b52654e18e8df47f9e123b0bc3d36b6 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Wed, 30 Mar 2016 14:11:18 -0400 Subject: [PATCH] Refactor hero-button as a scss component --- build/css/main.css | 54 ++++++++++++++++++---- lib/components/hero-button.html | 58 ------------------------ lib/components/hero-progress-button.html | 5 +- lib/index.html | 1 - lib/partials/main.html | 9 ++-- lib/partials/success.html | 9 ++-- lib/scss/components/_button.scss | 56 +++++++++++++++++++++++ lib/scss/main.scss | 16 +------ 8 files changed, 114 insertions(+), 94 deletions(-) delete mode 100644 lib/components/hero-button.html create mode 100644 lib/scss/components/_button.scss diff --git a/build/css/main.css b/build/css/main.css index b7cd87be..ca45ff9b 100644 --- a/build/css/main.css +++ b/build/css/main.css @@ -5915,21 +5915,57 @@ button.close { font-size: 11px; margin-bottom: 0; } +/* + * Copyright 2016 Resin.io + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +button.btn { + padding: 10px; + padding-top: 11px; + border-radius: 2px; + border: none; + letter-spacing: 0.5px; + outline: none; + position: relative; } + button.btn[disabled] { + background-color: #313339; + color: #787c7f; + pointer-events: none; } + button.btn[disabled]:hover { + background-color: #36383e; } + +.btn:not(.btn-link) { + min-width: 170px; } + +.btn > .glyphicon { + top: 2px; + margin-right: 2px; } + +/* + * Remove blue/orange outline + * !important is needed here for some reason + * despite the rule having top precedence. + */ +button.btn:focus { + outline: none !important; } + html { background-color: #535760; } hero-icon[disabled] .caption { color: #787c7f; } -hero-button .btn { - min-width: 170px; } - hero-button .btn[disabled] { - background-color: #313339; - color: #787c7f; - pointer-events: none; } - hero-button .btn[disabled]:hover { - background-color: #36383e; } - hero-progress-button .bar { background: #6ca1e0; } diff --git a/lib/components/hero-button.html b/lib/components/hero-button.html deleted file mode 100644 index dfe1a4c1..00000000 --- a/lib/components/hero-button.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - diff --git a/lib/components/hero-progress-button.html b/lib/components/hero-progress-button.html index 89d78ea8..26afd046 100644 --- a/lib/components/hero-progress-button.html +++ b/lib/components/hero-progress-button.html @@ -1,5 +1,4 @@ - @@ -27,12 +26,12 @@ } - +