react-toolbox/components/clock/style.styl

99 lines
2.5 KiB
Stylus
Raw Normal View History

2015-08-28 11:53:29 +03:00
@import '../constants'
NUMBER_SIZE = 20px
HAND_WIDTH = 4px
HAND_DOT_SIZE = 10px
2015-08-28 11:53:29 +03:00
KNOB_SIZE = 34px
SMALL_KNOB_SIZE = 12px
2015-08-12 23:45:43 +03:00
:local(.root)
2015-08-30 22:56:54 +03:00
padding : 15px
2015-08-12 23:45:43 +03:00
2015-08-23 04:09:08 +03:00
:local(.wrapper)
2015-08-28 11:53:29 +03:00
background-color : DIVIDER
border-radius : 50%
position : relative
2015-08-12 23:45:43 +03:00
2015-08-23 04:09:08 +03:00
:local(.face)
2015-08-28 11:53:29 +03:00
border-radius : 50%
cursor : pointer
2015-08-28 11:53:29 +03:00
position : relative
z-index : Z_INDEX_HIGH
2015-08-13 03:39:40 +03:00
2015-08-23 04:09:08 +03:00
:local(.number)
2015-08-28 11:53:29 +03:00
height : NUMBER_SIZE
margin-left : -(NUMBER_SIZE/2)
margin-top : -(NUMBER_SIZE/2)
pointer-events : none
2015-08-28 11:53:29 +03:00
position : relative
text-align : center
user-select : none
2015-08-28 11:53:29 +03:00
width : NUMBER_SIZE
2015-08-13 03:39:40 +03:00
2015-08-28 11:53:29 +03:00
&.active
color : WHITE
2015-08-23 04:09:08 +03:00
2015-08-28 11:53:29 +03:00
:local(.face)
position : absolute
top : 50%
left : 50%
transform : translateX(-50%) translateY(-50%)
2015-08-12 23:45:43 +03:00
:local(.hand)
2015-08-28 11:53:29 +03:00
background-color : ACCENT
2015-08-12 23:45:43 +03:00
bottom : 50%
display : block
left : 50%
2015-08-28 11:53:29 +03:00
margin-left : -(HAND_WIDTH/2)
2015-08-12 23:45:43 +03:00
position : absolute
2015-08-13 16:33:22 +03:00
transform-origin : 50% 100%
2015-08-28 11:53:29 +03:00
width : HAND_WIDTH
2015-08-12 23:45:43 +03:00
&:before
2015-08-28 11:53:29 +03:00
background-color : ACCENT
2015-08-12 23:45:43 +03:00
border-radius : 50%
bottom : 0
content : ''
2015-08-28 11:53:29 +03:00
height : HAND_DOT_SIZE
2015-08-12 23:45:43 +03:00
left : 50%
2015-08-28 11:53:29 +03:00
margin-bottom : -(HAND_DOT_SIZE/2)
margin-left : -(HAND_DOT_SIZE/2)
2015-08-12 23:45:43 +03:00
position : absolute
2015-08-28 11:53:29 +03:00
width : HAND_DOT_SIZE
2015-08-28 17:49:51 +03:00
&.smallKnob :local(.knob)
background-color: lighten(ACCENT, 70%)
&:after
background : ACCENT
border-radius : 50%
content : ''
height : SMALL_KNOB_SIZE
left : 50%
margin-left : -(SMALL_KNOB_SIZE/2)
margin-top : -(SMALL_KNOB_SIZE/2)
position : absolute
top : 50%
width : SMALL_KNOB_SIZE
2015-08-28 11:53:29 +03:00
&:before
background : ACCENT
bottom : 0
2015-08-28 11:53:29 +03:00
content : ''
height : KNOB_SIZE - SMALL_KNOB_SIZE
2015-08-28 11:53:29 +03:00
left : 50%
margin-left : -(HAND_WIDTH/2)
position : absolute
width : HAND_WIDTH
2015-08-13 03:39:40 +03:00
2015-08-12 23:45:43 +03:00
:local(.knob)
2015-08-28 11:53:29 +03:00
background-color : ACCENT
2015-08-13 16:33:22 +03:00
border-radius : 50%
cursor : pointer
2015-08-28 11:53:29 +03:00
height : KNOB_SIZE
2015-08-12 23:45:43 +03:00
left : 50%
2015-08-28 11:53:29 +03:00
margin-left : -(KNOB_SIZE/2)
2015-08-12 23:45:43 +03:00
position : absolute
2015-08-28 11:53:29 +03:00
top : -(KNOB_SIZE)
width : KNOB_SIZE