-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathstyles.scala
88 lines (83 loc) · 1.63 KB
/
styles.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
load.ivy("com.lihaoyi" %% "scalatags" % "0.5.3")
@
import scalatags.stylesheet._
import scalatags.Text.all.{width, height, _}
import scalatags.Text._
@
val marginWidth = "25%"
trait WideStyles extends StyleSheet{
def header = cls(
position.fixed,
top := 0,
bottom := 0,
styles.width := marginWidth,
justifyContent.center
)
def headerContent = cls(
textAlign.center
)
def content = cls(
padding := "2em 3em 0",
padding := 48,
marginLeft := marginWidth,
boxSizing.`border-box`
)
def footer = cls(
position.fixed,
bottom := 0,
styles.height := 50,
styles.width := marginWidth
)
}
val WideStyles = Sheet[WideStyles]
trait NarrowStyles extends StyleSheet{
def header = cls(
marginBottom := 10
)
def content = cls(
padding := 16
)
def headerContent = cls(
flexDirection.row,
styles.width := "100%",
display.flex
)
def linkFlex = cls(
alignSelf.flexEnd
)
def flexFont = cls(
fontSize := "4vw"
)
}
val NarrowStyles = Sheet[NarrowStyles]
trait Styles extends StyleSheet{
def header = cls(
backgroundColor := "rgb(61, 79, 93)",
padding := 20,
display.flex,
alignItems.center,
boxSizing.`border-box`
)
def headerLinkBox = cls(
flex := 1,
display.flex,
flexDirection.row,
textAlign.center
)
def headerLink = cls(
flex := 1,
display.flex,
justifyContent.center,
alignItems.center,
padding := "10px 10px"
)
def footer = cls(
display.flex,
justifyContent.center,
color := "rgb(158, 167, 174)"
)
def subtleLink = cls(
textDecoration.none
)
}
val Styles = Sheet[Styles]