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.

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