From 79661622fcf1084e4395273636423cb31ff9b5fa Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Fri, 20 Oct 2017 14:29:49 -0400 Subject: [PATCH] Move paint-specific styling out of button Fixes #83 by making sure the copied-over button component has the same styling as in gui too, and move specifics to composing components --- src/components/button/button.css | 19 ------------------- .../tool-select-base/tool-select-base.css | 12 +++++++++++- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/src/components/button/button.css b/src/components/button/button.css index ee592e08..44243650 100644 --- a/src/components/button/button.css +++ b/src/components/button/button.css @@ -1,22 +1,3 @@ -$border-radius: .25rem; - .button { - padding: 0.25rem; - outline: none; - background: white; - border-radius: $border-radius; - border: 1px solid #ddd; cursor: pointer; - font-size: 0.85rem; - transition: 0.2s; -} - -.button > img { - flex-grow: 1; - width: 1.5rem; - height: 1.5rem; -} - -.button:disabled > img { - opacity: 0.25; } diff --git a/src/components/tool-select-base/tool-select-base.css b/src/components/tool-select-base/tool-select-base.css index 174b561e..cc0213d4 100644 --- a/src/components/tool-select-base/tool-select-base.css +++ b/src/components/tool-select-base/tool-select-base.css @@ -1,8 +1,16 @@ @import '../../css/colors.css'; +$border-radius: .25rem; + .tool-select { - background: none; + display: inline-block; border: none; + border-radius: $border-radius; + outline: none; + background: none; + padding: 0.25rem; + font-size: 0.85rem; + transition: 0.2s; } .tool-select.is-selected { @@ -16,4 +24,6 @@ img.tool-select-icon { width: 2rem; height: 2rem; + flex-grow: 1; + vertical-align: middle; }