tiny, simple, classless CSS framework inspired by new.css devcss.devins.page
framework lightweight css classless stylesheet

feat: use article in aside, multi-sidebar

you can use multiple articles in the aside element to allow for multiple containers in a sidebar.

also, the second aside element will now appear on the right of the page

+29 -35
+18 -16
README.md
··· 92 92 93 93 ### Sidebar 94 94 95 - Optionally, you can add a sidebar to your page for pretty much anything you'd like. A good usage for this could be, for example, complex navigation on a docs website, where you wouldn't be able to fit it all into the header. The sidebar will sort normally with the rest of the content on smaller screens. To make a sidebar, place an `<aside>` tag. You must put it above the `<main>` content. Here's an example: 95 + Optionally, you can add a sidebar to your page for pretty much anything you'd like. A good usage for this could be, for example, complex navigation on a docs website, where you wouldn't be able to fit it all into the header. The sidebar will sort normally with the rest of the content on smaller screens. To make a sidebar, place an `<aside>` tag, and then put an `<article>` inside. You must put it above the `<main>` content. You can have up to two sidebars per page - the second one will appear on the right side. Here's an example: 96 96 97 97 ```html 98 98 <aside> 99 - <h1>Sidebar</h1> 100 - <nav> 101 - <ul> 102 - <li><a href="https://example.com">Page 1</a></li> 103 - <li> 104 - <a href="https://example.com">Page 2</a> 105 - <ul> 106 - <li><a href="https://example.com">Page 2.1</a></li> 107 - <li><a href="https://example.com">Page 2.2</a></li> 108 - </ul> 109 - </li> 110 - <li><a href="https://example.com">Page 3</a></li> 111 - <li><a href="https://example.com">Page 4</a></li> 112 - </ul> 113 - </nav> 99 + <article> 100 + <h1>Sidebar</h1> 101 + <nav> 102 + <ul> 103 + <li><a href="https://example.com">Page 1</a></li> 104 + <li> 105 + <a href="https://example.com">Page 2</a> 106 + <ul> 107 + <li><a href="https://example.com">Page 2.1</a></li> 108 + <li><a href="https://example.com">Page 2.2</a></li> 109 + </ul> 110 + </li> 111 + <li><a href="https://example.com">Page 3</a></li> 112 + <li><a href="https://example.com">Page 4</a></li> 113 + </ul> 114 + </nav> 115 + </article> 114 116 </aside> 115 117 ``` 116 118
+11 -19
dev.css
··· 104 104 address, 105 105 area, 106 106 article, 107 - aside, 108 107 audio, 109 108 blockquote, 110 109 datalist, ··· 270 269 } 271 270 272 271 main, 273 - aside { 272 + article { 274 273 padding: 1.5rem; 275 274 background: var(--dc-bg-1); 276 275 border: 1px solid var(--dc-bg-3); 277 276 border-radius: 0.25rem; 278 277 } 279 278 280 - article { 281 - padding: 1rem; 279 + main article { 282 280 background: var(--dc-bg-2); 283 - border: 1px solid var(--dc-bg-3); 284 - border-radius: 0.375rem; 285 281 } 286 282 287 - article > *:last-child, 288 - aside > *:last-child, 289 - main > *:last-child { 283 + main > *:last-child, 284 + article > *:last-child { 290 285 margin-bottom: 0; 291 286 } 292 287 293 - aside h1, 294 - aside h2, 295 - aside h3 { 296 - padding-bottom: 0; 297 - border-bottom: none; 298 - } 299 - 300 288 @media only screen and (max-width: 48rem) { 301 289 main { 302 290 margin: -1rem; ··· 317 305 } 318 306 319 307 main, 320 - aside { 308 + article { 321 309 padding: 1rem; 322 310 } 323 311 } ··· 325 313 @media only screen and (min-width: 82rem) { 326 314 aside { 327 315 position: absolute; 328 - left: calc(50% - ((48rem) / 2) - (16rem)); 329 316 width: 16rem; 330 - overflow-y: auto; 317 + } 318 + aside:nth-child(even) { 319 + left: calc(50% - ((48rem) / 2) - (16rem)); 320 + } 321 + aside:nth-child(odd) { 322 + right: calc(50% - ((48rem) / 2) - (16rem)); 331 323 } 332 324 } 333 325