Cascadium.Compiler 1.1.0

dotnet add package Cascadium.Compiler --version 1.1.0
                    
NuGet\Install-Package Cascadium.Compiler -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cascadium.Compiler" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cascadium.Compiler" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Cascadium.Compiler" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Cascadium.Compiler --version 1.1.0
                    
#r "nuget: Cascadium.Compiler, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Cascadium.Compiler@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Cascadium.Compiler&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Cascadium.Compiler&version=1.1.0
                    
Install as a Cake Tool

Cascadium

Cascadium is a lightweight CSS preprocessor for CSS.

This small project can compile CSS with superpowers into a flat CSS file that is more compatible with a larger number of browsers. The project was written in C# and can run on any operating system without the installation of .NET.

Cascadium, unlike other preprocessors, tends to be an extension of CSS and not another markup or programming language. It has some developer-specific features, but all of them are focused on still being "CSS."

Main features:

  • Convert nested CSS into flat CSS
  • Single-line comments
  • Minification, compression, and merging of CSS files
  • Custom property converters
  • Rewrite media queries

Installing

Install Cascadium with NPM:

npm install -g @cypherpotato/cascadium

And then, just run it from the command line:

cascadium

1. <a name='TableofContents'></a>Table of Contents

2. <a name='GettingStarted'></a>Getting Started

You can use the library in your C# project or use the command-line tool compatible with any type of project.

To use the library in your code, you can start by adding the reference to Cascadium:

dotnet add package Cascadium.Compiler

And use it as in the example below:

static void Main(string[] args)
{
    string xcss = """
        div {
            color: red;

            > span {
                color: blue;
                font-weight: 500;
            }
        }
        """;

    var stylesheet = CascadiumCompiler.Parse(xcss);
    var css = stylesheet.Export();

    Console.WriteLine(css);
}

And get the result:

div{color:red}div>span{color:blue;font-weight:500}

Documentation

3. <a name='Introduction'></a>Introduction

The goal of Cascadium is to be as faithful to the original CSS as possible. Therefore, you will not find a similar experience to what SASS or LESS offers: there will be no preprocessor variables, no mixins, loops, etc. Cascadium should be seen as an extension of CSS, not as a language like SASS or LESS.

Creating entire projects with SCSS is possible, with pure CSS as well, so it will be with Cascadium too. The main advantage of Cascadium is being flexible enough to be integrated into any type of project, as its generator can produce CSS files equivalent to the typed Cascadium code.

Currently, Cascadium can be used in two ways:

  • CLI: through the Cascadium tool binaries, which allows usage in any project of any programming language.
  • .NET Package: the .NET library of Cascadium, which allows the use of the compiler in a managed development environment.

For detailed information about syntax, compiler settings, CLI configuration, and converters, please refer to the Cascadium Specification.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 57 7/28/2026
1.0.0 305 10/8/2025
0.10.0 225 3/21/2025
0.9.2 276 11/7/2024
0.9.0 299 9/14/2024
0.6.1 268 8/22/2024
0.6.0 244 6/3/2024
0.4.0 265 4/10/2024
0.2.0 283 1/25/2024
0.1.2 345 11/2/2023
0.1.0 241 10/19/2023