Donner SVG main
0.8.0 ยท 766e862a0.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
Declaration.h File Reference
#include <cstddef>
#include <cstdint>
#include <ostream>
#include <span>
#include <string>
#include <variant>
#include <vector>
#include "donner/base/RcString.h"
#include "donner/css/Rule.h"
#include "donner/css/VariableSubstitution.h"
Include dependency graph for Declaration.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::css::Declaration
 A declaration is a CSS name/value pair, such as color: red;. More...
struct  donner::css::Declaration::AuthoredLayout
 Offsets relative to the declaration name. They survive relocation of an untouched rule. More...
struct  donner::css::DeclarationOrAtRule
 Return value of parsers that may return either a declaration or an AtRule, specifically donner::css::parser::DeclarationListParser::Parse. More...
struct  donner::css::StyleDeclarationEofClosure
 The source edit that makes an implicitly closed declaration safe to extend. More...

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.
namespace  donner::css
 Donner CSS library, a standalone composable CSS parser.

Functions

StyleDeclarationEofClosure donner::css::closeStyleDeclarationAtEof (const Declaration &declaration, std::string_view spelling)
 Finish the trailing constructs recovered at EOF before adding another declaration.
std::string donner::css::mergeStyleDeclarations (std::span< const Declaration > existing, std::span< const Declaration > updates, std::span< const std::string_view > existingSpellings={}, std::span< const std::string_view > updateSpellings={})
 Merge two sets of CSS declarations, where updates override declarations in existing that have the same property name (case-insensitive).

Class Documentation

◆ donner::css::Declaration::AuthoredLayout

struct donner::css::Declaration::AuthoredLayout

Offsets relative to the declaration name. They survive relocation of an untouched rule.

Class Members
size_t colonEnd = 0
size_t end = 0
size_t importantStart = 0

◆ donner::css::StyleDeclarationEofClosure

struct donner::css::StyleDeclarationEofClosure

The source edit that makes an implicitly closed declaration safe to extend.

Class Members
bool removeTrailingEscape = false Drop a reverse solidus ignored at string EOF.
string suffix Explicit closers in innermost-to-outermost order.