Skip to content

Commit

Permalink
fix(buttons): indicate focus state of outline button just with border…
Browse files Browse the repository at this point in the history
…-color

Closes: #295
  • Loading branch information
mishkolesnikov authored and nnixaa committed Mar 22, 2018
1 parent 7676095 commit e68a1ea
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@

.btn-toggle-group,
.btn-divided-group {
.btn:not(.active) {
.btn {
background-color: nb-theme(btn-group-bg);
color: nb-theme(btn-group-fg);
}
Expand Down Expand Up @@ -231,7 +231,7 @@
}

.btn-outline-divided-group {
.btn:not(.active) {
.btn {
background-color: transparent;
}
}
Expand Down
15 changes: 12 additions & 3 deletions src/framework/theme/styles/global/bootstrap/_default-buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@
@return shade(nb-theme($bg), $percentage);
}

@mixin btn-outline-focus($focus) {
&:focus,
&.focus {
color: nb-theme(btn-outline-hover-fg);
border-color: $focus;
box-shadow: none;
}
}

@mixin btn-focus($focus) {
&:focus,
&.focus {
Expand All @@ -131,15 +140,15 @@

@mixin btn-active($active) {
&:active,
&.active {
&.active,
&:active:focus {
color: nb-theme(btn-outline-hover-fg);
background-color: $active;
border-color: transparent;
box-shadow: none;
}
}


// Focus
@mixin btn-primary-focus() {
@include btn-focus(btn-focus-color(btn-primary-bg));
Expand All @@ -162,7 +171,7 @@
}

@mixin btn-secondary-focus() {
@include btn-focus(btn-focus-color(btn-secondary-border));
@include btn-outline-focus(btn-focus-color(btn-secondary-border, 20%));
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,27 +131,27 @@

// Focus
@mixin btn-outline-primary-focus() {
@include btn-primary-focus();
@include btn-outline-focus(btn-focus-color(btn-primary-bg, 20%));
}

@mixin btn-outline-warning-focus() {
@include btn-warning-focus();
@include btn-outline-focus(btn-focus-color(btn-warning-bg, 20%));
}

@mixin btn-outline-success-focus() {
@include btn-success-focus();
@include btn-outline-focus(btn-focus-color(btn-success-bg, 20%));
}

@mixin btn-outline-info-focus() {
@include btn-info-focus();
@include btn-outline-focus(btn-focus-color(btn-info-bg, 20%));
}

@mixin btn-outline-danger-focus() {
@include btn-danger-focus();
@include btn-outline-focus(btn-focus-color(btn-danger-bg, 20%));
}

@mixin btn-outline-secondary-focus() {
@include btn-secondary-focus();
@include btn-outline-focus(btn-focus-color(btn-secondary-border, 20%));
}


Expand Down

0 comments on commit e68a1ea

Please sign in to comment.