crater-css

CSS parser, selector, cascade, and computed style engine for crater

moon add mizchi/crater-css@0.17.1
Download zip
Author
Version
0.17.1
License
Apache-2.0
Last updated
3 months ago
Downloads
56

Dependencies

README

mizchi/crater-css does not have a README file

#
Attribute

Attribute value on an element

#
AttributeMatch

Attribute matching mode

#
AttributeSelector

Attribute selector

#
CSSRule

A CSS rule: selector + declarations

#
CascadedValues

Cascaded values for an element Maps property names to their winning declaration

#
ColorScheme

Color scheme preference

#
Combinator

Combinator between compound selectors

#
ComplexSelector

Complex selector - compound selectors joined by combinators e.g., div > p.intro + span

#
ComplexSelectorStep

A step in a complex selector: combinator + compound selector

#
CompoundSelector

Compound selector - a sequence of simple selectors without combinator e.g., div.foo#bar:hover

#
ComputeContext

Computed values context for resolving relative units

#
CssColorValue

Result of parsing a CSS color value

#
Declaration

A CSS declaration with cascade metadata

#
Diagnostic

A single diagnostic entry

#
DiagnosticSummary

Summary statistics for diagnostics

#
DiagnosticsCollector

Collector for CSS diagnostics

#
Element

Element data for selector matching This is a concrete type that can be used with or without a real DOM

#
ForcedPseudoStates

#
Importance

Importance of a declaration

#
IndexedStylesheet

Indexed stylesheet for fast matching

#
MediaEnvironment

Environment for evaluating media queries

#
MediaFeature

Media feature (e.g., width, height, color, etc.)

#
MediaQuery

A complete media query

#
MediaQueryList

A list of media queries (comma-separated in CSS)

#
MediaType

Media type (screen, print, all, etc.)

#
MediaValue

Media feature value

#
NthExpr

Nth expression: An+B

#
Origin

Origin of a CSS declaration Ordered from lowest to highest precedence for normal declarations

#
ParseResult

Parse result with diagnostics

#
PropertyValue

A CSS property value that can be a specific value or a keyword

#
PseudoClass

Pseudo-class selector

#
PseudoElement

Pseudo-element selector

#
RangeOp

Comparison operator for range queries

#
RelativeSelector

Relative selector for :has()

#
RuleMatch

Collect declarations from matching rules for an element This is a helper to build the input for cascade()

#
SelectorIndex

Index for fast rule lookup Rules are indexed by the rightmost compound selector's:
  • ID selectors
  • Class selectors
  • Tag name
  • Universal selectors (matched against all elements)

#
SelectorList

Selector list - comma-separated selectors

#
Severity

Severity level for diagnostics

#
SimpleSelector

Simple selector - a single component

#
Specificity

Specificity as (a, b, c) tuple a: ID selectors count b: class selectors, attribute selectors, pseudo-classes count c: type selectors, pseudo-elements count

#
Stylesheet

A stylesheet: collection of rules

#
SupportLevel

Support level for a CSS property

#
affects_layout

#
apply_property_direct

#
compute_inline_raw

#
compute_inline_style

#
matches_selector_list

#
parse_color

#
parse_inline_style

fn parse_inline_style(css : String) ->
Style

#
parse_media_query_list

fn parse_media_query_list(input : String) ->
MediaQueryList

#
parse_selector

#
parse_selector_list

fn parse_selector_list(css : String) ->
SelectorList
?

#
parse_stylesheet

fn parse_stylesheet(css : String) ->
Stylesheet

#
parse_stylesheet_with_diagnostics

fn parse_stylesheet_with_diagnostics(css : String) ->
ParseResult

Source Files

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io