ExCSS 4.2.5

dotnet add package ExCSS --version 4.2.5
NuGet\Install-Package ExCSS -Version 4.2.5
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="ExCSS" Version="4.2.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ExCSS --version 4.2.5
#r "nuget: ExCSS, 4.2.5"
#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.
// Install ExCSS as a Cake Addin
#addin nuget:?package=ExCSS&version=4.2.5

// Install ExCSS as a Cake Tool
#tool nuget:?package=ExCSS&version=4.2.5

ExCSS StyleSheet Parser for .NET - It's BADA55!

ExCSS (Pronounced Excess) is a CSS 2.1 and CSS 3 parser for .NET.

The goal of ExCSS is to make it easy to read and parse stylesheets into a friendly object model with full LINQ support.

Version 4.0

Version 4 is a move forward in framework support. The new version targets the latest version of .NET; Core 3.1 and 4.8. The API surface is the same as version 3, but will target the future-facing, unified .NET version including the upcoming .NET 5. Version 3 was rewritten from the ground up; version 4 makes full use of those enhancements plus new additions under development! This is the most advanced ExCSS parser to date. The parser has been rebuild to have better white spaces support as well as the ability to handle unknown rule sets in the ever-changing web and CSS landscape.

NuGet

NuGet Status

Lexing and Parsing - How it all Works

ExCSS uses a Lexer and a Parser based on a CSS3-specific grammar. The Lexer and Parser read CSS text and parse each character as individual tokens run against a complex set of rules that define what CSS segment each token represents.
Once parsed, the input styles sheet is turned into a standard .NET object model. That means it's fully queryable using Linq to objects.

A basic example:

var parser = new StylesheetParser();
var stylesheet = parser.Parse(".someClass{color: red; background-image: url('/images/logo.png')");

var rule = stylesheet.StyleRules.First() as StyleRule;
var selector = rule.SelectorText; // Yields .someClass
var color = rule.Style.Color; // rgb(255, 0, 0)
var image = rule.Style.BackgroundImage; // url('/images/logo.png')

CSS 3 Compatible

The project has a growing suite of tests. Currently the tests account for and pass all CSS Level 3 selector definitions found in the W3 CSS 3 Release Candidate documentation

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (12)

Showing the top 5 NuGet packages that depend on ExCSS:

Package Downloads
Svg

Public fork of the C# SVG rendering library on codeplex. This started out as a minor modification to enable the writing of proper SVG strings. But now after almost two years we have so many fixes and improvements that we decided to share our current codebase to the public in order to improve it even further. So please feel free to fork it and open pull requests for any fix, improvement or feature you add. License: Microsoft Public License.

Svg.Custom

Custom build of the SVG rendering library.

VectSharp.SVG

A library to produce vector graphics (including text) without too many dependencies. Extensible to support multiple output formats. This package provides SVG output and (limited) input capability. For more information, see https://github.com/arklumpus/VectSharp

Zapos.Constructors.Razor

Constructors.Razor parse markup from razor .cshtml to abstract document model. Abstract model used on Printer.Gembox part of Zapos.

DotVVM.AMP

This package allows conversion of DotVVM pages into AMP.

GitHub repositories (11)

Showing the top 5 popular GitHub repositories that depend on ExCSS:

Repository Stars
gitextensions/gitextensions
Git Extensions is a standalone UI tool for managing git repositories. It also integrates with Windows Explorer and Microsoft Visual Studio (2015/2017/2019).
Kareadita/Kavita
Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
hitchao/Jvedio
Jvedio 是本地视频管理软件,支持扫描本地视频并导入软件,建立视频库, 提取出视频的 唯一识别码,自动分类视频, 添加标签管理视频,使用人工智能识别演员,支持翻译信息, 基于 FFmpeg 截取视频图片,Window 桌面端流畅美观的应用软件
svg-net/SVG
Fork of the ms svg library
FortuneN/FineCodeCoverage
Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)
Version Downloads Last updated
4.2.5 9,634 1/22/2024
4.2.5-release0000 203 1/22/2024
4.2.4 28,741 10/2/2023
4.2.4-release0000 386 10/2/2023
4.2.3 441,553 9/29/2023
4.2.3-release0000 424 9/29/2023
4.2.2 12,460 9/3/2023
4.2.2-release0000 729 8/31/2023
4.2.1 7,766 7/6/2023
4.2.1-release0000 468 7/6/2023
4.2.0 34,485 4/8/2023
4.2.0-release0004 488 4/8/2023
4.2.0-release0000 664 4/8/2023
4.1.4 1,909,105 7/6/2022
4.1.3 82,883 12/21/2021
4.1.2 930 12/21/2021
4.1.1 50,268 9/16/2021
4.1.0 143,092 12/9/2020
4.0.2 2,320 11/23/2020
4.0.0 1,596 11/5/2020
3.0.0 148,826 3/13/2018
2.0.6 440,671 4/29/2015
2.0.5 42,569 10/7/2014
2.0.3 13,784 7/14/2014
2.0.2 22,437 1/24/2014
2.0.1 1,959 1/10/2014
2.0.0 2,345 12/3/2013
1.1.0 47,154 7/20/2012
1.0.10 2,090 4/4/2012
1.0.9 2,075 3/25/2012
1.0.8 2,023 3/19/2012
1.0.7 2,080 3/17/2012
1.0.6 1,959 3/16/2012
1.0.5 2,050 3/11/2012
1.0.4 1,987 3/11/2012
1.0.3 1,986 3/11/2012
1.0.2 1,982 3/10/2012
1.0.1 2,046 3/10/2012