説明なし
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

_sidebar.scss 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. .sidebar {
  2. min-width: $sidebar-width;
  3. max-width: $sidebar-width;
  4. transition: $sidebar-transition;
  5. direction: ltr;
  6. background: $sidebar-bg;
  7. }
  8. .sidebar-content {
  9. transition: $sidebar-transition;
  10. display: flex;
  11. height: 100vh;
  12. flex-direction: column;
  13. background: $sidebar-bg;
  14. }
  15. .sidebar-nav {
  16. padding-left: 0;
  17. margin-bottom: 0;
  18. list-style: none;
  19. flex-grow: 1;
  20. }
  21. // Sidebar links
  22. .sidebar-link,
  23. a.sidebar-link {
  24. display: block;
  25. padding: $sidebar-link-padding;
  26. font-weight: $sidebar-link-font-weight;
  27. transition: background .1s ease-in-out;
  28. position: relative;
  29. text-decoration: none;
  30. cursor: pointer;
  31. border-left-style: solid;
  32. border-left-width: 3px;
  33. color: $sidebar-link-color;
  34. background: $sidebar-link-bg;
  35. border-left-color: $sidebar-link-border-left-color;
  36. i,
  37. svg {
  38. margin-right: .75rem;
  39. color: $sidebar-link-icon-color;
  40. }
  41. }
  42. .sidebar-link:focus {
  43. outline: 0;
  44. }
  45. .sidebar-link:hover {
  46. color: $sidebar-link-hover-color;
  47. background: $sidebar-link-hover-bg;
  48. border-left-color: $sidebar-link-hover-border-left-color;
  49. i,
  50. svg {
  51. color: $sidebar-link-icon-hover-color;
  52. }
  53. }
  54. .sidebar-item.active > .sidebar-link,
  55. .sidebar-item.active .sidebar-link:hover {
  56. color: $sidebar-link-active-color;
  57. background: $sidebar-link-active-bg;
  58. border-left-color: $sidebar-link-active-border-left-color;
  59. i,
  60. svg {
  61. color: $sidebar-link-icon-active-color;
  62. }
  63. }
  64. // Sidebar brand
  65. .sidebar-brand {
  66. font-weight: $sidebar-brand-font-weight;
  67. font-size: $sidebar-brand-font-size;
  68. padding: $sidebar-brand-padding-y $sidebar-brand-padding-x;
  69. display: block;
  70. color: $sidebar-brand-color;
  71. &:hover {
  72. text-decoration: none;
  73. color: $sidebar-brand-color;
  74. }
  75. &:focus {
  76. outline: 0;
  77. }
  78. }
  79. // Toggle states
  80. .sidebar-toggle {
  81. cursor: pointer;
  82. width: 26px;
  83. height: 26px;
  84. display: flex;
  85. }
  86. .sidebar {
  87. &.collapsed {
  88. margin-left: -$sidebar-width;
  89. }
  90. // Workaround for IE bug, more info:
  91. // https://stackoverflow.com/a/25850649
  92. @media (min-width: 1px) and (max-width: #{map-get($grid-breakpoints, 'lg') - .02px}) {
  93. // Sidebar default state (on mobile)
  94. margin-left: -$sidebar-width;
  95. // Sidebar collapsed state (on mobile)
  96. &.collapsed {
  97. margin-left: 0;
  98. }
  99. }
  100. }
  101. .sidebar-toggle {
  102. margin-right: $spacer;
  103. }
  104. // Sidebar header
  105. .sidebar-header {
  106. background: transparent;
  107. padding: $sidebar-header-padding;
  108. font-size: $sidebar-header-font-size;
  109. color: $sidebar-header-color;
  110. }
  111. // Badge
  112. .sidebar-badge {
  113. position: absolute;
  114. right: 15px;
  115. top: 14px;
  116. z-index: 1;
  117. }
  118. // Sidebar bottom
  119. .sidebar-cta-content {
  120. padding: $sidebar-cta-padding;
  121. margin: $sidebar-cta-margin;
  122. border-radius: $sidebar-cta-border-radius;
  123. background: $sidebar-cta-bg;
  124. color: $sidebar-cta-color;
  125. }