mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-20 04:01:40 +03:00
🎨 begin refactoring the square styles
This commit is contained in:
parent
26e8c67834
commit
24f8d71c24
@ -134,21 +134,32 @@ buildCheckbox assets modifierClasses model labelContent =
|
|||||||
|
|
||||||
|
|
||||||
squareLabelStyles assets model colorTheme =
|
squareLabelStyles assets model colorTheme =
|
||||||
css
|
let
|
||||||
[ backgroundRepeat noRepeat
|
baseStyles =
|
||||||
, color Colors.gray20
|
[ -- Postioning
|
||||||
, if model.disabled then
|
display inlineBlock
|
||||||
cursor auto
|
|
||||||
else
|
|
||||||
cursor pointer
|
|
||||||
, Fonts.baseFont
|
|
||||||
, fontSize (px 16)
|
|
||||||
, outline none
|
|
||||||
, padding2 (px 13) zero
|
, padding2 (px 13) zero
|
||||||
, paddingLeft (px (29 + 6)) -- checkbox width + padding
|
, paddingLeft (px (29 + 6)) -- checkbox width + padding
|
||||||
, property "background-position" "left center"
|
|
||||||
, verticalAlign middle
|
, verticalAlign middle
|
||||||
, display inlineBlock
|
|
||||||
|
-- Text
|
||||||
|
, color Colors.gray20
|
||||||
|
, Fonts.baseFont
|
||||||
|
, fontSize (px 16)
|
||||||
|
, Css.batch <|
|
||||||
|
case colorTheme of
|
||||||
|
Gray ->
|
||||||
|
[ color Colors.gray45 ]
|
||||||
|
|
||||||
|
Default ->
|
||||||
|
[]
|
||||||
|
|
||||||
|
-- Focus & Hover
|
||||||
|
, outline none
|
||||||
|
|
||||||
|
-- Icon
|
||||||
|
, backgroundRepeat noRepeat
|
||||||
|
, property "background-position" "left center"
|
||||||
, case model.selected of
|
, case model.selected of
|
||||||
Selected ->
|
Selected ->
|
||||||
backgroundImage assets.checkboxChecked_svg
|
backgroundImage assets.checkboxChecked_svg
|
||||||
@ -158,14 +169,14 @@ squareLabelStyles assets model colorTheme =
|
|||||||
|
|
||||||
PartiallySelected ->
|
PartiallySelected ->
|
||||||
backgroundImage assets.checkboxCheckedPartially_svg
|
backgroundImage assets.checkboxCheckedPartially_svg
|
||||||
, Css.batch <|
|
|
||||||
case colorTheme of
|
|
||||||
Gray ->
|
|
||||||
[ color Colors.gray45 ]
|
|
||||||
|
|
||||||
Default ->
|
|
||||||
[]
|
|
||||||
]
|
]
|
||||||
|
in
|
||||||
|
css
|
||||||
|
(if model.disabled then
|
||||||
|
[ cursor auto ] ++ baseStyles
|
||||||
|
else
|
||||||
|
[ cursor pointer ] ++ baseStyles
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
lockLabelStyles image model =
|
lockLabelStyles image model =
|
||||||
|
Loading…
Reference in New Issue
Block a user