You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

155 lines
2.6 KiB

  1. // Copyright (c) 2020 Tulir Asokan
  2. //
  3. // This Source Code Form is subject to the terms of the Mozilla Public
  4. // License, v. 2.0. If a copy of the MPL was not distributed with this
  5. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
  6. *
  7. font-family: sans-serif
  8. body
  9. margin: 0
  10. h1
  11. font-size: 1rem
  12. \:root
  13. --stickers-per-row: 4
  14. --sticker-size: calc(100vw / var(--stickers-per-row))
  15. $nav-sticker-size: 12vw
  16. $nav-bottom-highlight: 2px
  17. $nav-height: calc(#{$nav-sticker-size} + #{$nav-bottom-highlight})
  18. $nav-height-inverse: calc(-#{$nav-sticker-size} - #{$nav-bottom-highlight})
  19. main
  20. color: var(--text-color)
  21. &.spinner
  22. margin-top: 5rem
  23. &.error, &.empty
  24. margin: 2rem
  25. &.empty
  26. text-align: center
  27. &.has-content
  28. position: fixed
  29. top: 0
  30. left: 0
  31. right: 0
  32. bottom: 0
  33. display: grid
  34. grid-template-rows: $nav-height auto
  35. main.theme-light
  36. --highlight-color: #eee
  37. --text-color: black
  38. background-color: white
  39. main.theme-dark
  40. --highlight-color: #444
  41. --text-color: white
  42. background-color: #22262e
  43. main.theme-black
  44. --highlight-color: #222
  45. --text-color: white
  46. background-color: black
  47. .icon
  48. width: 100%
  49. height: 100%
  50. background-color: var(--text-color)
  51. mask-size: contain
  52. -webkit-mask-size: contain
  53. mask-image: var(--icon-image)
  54. -webkit-mask-image: var(--icon-image)
  55. &.icon-settings
  56. --icon-image: url(../res/settings.svg)
  57. &.icon-recent
  58. --icon-image: url(../res/recent.svg)
  59. nav
  60. display: flex
  61. overflow-x: auto
  62. > a
  63. border-bottom: $nav-bottom-highlight solid transparent
  64. &.visible
  65. border-bottom-color: green
  66. > div.sticker
  67. width: $nav-sticker-size
  68. height: $nav-sticker-size
  69. div.pack-list, nav
  70. scrollbar-width: none
  71. &::-webkit-scrollbar
  72. display: none
  73. div.pack-list
  74. overflow-y: auto
  75. div.pack-list.ios-safari-hack
  76. position: fixed
  77. top: $nav-height
  78. bottom: 0
  79. left: 0
  80. right: 0
  81. -webkit-overflow-scrolling: touch
  82. section.stickerpack
  83. margin-top: .75rem
  84. > div.sticker-list
  85. display: flex
  86. flex-wrap: wrap
  87. > h1
  88. margin: 0 0 0 .75rem
  89. div.sticker
  90. display: flex
  91. padding: 4px
  92. cursor: pointer
  93. position: relative
  94. width: var(--sticker-size)
  95. height: var(--sticker-size)
  96. box-sizing: border-box
  97. &:hover
  98. background-color: var(--highlight-color)
  99. > img
  100. display: none
  101. width: 100%
  102. object-fit: contain
  103. &.visible
  104. display: initial
  105. > .icon
  106. width: 70%
  107. height: 70%
  108. margin: 15%
  109. div.settings-list
  110. display: flex
  111. flex-direction: column
  112. > *
  113. margin: .5rem
  114. button
  115. padding: .5rem
  116. border-radius: .25rem
  117. input
  118. width: 100%