|
|
Donner
C++20 SVG rendering library
|
Rule-related parsing routines, including parsing individual rules, lists of rules, and stylesheets. More...
#include "donner/css/parser/RuleParser.h"
Static Public Member Functions | |
| static std::vector< Rule > | ParseStylesheet (std::string_view str) |
| Parse a CSS stylesheet into a list of rules, per https://www.w3.org/TR/css-syntax-3/#parse-stylesheet. | |
| static std::vector< Rule > | ParseListOfRules (std::string_view str) |
| Parse a list of rules, per https://www.w3.org/TR/css-syntax-3/#parse-list-of-rules. | |
| static std::optional< Rule > | ParseRule (std::string_view str) |
| Parse a rule, per https://www.w3.org/TR/css-syntax-3/#parse-rule. | |
Rule-related parsing routines, including parsing individual rules, lists of rules, and stylesheets.
|
static |
Parse a list of rules, per https://www.w3.org/TR/css-syntax-3/#parse-list-of-rules.
| str | Input list of rules string. |
|
static |
Parse a rule, per https://www.w3.org/TR/css-syntax-3/#parse-rule.
| str | Input rule string. |
|
static |
Parse a CSS stylesheet into a list of rules, per https://www.w3.org/TR/css-syntax-3/#parse-stylesheet.
NOTE: This does not parse selectors, in most cases you should use StylesheetParser instead which handles selectors and returns a Stylesheet object to match against.
| str | Input stylesheet string. |