‹ BackHN Continuity

Thread

CSS Bed: Classless CSS themes to use as starting points in web development

166 points · 48 comments · sea-gold

  1. shikwasa · · focus · HN ↗
    I understand the "starting point" part but I find the emphasis on "classless" interesting: you basically have to introduce a non-element selector as soon as you want make even the smallest layout change.

    For anything beyond a single page document, I find something like matcha.css (<a href="https:&#x2F;&#x2F;matcha.mizu.sh" rel="nofollow">https:&#x2F;&#x2F;matcha.mizu.sh, you can even pick your custom build on the same page) a practical starting point if you want to stay close to the elements.

    1. nilslindemann · · focus · HN ↗
      With @layer this has become simpler:

          &#x2F;* define layer order. Not necessary here *&#x2F;
          @layer pico, nils;
      
          &#x2F;* import framework into layer *&#x2F;
          @import url(&quot;pico.css&quot;) layer(pico);
      
          &#x2F;* define own styles in own layer, they have precedence. CSS vars are still global. *&#x2F;
          @layer nils {
              p:first-of-type {
                  color: green;
              }
          }
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.