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.

124 lines
2.0 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. &.spinner
  21. margin-top: 5rem
  22. &.error, &.empty
  23. margin: 2rem
  24. &.empty
  25. text-align: center
  26. &.has-content
  27. position: fixed
  28. top: 0
  29. left: 0
  30. right: 0
  31. bottom: 0
  32. display: grid
  33. grid-template-rows: $nav-height auto
  34. nav
  35. display: flex
  36. overflow-x: auto
  37. height: $nav-height
  38. background-color: white
  39. > a
  40. border-bottom: $nav-bottom-highlight solid transparent
  41. &.visible
  42. border-bottom-color: green
  43. > div.sticker
  44. width: $nav-sticker-size
  45. height: $nav-sticker-size
  46. > div.sticker.icon > img
  47. width: 70%
  48. height: 70%
  49. padding: 15%
  50. div.pack-list, nav
  51. scrollbar-width: none
  52. &::-webkit-scrollbar
  53. display: none
  54. div.pack-list
  55. overflow-y: auto
  56. div.pack-list.ios-safari-hack
  57. position: fixed
  58. top: $nav-height
  59. bottom: 0
  60. left: 0
  61. right: 0
  62. -webkit-overflow-scrolling: touch
  63. section.stickerpack
  64. margin-top: .75rem
  65. > div.sticker-list
  66. display: flex
  67. flex-wrap: wrap
  68. > h1
  69. margin: 0 0 0 .75rem
  70. div.sticker
  71. display: flex
  72. padding: 4px
  73. cursor: pointer
  74. position: relative
  75. width: var(--sticker-size)
  76. height: var(--sticker-size)
  77. box-sizing: border-box
  78. &:hover
  79. background-color: #eee
  80. > img
  81. display: none
  82. width: 100%
  83. object-fit: contain
  84. &.visible
  85. display: initial
  86. div.settings-list
  87. display: flex
  88. flex-direction: column
  89. > *
  90. margin: .5rem
  91. button
  92. padding: .5rem
  93. border-radius: .25rem
  94. input
  95. width: 100%