GrowiSubNavigation.module.scss 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. @use '~/styles/variables' as var;
  2. @use '@growi/core/scss/bootstrap/init' as bs;
  3. @use '~/styles/mixins';
  4. %subnav-buttons-height {
  5. height: 40px;
  6. }
  7. %compact-subnav-buttons-height {
  8. height: 32px;
  9. }
  10. // https://github.com/css-modules/css-modules/issues/295#issuecomment-404873976
  11. // workaround to use '&' in global scope
  12. .grw-subnav {
  13. :global {
  14. min-height: var.$grw-subnav-min-height;
  15. padding-top: 8px;
  16. padding-bottom: 8px;
  17. @include bs.media-breakpoint-up(md) {
  18. min-height: var.$grw-subnav-min-height-md;
  19. }
  20. .grw-drawer-toggler {
  21. width: 50px;
  22. height: 50px;
  23. font-size: 24px;
  24. }
  25. h1 {
  26. @include mixins.variable-font-size(32px);
  27. line-height: 1.4em;
  28. }
  29. .grw-page-path-nav {
  30. .separator {
  31. margin-right: 0.2em;
  32. margin-left: 0.2em;
  33. }
  34. }
  35. .btn-copy {
  36. &:not(:hover):not(:active) {
  37. background-color: transparent !important;
  38. }
  39. opacity: 0.5;
  40. }
  41. .btn-edit-tags {
  42. opacity: 0.5;
  43. &.no-tags {
  44. opacity: 0.7;
  45. }
  46. }
  47. .btn-skeleton {
  48. @extend %subnav-buttons-height;
  49. width: 100%;
  50. }
  51. .btn-subscribe {
  52. @extend %subnav-buttons-height;
  53. font-size: 20px;
  54. }
  55. .btn-like,
  56. .btn-bookmark,
  57. .btn-seen-user {
  58. @extend %subnav-buttons-height;
  59. padding-right: 6px;
  60. padding-left: 8px;
  61. font-size: 20px;
  62. svg {
  63. width: 20px;
  64. height: 20px;
  65. }
  66. }
  67. .total-likes,
  68. .total-bookmarks {
  69. display: flex;
  70. align-items: flex-end;
  71. padding-right: 8px;
  72. padding-left: 6px;
  73. font-size: 14px;
  74. font-weight: bs.$font-weight-bold;
  75. }
  76. .seen-user-count {
  77. padding-right: 6px;
  78. padding-left: 6px;
  79. font-size: 14px;
  80. font-weight: bs.$font-weight-bold;
  81. vertical-align: bottom;
  82. }
  83. .btn-page-item-control {
  84. height: 40px;
  85. font-size: 16px;
  86. }
  87. .user-list-popover {
  88. max-width: 200px;
  89. .user-list-content {
  90. direction: rtl;
  91. .liker-user-count,
  92. .seen-user-count {
  93. font-size: 12px;
  94. font-weight: bolder;
  95. }
  96. }
  97. .cls-1 {
  98. isolation: isolate;
  99. }
  100. }
  101. }
  102. &:global {
  103. &:hover {
  104. .btn-copy,
  105. .btn-edit-tags {
  106. // change button opacity
  107. opacity: unset;
  108. }
  109. }
  110. /*
  111. * Compact Mode
  112. */
  113. &.grw-subnav-compact {
  114. min-height: 70px;
  115. @include bs.media-breakpoint-up(md) {
  116. min-height: 90px;
  117. }
  118. .btn-skeleton {
  119. @extend %compact-subnav-buttons-height;
  120. width: 100%;
  121. }
  122. .btn-like,
  123. .btn-bookmark,
  124. .btn-subscribe {
  125. width: 32px;
  126. @extend %compact-subnav-buttons-height;
  127. padding: 4px;
  128. font-size: 16px;
  129. }
  130. .btn-seen-user {
  131. width: 48px;
  132. @extend %compact-subnav-buttons-height;
  133. padding: 4px;
  134. font-size: 16px;
  135. svg {
  136. width: 16px;
  137. height: 16px;
  138. }
  139. }
  140. .btn-page-item-control {
  141. width: 32px;
  142. @extend %compact-subnav-buttons-height;
  143. font-size: 12px;
  144. }
  145. }
  146. }
  147. }