-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7a2c6e
commit 72bb1b3
Showing
39 changed files
with
1,603 additions
and
196 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
src/framework/theme/components/button-group/_button-group.component.theme.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/** | ||
* @license | ||
* Copyright Akveo. All Rights Reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*/ | ||
|
||
@mixin nb-buttons-group-theme() { | ||
nb-button-group { | ||
display: inline-flex; | ||
|
||
[nbButton], | ||
[nbButtonToggle] { | ||
@include nb-ltr() { | ||
&:first-child:not(:last-child) { | ||
border-top-right-radius: 0; | ||
border-bottom-right-radius: 0; | ||
} | ||
&:last-child:not(:first-child) { | ||
border-top-left-radius: 0; | ||
border-bottom-left-radius: 0; | ||
} | ||
} | ||
@include nb-rtl() { | ||
&:first-child:not(:last-child) { | ||
border-top-left-radius: 0; | ||
border-bottom-left-radius: 0; | ||
} | ||
&:last-child:not(:first-child) { | ||
border-top-right-radius: 0; | ||
border-bottom-right-radius: 0; | ||
} | ||
} | ||
|
||
&:not(:first-child):not(:last-child) { | ||
border-radius: 0; | ||
} | ||
|
||
&.appearance-filled, | ||
&.appearance-ghost { | ||
// Makes border same color as background. We need to keep the border so that buttons inside and outside | ||
// the group have the same height. | ||
border-color: transparent; | ||
} | ||
|
||
&.appearance-filled { | ||
.status-basic { | ||
color: nb-theme(button-group-filled-button-basic-text-color); | ||
} | ||
|
||
@each $status in nb-get-statuses() { | ||
// I can't figure out any sane selector to turn the start border into a divider for buttons | ||
// in the default state only (not hovered, focused, etc.). So I went with this horrible thing. | ||
// Another way was to copy button styles here, but then we need to keep track of button styles | ||
// all the time. Also, it would increase the number of duplicate button styles. | ||
&.status-#{$status}:not(:first-child):not(:hover):not(:focus):not(:active):not([disabled]) { | ||
@include nb-ltr(border-left-color, nb-theme(button-group-filled-#{$status}-divider-color)); | ||
@include nb-rtl(border-right-color, nb-theme(button-group-filled-#{$status}-divider-color)); | ||
} | ||
} | ||
} | ||
|
||
// See the comment on the selector above | ||
&.appearance-ghost:not(:first-child):not(:hover):not(:focus):not(:active):not([disabled]) { | ||
@include nb-ltr(border-left-color, nb-theme(button-group-ghost-divider-color)); | ||
@include nb-rtl(border-right-color, nb-theme(button-group-ghost-divider-color)); | ||
} | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/framework/theme/components/button-group/_button-toggle.component.theme.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* @license | ||
* Copyright Akveo. All Rights Reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*/ | ||
|
||
@mixin nb-buttons-toggle-theme() { | ||
[nbButtonToggle] { | ||
@extend [nbButton]; | ||
} | ||
} | ||
|
Oops, something went wrong.