GrowiSubNavigation.module.scss 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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-taglabels-container {
  30. margin-bottom: 0.5rem;
  31. }
  32. .grw-page-path-nav {
  33. .separator {
  34. margin-right: 0.2em;
  35. margin-left: 0.2em;
  36. }
  37. }
  38. .btn-copy {
  39. &:not(:hover):not(:active) {
  40. background-color: transparent !important;
  41. }
  42. opacity: 0.5;
  43. }
  44. .btn-edit-tags {
  45. opacity: 0.5;
  46. &.no-tags {
  47. opacity: 0.7;
  48. }
  49. }
  50. .btn-skeleton {
  51. @extend %subnav-buttons-height;
  52. width: 100%;
  53. }
  54. .btn-subscribe {
  55. @extend %subnav-buttons-height;
  56. font-size: 20px;
  57. }
  58. .btn-like,
  59. .btn-bookmark,
  60. .btn-seen-user {
  61. @extend %subnav-buttons-height;
  62. padding-right: 6px;
  63. padding-left: 8px;
  64. font-size: 20px;
  65. svg {
  66. width: 20px;
  67. height: 20px;
  68. }
  69. }
  70. .total-likes,
  71. .total-bookmarks {
  72. display: flex;
  73. align-items: flex-end;
  74. padding-right: 8px;
  75. padding-left: 6px;
  76. font-size: 14px;
  77. font-weight: bs.$fw-bold;
  78. }
  79. .seen-user-count {
  80. padding-right: 6px;
  81. padding-left: 6px;
  82. font-size: 14px;
  83. font-weight: bs.$fw-bold;
  84. vertical-align: bottom;
  85. }
  86. .btn-page-item-control {
  87. height: 40px;
  88. font-size: 16px;
  89. }
  90. .user-list-popover {
  91. max-width: 200px;
  92. .user-list-content {
  93. direction: rtl;
  94. .liker-user-count,
  95. .seen-user-count {
  96. font-size: 12px;
  97. font-weight: bolder;
  98. }
  99. }
  100. .cls-1 {
  101. isolation: isolate;
  102. }
  103. }
  104. }
  105. &:global {
  106. &:hover {
  107. .btn-copy,
  108. .btn-edit-tags {
  109. // change button opacity
  110. opacity: unset;
  111. }
  112. }
  113. /*
  114. * Compact Mode
  115. */
  116. &.grw-subnav-compact {
  117. min-height: 70px;
  118. @include bs.media-breakpoint-up(md) {
  119. min-height: 90px;
  120. }
  121. .btn-skeleton {
  122. @extend %compact-subnav-buttons-height;
  123. width: 100%;
  124. }
  125. .btn-like,
  126. .btn-bookmark,
  127. .btn-subscribe {
  128. width: 32px;
  129. @extend %compact-subnav-buttons-height;
  130. padding: 4px;
  131. font-size: 16px;
  132. }
  133. .btn-seen-user {
  134. width: 48px;
  135. @extend %compact-subnav-buttons-height;
  136. padding: 4px;
  137. font-size: 16px;
  138. svg {
  139. width: 16px;
  140. height: 16px;
  141. }
  142. }
  143. .btn-page-item-control {
  144. width: 32px;
  145. @extend %compact-subnav-buttons-height;
  146. font-size: 12px;
  147. }
  148. }
  149. }
  150. }