Rusty Cascading Style Sheets (RCSS) Tip Download the VSCode extension for syntax highlighting! Rusty Cascading Style Sheets (RCSS) is a styling language that brings Rust-inspired syntax to CSS. It combines the robustness of Rust with SASS-like features such as nesting and variables for cleaner, more maintainable styles. let variable: "#FFFFFF"; let breakpoint: "768px"; fn padding() { padding: 20px; } .container { padding(); h2 { color: blue; } } h4 { width: 50%; color: green; } /* MOBILE STYLES */ @media screen and (max-width: &breakpoint) { .container { width: 100%; } h4 { width: 100%; } } Note The above RCSS code compiles to CSS in around 572.40µs! Installation First, if you don't have Cargo (Rust's package manager) installed, you can install it by following the instructions on the official Rust website. Then, install: cargo install rcss-css Warning If you encounter the following warning: warning: be sure to add ` /home/ < YourUsername > /.cargo/bin ` to your PATH to be able to run the installed binaries For Linux Users Add the following line to your shell configuration file (e.g., .bashrc , .zshrc , etc.): export PATH= " $HOME /.cargo/bin: $PATH " Reload your shell configuration to apply the changes: source ~ /.bashrc For Windows Users Open the Start Menu and search for "Environment Variables." Click on "Edit the system environment variables." In the System Properties window, click the Environment Variables button. Under System variables, locate the Path variable and click Edit. Add the following path to the list: C:\Users\<YourUsername>\.cargo\bin Click OK to save your changes. Restart your terminal or command prompt to ensure the updated PATH is recognized. Usage RCSS expects a directory argument to watch. On file save, RCSS will compile automatically to ../css rcss-css styles/rcss This command will compile .rcss files in styles/rcss into standard CSS files at styles/css . Roadmap ✅ Phase 1: Core Features (Current) Implement Rust-like syntax parsing. Support va...
First seen: 2025-04-10 02:41
Last seen: 2025-04-10 06:42