Donner 0.8.0-pre
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
donner::css::SelectorRule Struct Reference

A rule in a stylesheet, which consists of a selector and a list of declarations. More...

#include "donner/css/Stylesheet.h"

Collaboration diagram for donner::css::SelectorRule:
[legend]

Public Attributes

Selector selector
 Selector for this rule.
std::vector< Declarationdeclarations
 Declarations for this rule.
SourceRange ruleSourceRange
 Rule range in local CSS source.
SourceRange selectorSourceRange
 Full selector range in local CSS source.
std::vector< SourceRangeselectorEntrySourceRanges
 Per-entry selector ranges in local CSS source.

Friends

std::ostream & operator<< (std::ostream &os, const SelectorRule &rule)
 Output a human-readable representation of the delector to a stream.

Detailed Description

A rule in a stylesheet, which consists of a selector and a list of declarations.

For example, the following is a valid rule:

path.withColor {
fill: red;
stroke: blue;
}

The selector is path.withColor, and the declarations are fill: red and stroke: blue.

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const SelectorRule & rule )
friend

Output a human-readable representation of the delector to a stream.

Parameters
osOutput stream.
ruleSelectorRule to output.

Member Data Documentation

◆ ruleSourceRange

SourceRange donner::css::SelectorRule::ruleSourceRange
Initial value:
static FileOffset Offset(size_t offset)
Create a FileOffset for a single-line string.
Definition FileOffset.h:36

Rule range in local CSS source.

◆ selectorSourceRange

SourceRange donner::css::SelectorRule::selectorSourceRange
Initial value:

Full selector range in local CSS source.


The documentation for this struct was generated from the following file: