stylis – lightweight CSS preprocessor

Stylis is a lightweight CSS preprocessor designed for transforming stylesheets. It processes CSS syntax and produces transformed output, with particular emphasis on nested rules, selector namespacing and vendor prefixing.

One of its important applications is processing stylesheets associated with components. A styling system can provide a namespace and use Stylis to generate selectors that apply to the intended elements.

The preprocessor supports nested CSS rules, allowing styles to be expressed using a hierarchical structure before being converted into output suitable for the target environment.

Stylis also includes facilities for adding vendor prefixes and reducing the size of generated CSS. These transformations can be incorporated into a processing pipeline through its middleware interface. Developers can use this interface to inspect CSS elements or implement additional transformations during compilation.

The library has a deliberately focused scope. It is primarily intended to transform CSS rather than expose a complete stylesheet document object model for arbitrary editing.

This is free and open source software.

Key Features

  • Processes nested CSS selectors and rules.
  • Supports selector namespacing for scoped styling.
  • Provides vendor prefixing for supported CSS constructs.
  • Includes CSS minification functionality.
  • Offers middleware for custom transformations.
  • Supports processing CSS rules and declarations through compilation hooks.
  • Provides interfaces for serialising processed stylesheet content.
  • Supports ECMAScript module integration and tree shaking.

Website: github.com/thysultan/stylis
Support:
Developer: Sultan Tarimo
License: MIT License

stylis is written in JavaScript. Learn JavaScript with our recommended free books and free tutorials.


Related Software

CSS Parsers
PostCSSTransform styles with JavaScript plugins
Lightning CSSParser, transformer, bundler, and minifier
ReworkPlugin framework for CSS preprocessing
PHP CSS ParserPHP library for reading CSS
MenschNon-validating CSS parser
CSSTreeTool set for CSS
StylisLightweight CSS preprocessor
tinycss2CSS parser and generator
ParseGo library offering lexers, parsers, and parsing utilities
LibCSSCSS parser and selection engine
Ruby CSS ParserLoad, parse and cascade CSS rule sets
ParserLibCSS3 SAX-inspired parser
css-parserFork of the cssutils project
ph-cssParse, represent, modify, and write CSS stylesheets
StylecowModern CSS to all browsers
Gonzales PECSS parser which plays nicely with preprocessors
CSSOMCSS parser written in pure JavaScript

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted