Docs · API reference · Motus.Abstractions

StylesheetCoverage Class#

CSS coverage data for a single stylesheet URL, aggregated across all sessions. Note: Source is included beyond the spec because line-level computation requires the source text.

public sealed record StylesheetCoverage : System.IEquatable<Motus.Abstractions.StylesheetCoverage>

Inheritance System.Object → StylesheetCoverage

Implements System.IEquatable<StylesheetCoverage>

Constructors#

StylesheetCoverage(string, string, IReadOnlyList<CssRuleUsage>, FileCoverageStats) Constructor#

CSS coverage data for a single stylesheet URL, aggregated across all sessions. Note: Source is included beyond the spec because line-level computation requires the source text.

public StylesheetCoverage(string Url, string Source, System.Collections.Generic.IReadOnlyList<Motus.Abstractions.CssRuleUsage> Rules, Motus.Abstractions.FileCoverageStats Stats);

Parameters#

Url System.String

The stylesheet URL (or stylesheet ID when no URL is available).

Source System.String

Full stylesheet source text.

Rules System.Collections.Generic.IReadOnlyList<CssRuleUsage>

Per-rule usage entries.

Stats FileCoverageStats

Rule-level coverage stats (Used rules / total rules).

Properties#

Rules Property#

Per-rule usage entries.

public System.Collections.Generic.IReadOnlyList<Motus.Abstractions.CssRuleUsage> Rules { get; init; }

Property Value#

System.Collections.Generic.IReadOnlyList<CssRuleUsage>

Source Property#

Full stylesheet source text.

public string Source { get; init; }

Property Value#

System.String

Stats Property#

Rule-level coverage stats (Used rules / total rules).

public Motus.Abstractions.FileCoverageStats Stats { get; init; }

Property Value#

FileCoverageStats

Url Property#

The stylesheet URL (or stylesheet ID when no URL is available).

public string Url { get; init; }

Property Value#

System.String