aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/reading/component/index/style/Books.scala
blob: 808b93792f33ac568a1df7eea950dddb069416b5 (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
51
52
53
54
55
56
package reading.component.index.style

import scalacss.Defaults._

import reading.Media

import reading.component.style.{ Color => C }

object Books extends StyleSheet.Inline {
  import dsl._

  val booksParent = style(
    height(100.%%)
  )

  val books = style(
    display.flex,
    flexDirection.column,
    height(100.%%),
    opacity(0)
  )

  val listParent = style(
    overflowY.scroll,
    paddingTop(15.px)
  )

  val list = style(
    display.flex,
    flexWrap.wrap,
    justifyContent.spaceAround
  )

  val book = style(
    Media.desktop(width(250.px)),
    Media.mobile(width(150.px)),
    paddingBottom(60.px),
    textAlign.center
  )

  val cover = style(
    display.inlineBlock,
    backgroundColor(C.gray.lighten(90).value),
    cursor.pointer,
    transition := "transform 0.2s ease-in-out",
    &.hover(transform := "scale(1.1)"),
    Media.desktop(
      height(250.px),
      maxWidth(200.px)
    ),
    Media.mobile(
      height(150.px),
      maxWidth(120.px)
    )
  )
}