Parse a CSS declaration list, which can be either from an HTML/SVG style attribute, or from the list of component values from within a rule.
More...
#include "donner/css/parser/DeclarationListParser.h"
|
| static std::vector< DeclarationOrAtRule > | Parse (std::string_view str) |
| | Parse a HTML/SVG style attribute, corresponding to a CSS <declaration-list>.
|
| static std::vector< Declaration > | ParseOnlyDeclarations (std::string_view str) |
| | Parse a HTML/SVG style attribute, corresponding to a CSS <declaration-list>, but only returns the list of declarations, skipping any at-rules when parsing.
|
| static std::vector< Declaration > | ParseRuleDeclarations (std::span< ComponentValue > components) |
| | Parse a list of component values, from a Rule definition, corresponding to a CSS <declaration-list>.
|
Parse a CSS declaration list, which can be either from an HTML/SVG style attribute, or from the list of component values from within a rule.
For example, the following is a valid declaration list:
color: red; background-color: blue; font-size: 12px;
◆ Parse()
| std::vector< DeclarationOrAtRule > donner::css::parser::DeclarationListParser::Parse |
( |
std::string_view | str | ) |
|
|
static |
Parse a HTML/SVG style attribute, corresponding to a CSS <declaration-list>.
- Parameters
-
- Returns
- Parsed declaration list.
◆ ParseOnlyDeclarations()
| std::vector< Declaration > donner::css::parser::DeclarationListParser::ParseOnlyDeclarations |
( |
std::string_view | str | ) |
|
|
static |
Parse a HTML/SVG style attribute, corresponding to a CSS <declaration-list>, but only returns the list of declarations, skipping any at-rules when parsing.
- Parameters
-
- Returns
- Parsed declaration list.
◆ ParseRuleDeclarations()
| std::vector< Declaration > donner::css::parser::DeclarationListParser::ParseRuleDeclarations |
( |
std::span< ComponentValue > | components | ) |
|
|
static |
Parse a list of component values, from a Rule definition, corresponding to a CSS <declaration-list>.
- Parameters
-
| components | List of component values. |
- Returns
- Parsed declaration list.
The documentation for this class was generated from the following files: