Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
donner::css::Stylesheet Class Reference

A CSS stylesheet, which is a list of rules. More...

#include "donner/css/Stylesheet.h"

Public Member Functions

 Stylesheet ()=default
 Default constructor.
 
 Stylesheet (std::vector< SelectorRule > &&rules)
 Construct a stylesheet from a list of rules.
 
 Stylesheet (const Stylesheet &)=default
 Copy constructor.
 
Stylesheetoperator= (const Stylesheet &)=default
 Copy assignment operator.
 
 Stylesheet (Stylesheet &&) noexcept=default
 Move constructor.
 
Stylesheetoperator= (Stylesheet &&) noexcept=default
 Move assignment operator.
 
 ~Stylesheet ()=default
 Destructor.
 
std::span< const SelectorRulerules () const
 Get the list of rules in this stylesheet.
 

Friends

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

Detailed Description

A CSS stylesheet, which is a list of rules.

This is created by the parser, from the CSS::ParseStylesheet() API.

Examples
custom_css_parser.cc.

Constructor & Destructor Documentation

◆ Stylesheet()

donner::css::Stylesheet::Stylesheet ( std::vector< SelectorRule > && rules)
inlineexplicit

Construct a stylesheet from a list of rules.

Parameters
rulesList of rules, ownership is taken.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const Stylesheet & stylesheet )
friend

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

Parameters
osOutput stream.
stylesheetStylesheet to output.

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