react-toolbox/components/button/style.styl

82 lines
2.7 KiB
Stylus
Raw Normal View History

2015-07-29 06:46:05 +03:00
@import '../constants'
2015-06-12 19:26:51 +03:00
2015-07-29 22:31:19 +03:00
:local(.root)
2015-06-12 19:26:51 +03:00
z-index : 1
display : inline-block
position : relative
overflow : hidden
2015-06-13 14:18:31 +03:00
font-weight : FONT_WEIGHT_NORMAL
2015-06-12 19:26:51 +03:00
text-align : center
text-decoration : none
white-space : nowrap
border : none
2015-07-29 22:31:19 +03:00
transition-property : background-color, box-shadow
transition-duration : ANIMATION_DURATION
transition-timing-function : ANIMATION_EASE
&.raised, &.flat
padding : (SPACE / 2) (SPACE / 1.25)
font-size : FONT_SIZE_SMALL
text-transform : uppercase
border-radius : (SPACE / 8)
> *
2015-08-16 12:04:52 +03:00
vertical-align : middle
> [data-react-toolbox='icon']
2015-07-29 22:31:19 +03:00
font-size : FONT_SIZE_BIG
margin-right : (SPACE / 2)
> abbr
font-weight : FONT_WEIGHT_BOLD
&.anchor
width : 100%
&.flat
background-color : transparent
&:not(.primary):not(.accent)
2015-08-16 12:04:52 +03:00
> [data-react-toolbox='ripple']
2015-07-29 22:31:19 +03:00
background-color : alpha(TEXT, 12.5%)
&.primary
color : PRIMARY
2015-08-16 12:04:52 +03:00
> [data-react-toolbox='ripple']
2015-07-29 22:31:19 +03:00
background-color : alpha(PRIMARY, 12.5%)
&.accent
color : ACCENT
2015-08-16 12:04:52 +03:00
> [data-react-toolbox='ripple']
2015-07-29 22:31:19 +03:00
background-color : alpha(ACCENT, 12.5%)
&.floating
width : BUTTON_CIRCLE_HEIGHT
height : BUTTON_CIRCLE_HEIGHT
font-size : (BUTTON_CIRCLE_HEIGHT / 2.25)
border-radius : 50%
2015-08-16 12:04:52 +03:00
> [data-react-toolbox='icon']
2015-07-29 22:31:19 +03:00
line-height : BUTTON_CIRCLE_HEIGHT
// Overrides
&[disabled]
color : darken(DIVIDER, 25%)
background-color : DIVIDER
2015-06-12 19:26:51 +03:00
&:not([disabled])
cursor : pointer
2015-06-15 18:09:20 +03:00
&:hover, &:active, &:focus
2015-06-12 19:26:51 +03:00
outline : 0
2015-07-29 22:31:19 +03:00
&:not(.flat)
2015-06-15 18:09:20 +03:00
box-shadow ZDEPTH_SHADOW_1
&:not(.primary):not(.accent)
color : TEXT
2015-06-15 18:09:20 +03:00
background-color : WHITE
2015-07-29 22:31:19 +03:00
&.focused
box-shadow : ZDEPTH_SHADOW_2, inset 0 0 0 UNIT alpha(WHITE, 10%)
&.primary, &.accent
2015-06-15 18:09:20 +03:00
color : WHITE
&.primary
background-color : PRIMARY
&.accent
background-color : ACCENT
2015-06-15 18:09:20 +03:00
2015-08-16 12:04:52 +03:00
&:not(.primary):not(.accent) > [data-react-toolbox='ripple']
background-color : DIVIDER
2015-06-15 18:09:20 +03:00
2015-06-12 19:26:51 +03:00
> *
2015-07-29 22:31:19 +03:00
pointer-events: none