Table of Contents

Namespace Egami.Css

Classes

CssCalc

A length, percentage or number that may be a math function: calc() with + - * / and parentheses, and min(), max() and clamp() (CSS Values 4), nested freely. A plain length or number parses too, so a consumer can handle every <length-percentage> the same way. Resolve(Func<CssUnit, double>) turns it into pixels once the consumer knows what each unit is worth.

CssCascade

The cascade (CSS Cascade 5, without animations, transitions and cascade layers): finds the declarations that apply to an element (or, for @page rules, a page) and picks the winner for each property.

CssCascadeOptions

Options for building a CssCascade.

CssCascadedStyle

The cascaded style of an element: the winning declaration of each property, with its origin.

CssComponentValue

A CSS Syntax 3 component value: a preserved token, a function or a simple block. Declarations, preludes and values are lists of these. ToString() serializes back to CSS text.

CssComputedStyle

An element's computed style, as far as CSS defines it generically: CSS-wide keywords resolved, inheritance applied, custom properties and var() substituted. Values stay component values; the consumer parses each property by its type (and resolves relative units, percentages and currentcolor).

CssDeclaration

A CSS declaration: a property name, its value as component values, and whether it is !important.

CssFont

The font shorthand (CSS Fonts 4), parsed.

CssFontFace

The descriptors of an @font-face rule (CSS Fonts 4), parsed. Invalid descriptors keep their defaults.

CssFontFaceRule

An @font-face rule.

CssFontFamilyList

A font-family value: family names (quoted, or unquoted identifier sequences) and generic families.

CssFontSource

One source of an @font-face src descriptor: a URL with its format and technologies, or a local font.

CssFunction

A function: its name and its arguments up to the closing parenthesis.

CssImportRule

An @import rule. Egami.Css does not fetch it: the consumer may load the sheet and pass it to the cascade.

CssLayerRule

An @layer rule: a statement naming layers, or a block of rules. Cascade layers are not implemented: the cascade treats the rules inside a layer block as ordinary rules in their place.

CssMatrixTransform

matrix(a, b, c, d, e, f).

CssMediaContext

The environment media queries are evaluated against: the media type, the viewport and the user's preferences.

CssMediaQueryList

A media query list (Media Queries 4), such as screen and (min-width: 600px), print.

CssMediaRule

An @media rule: rules that apply when the media query list matches.

CssNamespaceRule

An @namespace rule: a prefix (or the default namespace) for selectors.

CssNamespaces

The namespace prefixes selectors may use (svg|rect, [xlink|href]) and the default namespace for type selectors, as @namespace rules declare them. Prefixes are case-sensitive.

CssPageMarginRule

A page-margin rule inside @page, such as @bottom-center { content: counter(page) }.

CssPageRule

An @page rule (CSS Paged Media 3): page selectors, the declarations for the page context (size, margin, padding, border, background, inherited text properties) and its page-margin rules.

CssPageSelector

One selector of an @page rule, such as chapter:first.

CssPageStyle

The cascaded style of one page: the page context's winning declarations and those of each page-margin box any rule styles. Compute the page context with the root element's computed style as its parent, and each margin box with the page context's computed style as its parent.

CssParseError

A problem found while parsing CSS. Parsing recovers as CSS Syntax 3 says and goes on.

CssParseOptions

Options for parsing CSS.

CssPropertyDefinition

A longhand property the cascade knows: whether it inherits, its initial value, and optionally how to validate a value.

CssPropertyRegistry

The properties the cascade knows. CreateDefault() gives the common text properties of CSS; consumers add their own, such as Egami.Svg's fill and stroke. Unregistered properties cascade too, as non-inherited properties without an initial value. Do not change a registry while a cascade built from it is in use.

CssRotateTransform

rotate(angle), or SVG's rotate(angle cx cy) about a center.

CssRule

A rule of a style sheet.

CssScaleTransform

scale(), scaleX() or scaleY() (percentages are converted to factors).

CssSelector

One complex selector of a selector list, such as svg|g > rect.highlight:first-child.

CssSelectorList

A selector list (Selectors 4), such as a style rule's prelude or the argument of querySelectorAll.

CssShorthandDefinition

A shorthand property: its longhands and how to expand a value into them.

CssSimpleBlock

A simple block: content between matching (), [] or {}.

CssSkewTransform

skew(), skewX() or skewY().

CssStyleRule

A style rule: a selector list and declarations, such as rect.a { fill: red }.

CssStyleSheet

A parsed CSS style sheet (CSS Syntax 3 "parse a stylesheet", with the rules CSS defines interpreted).

CssSupportsRule

An @supports rule: rules that apply when the condition holds.

CssTokenValue

A token kept as a component value: any token other than a function or an opening bracket.

CssTokenizer

The CSS Syntax 3 tokenizer (section 4), with its input preprocessing.

CssTransformFunction

One transform function of a CssTransformList.

CssTransformList

A CSS transform value (CSS Transforms 1), or SVG's transform attribute: a list of transform functions applied left to right, as nested coordinate systems.

CssTranslateTransform

translate(), translateX() or translateY().

CssUnknownAtRule

An at-rule Egami.Css does not interpret, such as @keyframes or @counter-style, kept as component values.

CssUnsupportedTransform

A 3D transform function (such as rotateX() or matrix3d()) that parsed but a 2D renderer cannot apply.

Structs

CssAngle

An angle, converted to degrees from deg, grad, rad or turn.

CssAttribute

An attribute of an element, as Attributes lists it.

CssColor

A CSS color (CSS Color 4) converted to sRGB: red, green, blue and alpha from 0 to 1, gamma-encoded, clipped to the sRGB gamut; or currentcolor.

CssFontFamily

One entry of a font family list: a family name or a generic family keyword.

CssFontWeight

A font-weight value.

CssLength

A length (or percentage, or unitless number) with its unit, such as 12px or 50%.

CssPage

A page being laid out, as page selectors see it: its page type (the page property of the content that starts it) and whether it is the first, a left or a blank page.

CssPageSize

The size descriptor of @page (CSS Paged Media 3 section 7.1): auto, one or two lengths, or a page size name such as A4 or letter with an optional orientation.

CssRange

A range of numbers, such as a weight range 100 900; a single value has equal ends.

CssSpecificity

A selector's specificity (Selectors 4): IDs, then classes, attributes and pseudo-classes, then types and pseudo-elements.

CssToken

One CSS token, with its position in the source.

CssTransformOrigin

A transform-origin value.

CssUnicodeRange

A range of code points from unicode-range, such as U+0000-00FF.

CssUrl

A URL from url(...) (quoted or not) or src(...).

Interfaces

ICssElement

An element that selectors match against: implemented by a document tree such as Egami.Svg's or an HTML DOM.

Enums

CssFontWeightKind

How a CssFontWeight was given.

CssMarginBox

The sixteen page-margin boxes around a page's content (CSS Paged Media 3 section 5.1), clockwise from the top left.

CssOrigin

The origin of a style sheet in the cascade.

CssPageOrientation

Whether a page size asks for portrait or landscape pages.

CssPagePseudoClasses

The page pseudo-classes a page selector tests (CSS Paged Media 3 section 4.3).

CssTokenKind

The kinds of token the CSS Syntax 3 tokenizer produces.

CssUnit

CSS length units (CSS Values 4), plus None for a unitless number and Percent.