aboutsummaryrefslogtreecommitdiff
path: root/src/server/Design/Helper.hs
diff options
context:
space:
mode:
authorJoris2016-01-03 19:41:31 +0100
committerJoris2016-01-03 19:41:31 +0100
commita8309988518af5bddf62d6a326d990fde4069b40 (patch)
tree6ff9c0af27d78f8579b5c3975378a3c82899593c /src/server/Design/Helper.hs
parent0cba27cba2b44756389d50bc113f23a2be87e978 (diff)
downloadbudget-a8309988518af5bddf62d6a326d990fde4069b40.tar.gz
budget-a8309988518af5bddf62d6a326d990fde4069b40.tar.bz2
budget-a8309988518af5bddf62d6a326d990fde4069b40.zip
Set focus properties to button elements
Diffstat (limited to 'src/server/Design/Helper.hs')
-rw-r--r--src/server/Design/Helper.hs20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/server/Design/Helper.hs b/src/server/Design/Helper.hs
index 40218f8..f4c19fa 100644
--- a/src/server/Design/Helper.hs
+++ b/src/server/Design/Helper.hs
@@ -27,19 +27,22 @@ clearFix =
display D.table
clear both
-defaultButton :: Color -> Color -> Size Abs -> Css
-defaultButton backgroundCol textCol h = do
+defaultButton :: Color -> Color -> Size a -> (Color -> Color) -> Css
+defaultButton backgroundCol textCol h focusOp = do
backgroundColor backgroundCol
color textCol
borderRadius radius radius radius radius
verticalAlign middle
cursor pointer
lineHeight h
+ height h
textAlign (alignSide sideCenter)
+ hover & backgroundColor (focusOp backgroundCol)
+ focus & backgroundColor (focusOp backgroundCol)
-iconButton :: Color -> Color -> Size Abs -> Css
-iconButton backgroundCol textCol h = do
- defaultButton backgroundCol textCol h
+iconButton :: Color -> Color -> Size Abs -> (Color -> Color) -> Css
+iconButton backgroundCol textCol h focusOp = do
+ defaultButton backgroundCol textCol h focusOp
i <> span ? do
height h
lineHeight h
@@ -49,11 +52,10 @@ iconButton backgroundCol textCol h = do
i ? do
marginLeft (px 15)
marginRight (px 20)
- hover & i ? transform (scale 1.2 1.2)
defaultInput :: Integer -> Css
-defaultInput inputHeight = do
- height (px inputHeight)
+defaultInput h = do
+ height (px h)
padding (px 10) (px 10) (px 10) (px 10)
borderRadius radius radius radius radius
border solid (px 1) C.darkGrey
@@ -72,7 +74,7 @@ expandBlock headerBackground headerColor headerHeight = do
marginLeft (pct blockPercentMargin)
marginRight (pct blockPercentMargin)
".header" ? do
- defaultButton headerBackground headerColor headerHeight
+ defaultButton headerBackground headerColor headerHeight focusLighten
width (pct 100)
fontSize (px 18)
borderRadius radius radius radius radius