.styl File — Stylus CSS
text/x-stylus
Drop any file to identify its extension and type — runs entirely in your browser
Drop a .styl file here or click to choose
Or drop any file to identify its extension
text/x-stylusQuick Facts
| Extension | .styl |
| Full Name | Stylus CSS |
| MIME Type | text/x-stylus |
| Category | Web |
| Type | Text-based (human-readable) |
| Typical Size | 1 KB – 50 KB |
| First Appeared | 2010 |
What Is a .styl File?
Stylus is an expressive CSS preprocessor created by TJ Holowaychuk (also creator of Express.js) for the Node.js ecosystem. STYL files use the most flexible syntax of any CSS preprocessor — braces, colons, and semicolons are all optional, allowing minimalist Python-like syntax or full CSS syntax in the same file. Stylus supports variables, nesting, mixins, functions with arithmetic, conditional logic, iteration, string interpolation, property lookup (referencing previously defined values), and an extensive collection of built-in functions for color manipulation, math, and string operations. The transparent mixin feature allows defining functions that are automatically detected as mixins based on usage context. Stylus's flexibility extends to its function system, where functions can return values or generate CSS properties depending on how they're called. While Stylus never achieved the adoption of Sass/SCSS, it remains used in projects that value its concise syntax and powerful function system, particularly in the Express.js/Koa ecosystem. Nib, a Stylus extension library, provides cross-browser CSS3 mixins. The Stylus compiler runs on Node.js and integrates with webpack, Gulp, and other JavaScript build tools.
How to Open .styl Files
Related File Extensions
More Web File Extensions
Other web formats you might encounter
Browse File Extensions by Category
Explore our reference of 259 file extensions with details, programs, and related formats.