From ab9efd1913a0a64e10ccd315de9b5a2548a4fefb Mon Sep 17 00:00:00 2001 From: simurai Date: Sat, 7 Nov 2015 21:48:38 +0900 Subject: [PATCH 1/2] Adjust icon size for small buttons --- static/buttons.less | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/static/buttons.less b/static/buttons.less index cf616903a..bfad4dae9 100644 --- a/static/buttons.less +++ b/static/buttons.less @@ -31,12 +31,18 @@ font-size: @font-size - 2px; height: auto; line-height: 1.3em; + &.icon:before { + font-size: 12px; + } } .btn.btn-sm, .btn-group-sm > .btn { padding: @component-padding/4 @component-padding/2; height: auto; line-height: 1.3em; + &.icon:before { + font-size: 14px; + } } .btn.btn-lg, .btn-group-lg > .btn { @@ -63,6 +69,18 @@ border-bottom-right-radius: @component-border-radius; } +// Icon buttons +.btn.icon { + &:before { + width: initial; + height: initial; + margin-right: .3125em; + } + &:empty:before { + margin-right: 0; + } +} + .btn-toolbar { > .btn-group + .btn-group, > .btn-group + .btn, > .btn + .btn { float: none; From 5fa2a6b52d83d1d3d220709a49f2e0cfd94d7dab Mon Sep 17 00:00:00 2001 From: simurai Date: Tue, 24 Nov 2015 15:48:32 +0900 Subject: [PATCH 2/2] Use @font-size for button icons --- static/buttons.less | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/static/buttons.less b/static/buttons.less index bfad4dae9..42e04e414 100644 --- a/static/buttons.less +++ b/static/buttons.less @@ -32,7 +32,7 @@ height: auto; line-height: 1.3em; &.icon:before { - font-size: 12px; + font-size: @font-size - 2px; } } .btn.btn-sm, @@ -41,7 +41,7 @@ height: auto; line-height: 1.3em; &.icon:before { - font-size: 14px; + font-size: @font-size + 1px; } } .btn.btn-lg, @@ -50,6 +50,9 @@ padding: @component-padding - 2px @component-padding + 2px; height: auto; line-height: 1.3em; + &.icon:before { + font-size: @font-size + 6px; + } } .btn-group > .btn {