Quick Overview
Shilp CSS is an Intent-first, CSS-centric styling engine and framework.
You compose intent-based styles in CSS, and generate plain, static and purgable CSS at build time, without runtime logic or framework lock-in.
What is Shilp CSS?
Shilp CSS is a logic-driven wrapper built on top of SCSS, Purge CSS and Lightning CSS, designed to integrate seamlessly as a bundler plugin.
It works by transforming your styles through multiple explicit stages, and what the browser receives is just plain CSS.
At a high level:
- Shilp CSS reads your
.cssfiles - Parses them using SCSS
- Identifies intents using Regular Expression
- Replaces those intents with real CSS
- Outputs plain, static CSS
At build time, it additionally:
- Removes unused CSS using Purge CSS
- Applies CSS transforms using Lightning CSS
- Transform modern css features
- Adds vendor prefixes
- Minifies output
- Browser compatibility enforcement
What Shilp CSS Is Not
Shilp CSS is not:
A runtime libraryA CSS-in-JS solutionA framework-specific styling systemA class generator you use in HTML
There is no runtime binding.
There is no magic in templates.
Working With Shilp CSS
You write styles the traditional way.
The stpes are:
- Define styles in
.cssfiles- Use intents inside CSS to compose behavior
-
.custom-btn { @layout shadow-sm; @text size-md; @bg color-primary/90; }
- Bind them using class names, IDs, or attributes
- HTML stays simple:
<button class="custom-btn"> Save </button>
- HTML stays simple:
SCSS Support
Shilp CSS uses the SCSS parser internally. an important part among many in the system.
This means:
- Nesting works
- Mixins work
- Variables work
- Any valid SCSS syntax inside
.cssworks
However:
- Files must use the
.cssextension - You do not write
.scssor.sassfiles - Don't forget to import the module
- for example, when using list
@use "sass:list";
- for example, when using list
- Don't use reserved keywords for intent names
- See, Reserved Names
Output
Shilp CSS always outputs Plain CSS, No runtime dependencies and No framework assumptions.
This makes it:
- Cacheable
- Inspectable
- Debuggable
- Easy to exit if you ever choose to
- though you likely won’t need to :)
Framework & Bundler Support
Shilp CSS is framework-agnostic by design. It integrates at the bundler level, not the framework level.
Frameworks only matter during purging, where Shilp CSS needs access to the final
build source: HTML, CSS and JS.
Defaults sources are provided for:
- ReactJS
- VueJS
All source paths are configurable though.
The Core Promise
Shilp CSS makes one promise:
Styling decisions live in CSS, remain explicit, and age predictably.
Everything else is to protect that promise.