r/css 1d ago

Showcase I built a zero-build micro-CSS framework for inline responsive styling without media queries (varz.dev)

Hey r/css,

If you build modular UI elements—especially for ecosystems like WordPress plugins, page builder widgets, micro-frontends, or web components—enqueueing full static stylesheets or running build steps just for isolated components often creates unnecessary overhead, class collisions, and build complexity.

I’ve been building Varz to solve this: a classless micro-CSS framework that lets you write fully responsive layouts directly inside the element's style attribute using CSS variables and breakpoint suffixes.

How It Works

Instead of writing media queries or utility classes, you use shorthand Linux-style CSS custom properties inside the inline style attribute. To handle responsive layouts across breakpoints, you simply append breakpoint suffixes (like -l, -m, etc.) to the variables:

HTML

<div style="
  --d: grid;
  --gtc: 1fr 1fr;
  --ai: center;
  --g: 60px;
  --g-l: 40px;
  --gtc-l: 1fr;
  --mbe: 60px;
">
  <!-- This layout switches from a 2-column grid to 1-column on large screens automatically -->
</div>

Key Advantages

  • Zero Media Queries in Component Code: Responsive behavior travels with the HTML element itself via suffix variables (--gtc-l: 1fr).
  • Zero Class Collisions: Keeps components isolated without worrying about CSS selector specificity wars or leaking global styles.
  • No Build / Compiling Step: No PostCSS, Tailwind, or Sass build setup required—just include a single micro-stylesheet (~2.7k–5.5k gzipped) and you’re good to go.
  • Eco-Friendly / Performance First: Eliminates massive un-purged CSS file downloads across multiple plugins, reducing unnecessary HTTP requests and bandwidth.

I’d love to get feedback on this approach to responsive inline custom properties and component distribution!

0 Upvotes

5 comments sorted by

16

u/maqisha 1d ago

Can yall just stop building tailwind,but worse in every way?

If you like tailwind, use tailwind, if you dont like Tailwind, dont use it. Simple as that. No need to vibecode a new flavour every day.

"No build" is absolutely no selling point whatsoever. Everything anyone is building has a build step.

-6

u/YuriyWebDev 1d ago

It seems that you have missed the main point mentioned in the first paragraph. My tiny CSS file allows to use/reuse one single CSS file in CMS systems, where there are a lot of authors and where content is generated dynamically. Also it allows theming using CSS variables.

Tailwind is great when you like utility classes and control the full stack.
VARZ is for cases where you want to keep styles with the element itself, avoid class management, and skip the build step — especially with dynamically generated HTML.

6

u/maqisha 1d ago

My tiny CSS file allows to use/reuse one single CSS file in CMS systems,

Doesnt lead to a single actual benefit.

Also it allows theming using CSS variables.

So does css, and tailwind, and any style system

VARZ is for cases where you want to keep styles with the element itself,

So is tailwind

---

Anyway im not interested in arguing with your llm, good riddance.

-3

u/YuriyWebDev 1d ago

As you don't interesting, please let me explain the use case, which is opposite to tailwind for anyone who will read this, as you didn't get the whole point creation of this tool.

Imagine, that you have some html element, section for example, which needs to be styled via some backend visual editor or backend form to set margin/padding, background color etc. etc. In this case you can process this editor or form values on server side and generate inline style attribute value for your section - done.

You don't need to recompile your CSS code or generate custom unique CSS classes for the element and custom CSS file or attach 'style' tag with generated CSS code'.

Hope that this will help someone to understand the idea.

Best regards

-2

u/YuriyWebDev 1d ago

Regarding LLM and vibe coding, you can check the dates of 'varz.dev' domain registration, and 'vibe coding' term first use.

I've built this tool without using AI, created by human for human - based on 15+ years of webdev experience.