As you may know, there are many CSS frameworks (hundreds of them, and a lot of them are not maintained today). Everybody can choose one that suits their work style or project requirements. So why make another one? It is certainly not because we can do it better but because we want to do it our way. We want to be in control and make decisions.
Each system is opinionated but on a different level; this is valid for Spruce too. We don’t want to vote for (strictly) any particular solution (because there is always more than one), but we will show you what we think is the best for us (and maybe for you too). We don’t believe there is a good or bad solution, but we can learn from any of them.
One controversial decision we made with Spruce is to leave a classical grid system out. Because of the late CSS layout model developments like Flexbox and Grid, we think it can be eliminated; this doesn’t mean that we won’t show you how to make layouts with ease, but we try to make it the modern way.
Where it is possible, we use elements and/or attributes to style elements, but it is still a class-based framework.
<divclass="accordion-list"><divclass="accordion-card"><h3class="accordion-card__title">
Why Make Another CSS Framework?
</h3><divclass="accordion-card__content"aria-hidden="true"><div><p>As you may know, there are many CSS frameworks (hundreds of them, and a lot of them are not maintained today). Everybody can choose one that suits their work style or project requirements. So why make another one? It is certainly not because we can do it better but because we want to do it our way. We want to be in control and make decisions.</p></div></div></div><divclass="accordion-card"><h3class="accordion-card__title">
It Is Opinionated
</h3><divclass="accordion-card__content"aria-hidden="true"><div><p>Each system is opinionated but on a different level; this is valid for Spruce too. We don’t want to vote for (strictly) any particular solution (because there is always more than one), but we will show you what we think is the best for us (and maybe for you too). We don’t believe there is a good or bad solution, but we can learn from any of them.</p></div></div></div><divclass="accordion-card"><h3class="accordion-card__title">
We Left the Grid Out
</h3><divclass="accordion-card__content"aria-hidden="true"><div><p>One controversial decision we made with Spruce is to leave a classical grid system out. Because of the late CSS layout model developments like Flexbox and Grid, we think it can be eliminated; this doesn’t mean that we won’t show you how to make layouts with ease, but we try to make it the modern way.</p></div></div></div><divclass="accordion-card"><h3class="accordion-card__title">
Coding Style Guide and Practices
</h3><divclass="accordion-card__content"aria-hidden="true"><div><p>Where it is possible, we use elements and/or attributes to style elements, but it is still a class-based framework.</p></div></div></div></div>
An accordion (or collapsible) card component can be helpful if you want to display more information in a smaller area. Using it, you can hide anything other than the title and show the rest on demand.
Technical Details
It uses a button element and the aria-expanded attribute to control its state and to make it more accessible.
We only show a focus ring on :focus-visible and just on the SVG icon.