Csslike
A CSS preprocessor for node.js, designed to conform to the most recent www-style proposals.
Install / Use
/learn @chjj/CsslikeREADME
csslike
csslike is a CSS preprocessor designed to follow the latest www-style proposals from Tab Atkins for CSS variables, mixins, and nested rules (a lot of which appears to be based on LESS and SASS' curly brace syntax, but with some differences).
It's a work in progress. I wanted to make sure the lexer was extremely robust for forward compatibility, in case there are anymore additions. So, the lexer is pretty verbose, it wasn't built for speed, but it will tokenize anything, nothing is hardcoded.
It also includes some small features like auto-base64'ing images, pretty printing, minifying, as well as imported stylesheets, but for the most part, I want to keep it in line with potential standards.
Syntax
@var $green #00ff00;
@trait bg {
background: $green;
}
@trait content($t) {
content: $t;
}
article {
color: black;
& > header {
border: 1px solid;
& > h1 {
background: orange;
}
}
@mixin bg;
@mixin content("hello world");
}
output:
article {
color: black;
background: #00ff00;
content: "hello world";
}
article > header {
border: 1px solid;
}
article > header > h1 {
background: orange;
}
Middleware Usage
app.use(
csslike.handle({
dir: __dirname,
minify: true,
cache: true
})
});
or for a specific file:
app.use('/my_stylesheet',
csslike.handle({
file: __dirname + '/static/style.css',
dir: __dirname,
minify: true,
cache: true
})
});
License
Copyright (c) 2011, Christopher Jeffrey. (MIT Licensed) See LICENSE for more info.
Related Skills
clearshot
Structured screenshot analysis for UI implementation and critique. Analyzes every UI screenshot with a 5×5 spatial grid, full element inventory, and design system extraction — facts and taste together, every time. Escalates to full implementation blueprint when building. Trigger on any digital interface image file (png, jpg, gif, webp — websites, apps, dashboards, mockups, wireframes) or commands like 'analyse this screenshot,' 'rebuild this,' 'match this design,' 'clone this.' Skip for non-UI images (photos, memes, charts) unless the user explicitly wants to build a UI from them. Does NOT trigger on HTML source code, CSS, SVGs, or any code pasted as text.
openpencil
2.1kThe world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pencil.
HappyColorBlend
HappyColorBlendVibe Project Guidelines Project Overview HappyColorBlendVibe is a Figma plugin for color palette generation with advanced tint/shade blending capabilities. It allows designers to
Flyaro-waffle-app
Waffle Delight - Full Stack MERN Application Rules & Documentation Project Overview A comprehensive waffle delivery application built with MERN stack featuring premium UI/UX, admin management, a
