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

feat!: automatic dividers for header

and some other improvements

+56 -31
+56 -31
dev.css
··· 160 161 a { 162 color: var(--dc-lk-1); 163 } 164 165 abbr:hover { ··· 178 margin-bottom: 0; 179 } 180 181 - header { 182 - background: var(--dc-bg-2); 183 - border-bottom: 1px solid var(--dc-bg-3); 184 - padding: 0.75rem; 185 - margin: -2rem calc(50% - 50vw) 2rem; 186 - padding-left: calc(50vw - 50%); 187 - padding-right: calc(50vw - 50%); 188 189 - /* Sticky header if supported */ 190 - position: sticky; 191 - top: 0; 192 193 - /* Blur for transparent surface if supported */ 194 - backdrop-filter: blur(16px); 195 - } 196 197 - /* Make heading text small if header is not moved to the side */ 198 - @media (max-width: 1451px) { 199 header h1 { 200 font-size: 1.6rem; 201 } 202 - 203 header h2 { 204 font-size: 1.4rem; 205 } 206 - 207 header h3 { 208 font-size: 1.2rem; 209 } 210 - 211 header h4 { 212 font-size: 1rem; 213 } 214 } 215 216 - /* Move header to the side to preserve vertical space, if screen is minimum width 1452px */ 217 - @media (min-width: 1452px) { 218 header { 219 - width: 260px; 220 - height: auto; 221 - position: fixed; 222 - left: calc(50% - 725px); 223 - background: #ffffff00; 224 border-bottom: 0; 225 padding: 2rem 1.5rem; 226 margin: 0; 227 228 - /* Disable blur */ 229 - backdrop-filter: none; 230 } 231 } 232 ··· 237 border-bottom: 0; 238 } 239 240 - header > *:first-child { 241 margin-top: 0; 242 padding-top: 0; 243 } 244 245 - header > *:last-child { 246 margin-bottom: 0; 247 } 248 ··· 358 margin-bottom: 6px; 359 } 360 361 - details[open] > *:last-child { 362 margin-bottom: 0; 363 } 364 ··· 454 455 img { 456 max-width: 100%; 457 - }
··· 160 161 a { 162 color: var(--dc-lk-1); 163 + text-decoration: none; 164 + } 165 + 166 + a:hover { 167 + text-decoration: underline; 168 } 169 170 abbr:hover { ··· 183 margin-bottom: 0; 184 } 185 186 + /* Header mode */ 187 + @media (max-width: 1415px) { 188 + header { 189 + background: var(--dc-bg-2); 190 + border-bottom: 1px solid var(--dc-bg-3); 191 + padding-top: 0.75rem; 192 + padding-bottom: 0.55rem; 193 + margin: -2rem calc(50% - 50vw) 2rem; 194 + padding-left: calc(50vw - 50%); 195 + padding-right: calc(50vw - 50%); 196 197 + /* Sticky header if supported */ 198 + position: sticky; 199 + top: 0; 200 201 + /* Blur for transparent surface if supported */ 202 + backdrop-filter: blur(16px); 203 + } 204 205 + /* Divide a elements in nav with bullet point */ 206 + header nav a+a::before { 207 + content: " • "; 208 + color: var(--dc-tx-2); 209 + } 210 + 211 + /* Change header font sizes */ 212 header h1 { 213 font-size: 1.6rem; 214 } 215 header h2 { 216 font-size: 1.4rem; 217 } 218 header h3 { 219 font-size: 1.2rem; 220 } 221 header h4 { 222 font-size: 1rem; 223 } 224 + header nav { 225 + font-size: 0.9rem; 226 + } 227 } 228 229 + /* Sidebar mode*/ 230 + @media (min-width: 1416px) { 231 header { 232 + /* Style changes */ 233 + background: none; 234 border-bottom: 0; 235 padding: 2rem 1.5rem; 236 margin: 0; 237 238 + /* Fixed position on the screen */ 239 + position: fixed; 240 + top: 0; 241 + left: calc(50% - 700px); 242 + width: 260px; 243 + } 244 + 245 + /* Put nav elements in a separate line */ 246 + header nav { 247 + display: flex; 248 + flex-direction: column; 249 + } 250 + 251 + /* Add dash before nav elements */ 252 + header nav a::before { 253 + content: "• "; 254 + color: var(--dc-tx-2); 255 } 256 } 257 ··· 262 border-bottom: 0; 263 } 264 265 + header>*:first-child { 266 margin-top: 0; 267 padding-top: 0; 268 } 269 270 + header>*:last-child { 271 margin-bottom: 0; 272 } 273 ··· 383 margin-bottom: 6px; 384 } 385 386 + details[open]>*:last-child { 387 margin-bottom: 0; 388 } 389 ··· 479 480 img { 481 max-width: 100%; 482 + }