Stylus to CSS Converter
Explains converting Stylus templates (optional braces/colons) into standard CSS with examples.
Copiado!
Suporta regras planas (sem aninhamento).
Stylus permite omitir { }, : e ;. Exemplo:
.btn\n color white\n padding 8pxEm CSS:
.btn { color: white; padding: 8px; }Variáveis usam $nome = valor sem prefixo obrigatório.
Indented Stylus back to standard CSS
An old project written in Stylus, the people who wrote it long gone, and nobody wants to install a toolchain just to find out what a file actually produces. Or you want to drop a snippet into CodePen, which expects CSS. Paste the indented Stylus into the top box and the version with braces, colons and semicolons shows up below, ready to copy with one click.
Parsing goes by indentation: a line starting at column zero is a selector, an indented line is a declaration. Each declaration splits at the first whitespace, so the first word becomes the property and the rest becomes the value, which is why padding 8px 12px comes out as padding: 8px 12px;. Write it without the optional characters: leave the Stylus colon in and it is read as part of the property name, giving you a doubled colon.
Flat rules only. Nesting, &:hover, mixins, variables in the $name = value form, conditionals and arithmetic are not evaluated, and those lines end up as odd declarations inside the previous rule. For a real stylesheet, compile with the official tool (npm i -g stylus, then stylus -p file.styl). For a short flat snippet this is quicker, and it runs in the browser with copy and clear buttons.
Frequently asked questions
Does it resolve variables and mixins?
Should I include colons in the input?
Does tab indentation work?
Related Tools
CSS to Stylus Converter
Convert plain CSS into the concise Stylus syntax, without braces or semicolons. Paste your CSS and copy the Stylus to modernize your project styling.
SCSS to CSS Converter
Strips simple SCSS features (variable declarations and // comments) producing an approximate CSS for inspection.
CSS to LESS Converter
Convert CSS stylesheets to LESS syntax, turning custom properties (--var) into @variables. Modernize your CSS and copy the ready-to-use code.
CSS to SCSS Converter
Adapts CSS to SCSS preserving rules and turning CSS custom properties into SCSS variables when detected.
LESS to CSS Converter
Strips LESS @variables and // comments producing approximate CSS suitable for visual checking.
SASS to CSS Converter
Explains the differences between indented SASS (.sass) syntax and CSS with side-by-side examples.