June 7, 2024
Mojo CSS v0.2 has landed, and it's packed with awesome new features and improvements. 🤩🎉
Since our initial launch, we've been hard at work, listening to your feedback and striving to make Mojo even better. Version 0.2 introduces a host of new features, optimizations, and fixes designed to enhance your development experience.
Mojo CSS now includes Static CSS Generation, which generates CSS directly from your HTML. This is particularly useful for Progressive Rendering, improving load times and performance.
Learn More →We've optimized our color engine to use HSLA instead of RGBA, providing more accurate color manipulations and better performance.
This new color engine allows for new color utilities that allow you to change the tinting or shading amount without specifying the color name. For example, you can now use bg-c:+5
to adjust colors more flexibly and intuitively.
<button class="bg-c-primary ..." hover="-- bg-c:+5 **">
Hover me!
</button>
Mojo now supports using variants inside arbitrary selectors. This allows for more complex and dynamic styling, such as:
<div -- _="(@dark:hover .testclass) bg-c-red" **>
...
</div>
To support better layout control, we've added logical margin and padding utilities: ms-*
(margin start), me-*
(margin end), ps-*
(padding start), and pe-*
(padding end).
To simplify your code, we've shortened the naming for borders and rounded corners. For example, border-top-1
is now border-t-1
and rounded-top-r-1
is now rounded-t-r-1
.
We've managed to reduce Mojo's overall size by approximately 10%, making it even more lightweight without sacrificing functionality.
print
.We've created a Nuxt module and developed an example project for AstroJS with Mojo CSS SCG enabled.
We plan to extend our integrations to other frameworks soon, including Next.js, SvelteKit, and Angular, to make Mojo CSS accessible and beneficial for a wider range of developers and projects.
Stay tuned for more updates!