unocss-preset-css
class
attribute

Tech: TypeScript, UnoCSS, CSS, Vitest, Unbuild, VitePress, Bun, NPM, GitHub
Years active: 2024
Links:
class
attributeunocss-preset-css is a front-end tool which unlocks writing something very close to vanilla CSS directly in the class
attribute. Style any element from any other element, style ::before
and ::after
from their originating element’s markup, and use CSS at-rules without breaking to a <style>
tag, all without learning new syntax.
It’s like Tailwind CSS, or Windi CSS, or any other CSS DOM API, but with the minimum of tool-specific idioms.
Want { color: currentColor }
? That’s class="{color:currentColor}"
, not class="text-current"
".
Want { line-height: 2 }
? That’s class="{line-height:2}"
, not class="leading-loose"
.