Skip to main content

Crate css_inspector

Crate css_inspector 

Source
Expand description

Rust-based, suite-driven CSS validator.

This validator is intentionally conservative and focuses on catching issues that are likely to break real-world behavior, rather than aiming to be fully spec-complete.

§Example

use css_inspector::{Config, validate_css_text};

let report = validate_css_text("a { color: red; }", &Config::default()).unwrap();
assert!(report.valid());

Structs§

Config
Configuration options for validation.
Message
Report
StdFetcher

Enums§

Severity
UrlDecodePlusError
ValidatorError

Traits§

Fetcher

Functions§

starts_with_ascii_ci
url_decode_plus
validate_css_declarations_text
Validate a CSS declaration list (e.g. the contents of an HTML style="" attribute).
validate_css_text
Validate a CSS stylesheet passed as text.
validate_css_text_with_fetcher
validate_css_uri_with_fetcher