aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/reading/component/widget/style/Popup.scala
blob: 422e3bd9c6f5b2794d093a0155b299906f24d054 (plain)
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
package reading.component.widget.style

import scalacss.Defaults._

import reading.component.style.Col

object Popup extends StyleSheet.Inline {
  import dsl._

  val popup = style(
    display.flex,
    justifyContent.center,
    alignItems.center,
    position.fixed,
    width(100.%%),
    height(100.%%),
    top(0.px),
    right(0.px),
    bottom(0.px),
    left(0.px)
  )

  val curtain = style(
    width(100.%%),
    height(100.%%),
    position.absolute,
    top(0.px),
    left(0.px),
    backgroundColor(Col.black),
    opacity(0.5),
    cursor.pointer
  )

  val content = style(
    position.relative,
    width(50.%%),
    backgroundColor(Col.white),
    padding(30.px),
    borderRadius(5.px)
  )

  val cross = style(
    position.absolute,
    top(30.px),
    right(30.px),
    width(20.px),
    height(20.px),
    cursor.pointer
  )
}