Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2025
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.79 KB | None | 0 0
  1. @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
  2.  
  3. /*Creates variables for colors used throughout the stylesheet*/
  4. :root {
  5. --base-clr: #11121a;
  6. --line-clr: #42434a;
  7. --hover-clr: #222533;
  8. --text-clr: #e6e6ef;
  9. --accent-clr: #5e63ff;
  10. --secondary-text-clr: #b0b3c1;
  11. }
  12.  
  13. * {
  14. margin: 0;
  15. padding: 0;
  16. box-sizing: border-box;
  17. font-family: 'Poppins', sans-serif;
  18. }
  19.  
  20. html {
  21. scroll-behavior: smooth;
  22. font-family: Poppins, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  23. line-height: 1.5rem;
  24. }
  25.  
  26. body {
  27. min-height: 100vh;
  28. max-height: 100dvh;
  29. background-color: var(--base-clr);
  30. color: var(--text-clr);
  31. display: grid;
  32. grid-template-columns: auto 1fr;
  33. }
  34.  
  35. #sideBar {
  36. box-sizing: border-box;
  37. height: 100vh;
  38. width: 250px;
  39. padding: 5px 1em;
  40. background-color: var(--base-clr);
  41. border-right: 1px solid var(--line-clr);
  42. position: sticky;
  43. top: 0;
  44. align-self: start;
  45. transition: 300ms ease-in-out;
  46. overflow: hidden; /*This ensures the navbar does not overflow when the screen is resized*/
  47. white-space: nowrap; /*This ensures the text does not wrap - the property for this used to be "text-wrap" but aparently has changed to "white-space"*/
  48. }
  49.  
  50. #sideBar.close {
  51. padding: 5px;
  52. width: 60px;
  53. }
  54.  
  55. #sideBar ul {
  56. list-style: none;
  57. padding: 0;
  58. }
  59.  
  60. #sideBar > ul > li:first-child {
  61. display: flex;
  62. justify-content: flex-end;
  63. margin-bottom: 16px;
  64. }
  65.  
  66. #sideBar > ul > li:first-child .logo {
  67. font-weight: 600;
  68. }
  69. /*coloring the active page button text and icon(svg) in the navbar. This ensures the user always knows which page they are on*/
  70. #sideBar ul li.active a {
  71. color: var(--accent-clr);
  72. }
  73.  
  74. #sideBar ul li.active a svg {
  75. fill: var(--accent-clr);
  76. }
  77.  
  78. /*Styling the links in the navbar*/
  79. #sideBar a, #sideBar .dropdown-btn, #sideBar .logo {
  80. border-radius: .5em;
  81. padding: .85em;
  82. text-decoration: none;
  83. color: var(--text-clr);
  84. display: flex;
  85. align-items: center;
  86. gap: 1em;
  87. }
  88. /*Styling the dropdown buttons*/
  89. .dropdown-btn {
  90. width: 100%;
  91. text-align: left;
  92. background: none;
  93. border: none;
  94. font: inherit;
  95. cursor: pointer;
  96. }
  97. /*Styling all SVG*/
  98. #sideBar svg {
  99. flex-shrink: 0;
  100. fill: var(--text-clr);
  101. }
  102. /*Styling the spans*/
  103. #sideBar a span, #sideBar .dropdown-btn span {
  104. flex-grow: 1;
  105. /*flex-grow 1 makes sure the span takes up the remaing space in the container*/
  106. }
  107. /*Styling the dropdown content when hovering*/
  108. #sideBar a:hover, #sideBar .dropdown-btn:hover {
  109. background-color: var(--hover-clr);
  110. }
  111.  
  112. #sideBar .submenu {
  113. display: grid;
  114. grid-template-rows: 0fr;
  115. transition: 300ms ease-in-out;
  116. }
  117.  
  118. #sideBar .submenu > div {
  119. overflow: hidden;
  120. }
  121.  
  122. #sideBar .submenu.show {
  123. grid-template-rows: 1fr;
  124. }
  125.  
  126. .rotate svg:last-child {
  127. transform: rotate(180deg);
  128. }
  129.  
  130. .dropdown-btn svg {
  131. transition: 300ms ease;
  132. }
  133.  
  134. /*Indentation of the anchors (elements) in the sub-navbar (Bandmedlemmer)*/
  135. #sideBar .submenu a {
  136. padding-left: 4em;
  137. }
  138.  
  139. /*Styling the toggle navbar button*/
  140. #toggle-btn {
  141. margin-left: auto;
  142. padding: 1em;
  143. border: none;
  144. border-radius: .5em;
  145. background: none;
  146. cursor: pointer;
  147. }
  148.  
  149. #toggle-btn svg {
  150. transition: transform 150ms;
  151. }
  152.  
  153. #toggle-btn:hover {
  154. background-color: var(--hover-clr);
  155. }
  156.  
  157.  
  158. #toggle-btn:hover {
  159. background-color: var(--hover-clr);
  160. }
  161.  
  162. main {
  163. padding: min(30px, 7%);
  164. }
  165.  
  166. main p {
  167. color: var(--secondary-text-clr);
  168. margin-top: 5px;
  169. margin-bottom: 15px;
  170. }
  171.  
  172.  
  173. @media(max-width: 800px){
  174. body{
  175. grid-template-columns: 1fr;
  176. }
  177. main{
  178. padding: 2em 1em 60px 1em;
  179. }
  180. .container{
  181. border: none;
  182. padding: 0;
  183. }
  184. #sideBar {
  185. height: 60px;
  186. width: 100%;
  187. border-right: none;
  188. border-top: 1px solid var(--line-clr);
  189. padding: 0;
  190. position: fixed;
  191. top: unset;
  192. bottom: 0;
  193.  
  194.  
  195. > ul {
  196. padding: 0;
  197. display: grid;
  198. grid-auto-columns: 60px;
  199. grid-auto-flow: column;
  200. }
  201. }
  202.  
  203.  
  204. ul li span, ul li:first-child, .dropdown-btn svg:last-child{
  205. display: none;
  206. }
  207. }
  208.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement