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 constexpr std::size_t | kMaximumDeclarations = 4096 |
| | Maximum declarations or at-rules retained from one declaration list.
|
|
static constexpr std::size_t | kMaximumComponentValues = 64 * 1024 |
| | Maximum component values parsed across one 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;
◆ donner::css::parser::DeclarationListParser::SecurityStats
| struct donner::css::parser::DeclarationListParser::SecurityStats |
| Class Members |
|
size_t |
componentValues = 0 |
|
|
size_t |
declarations = 0 |
|
|
bool |
rejected = false |
|
◆ Parse()
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, |
|
|
SecurityStats * | securityStats = nullptr ) |
|
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()
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 file: