Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(button): extract button variables
- Loading branch information
Showing
16 changed files
with
465 additions
and
463 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,5 +9,6 @@ | |
|
||
|
||
// Component | ||
@import "_variables.scss"; | ||
@import "_layout.scss"; | ||
@import "_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,114 @@ | ||
// Button | ||
|
||
/// Width of border around buttons | ||
/// @group buttons | ||
$button-border-width: $btn-border-width !default; | ||
/// Border radius of buttons | ||
/// @group buttons | ||
$button-border-radius: $border-radius !default; | ||
|
||
/// Horizontal padding of buttons | ||
/// @group buttons | ||
$button-padding-x: $btn-padding-x !default; | ||
/// Vertical padding of buttons | ||
/// @group buttons | ||
$button-padding-y: $btn-padding-y !default; | ||
$button-font-family: $font-family !default; | ||
$button-font-size: $font-size !default; | ||
$button-line-height: $btn-line-height !default; | ||
|
||
$button-padding-x-sm: $btn-padding-x-sm !default; | ||
$button-padding-y-sm: $btn-padding-y-sm !default; | ||
$button-line-height-sm: $btn-line-height-sm !default; | ||
|
||
$button-calc-size: calc( #{$button-line-height * 1em} + #{$button-padding-y * 2} + #{$button-border-width * 2} ) !default; | ||
$button-inner-calc-size: calc( #{$button-line-height * 1em} + #{$button-padding-y * 2} ) !default; | ||
|
||
/// The background of the buttons. | ||
/// @group buttons | ||
$button-bg: $secondary !default; | ||
|
||
/// The text color of the buttons. | ||
/// @group buttons | ||
$button-text: contrast-wcag( $button-bg, $gray-900 ) !default; | ||
|
||
/// The border color of the buttons. | ||
/// @group buttons | ||
$button-border: $button-bg !default; | ||
|
||
/// The background gradient of the buttons. | ||
/// @group buttons | ||
$button-gradient: null !default; | ||
$button-shadow: null !default; | ||
|
||
/// The background of hovered buttons. | ||
/// @group buttons | ||
$button-hovered-bg: try-darken( $button-bg, 7.5% ) !default; | ||
|
||
/// The text color of hovered buttons. | ||
/// @group buttons | ||
$button-hovered-text: contrast-wcag( $button-hovered-bg, $gray-900 ) !default; | ||
|
||
/// The border color of hovered buttons. | ||
/// @group buttons | ||
$button-hovered-border: try-darken( $button-border, 10% ) !default; | ||
|
||
/// The background gradient of hovered buttons. | ||
/// @group buttons | ||
$button-hovered-gradient: null !default; | ||
$button-hovered-shadow: null !default; | ||
|
||
/// The background color of pressed buttons. | ||
/// @group buttons | ||
$button-pressed-bg: try-darken( $button-bg, 10% ) !default; | ||
|
||
/// The text color of pressed buttons. | ||
/// @group buttons | ||
$button-pressed-text: contrast-wcag( $button-pressed-bg, $gray-900 ) !default; | ||
|
||
/// The border color of pressed buttons. | ||
/// @group buttons | ||
$button-pressed-border: try-darken( $button-border, 12.5% ) !default; | ||
|
||
/// The background gradient of pressed buttons. | ||
/// @group buttons | ||
$button-pressed-gradient: null !default; | ||
$button-pressed-shadow: null !default; | ||
|
||
/// The shadow of focused buttons. | ||
/// @group buttons | ||
$button-focused-shadow: 0 0 0 3px rgba($button-border, .5) !default; | ||
|
||
|
||
// Disabled button | ||
$button-disabled-bg: null !default; | ||
$button-disabled-text: null !default; | ||
|
||
|
||
// Primary button | ||
$primary-button-bg: $primary !default; | ||
$primary-button-text: contrast-wcag( $primary-button-bg ) !default; | ||
$primary-button-border: $primary-button-bg !default; | ||
$primary-button-gradient: null !default; | ||
|
||
$primary-button-hovered-bg: try-darken( $primary-button-bg, 7.5% ) !default; | ||
$primary-button-hovered-text: contrast-wcag( $primary-button-hovered-bg ) !default; | ||
$primary-button-hovered-border: try-darken( $primary-button-border, 10% ) !default; | ||
$primary-button-hovered-gradient: null !default; | ||
|
||
$primary-button-pressed-bg: try-darken( $primary-button-bg, 10% ) !default; | ||
$primary-button-pressed-text: contrast-wcag( $primary-button-pressed-bg ) !default; | ||
$primary-button-pressed-border: try-darken( $primary-button-border, 12.5% ) !default; | ||
$primary-button-pressed-gradient: null !default; | ||
$primary-button-pressed-shadow: inset 0 2px 2px 0 rgba(0, 0, 0, .06) !default; | ||
|
||
$primary-button-focused-shadow: 0 0 0 3px rgba($primary-button-border, .5) !default; | ||
|
||
$flat-button-hover-opacity: .08 !default; | ||
$flat-button-focused-opacity: null !default; | ||
$flat-button-active-opacity: .16 !default; | ||
$flat-button-selected-opacity: .2 !default; | ||
|
||
$clear-button-text: #6c757d !default; | ||
$clear-button-hover-text: $button-text !default; | ||
$clear-button-focused-opacity: .1 !default; |
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
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// Component | ||
@import "_variables.scss"; | ||
@import "~@progress/kendo-theme-default/scss/button/_layout.scss"; | ||
@import "~@progress/kendo-theme-default/scss/button/_theme.scss"; |
Oops, something went wrong.