Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
AttributeSelector.h File Reference
#include <optional>
#include "donner/base/Utils.h"
#include "donner/base/element/ElementLike.h"
#include "donner/css/WqName.h"
Include dependency graph for AttributeSelector.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::css::AttributeSelector
 Selectors which match against element attributes, such as a[href^="https://"] or h1[title]. More...
 
struct  donner::css::AttributeSelector::Matcher
 Matcher condition for an attribute selector. 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.
 

Enumerations

enum class  donner::css::AttrMatcher {
  donner::css::Includes ,
  donner::css::DashMatch ,
  donner::css::PrefixMatch ,
  donner::css::SuffixMatch ,
  donner::css::SubstringMatch ,
  donner::css::Eq
}
 For attribute selectors, different match modes are available, which are specified by this enum. More...
 

Functions

std::ostream & donner::css::operator<< (std::ostream &os, AttrMatcher matcher)
 Ostream output operator.
 

Class Documentation

◆ donner::css::AttributeSelector::Matcher

struct donner::css::AttributeSelector::Matcher

Matcher condition for an attribute selector.

This is set when the selector includes a match operator, such as ^= or =, and includes a string and an optional case-insensitive flag.

For a standard case-sensitive matcher, this appears in the source as:

[attr="value"]

For a case-insensitive matcher, an "i" suffix is added:

[attr="value" i]
Collaboration diagram for donner::css::AttributeSelector::Matcher:
[legend]
Class Members
bool caseInsensitive = false Whether to match case-insensitively.
AttrMatcher op The match operator.
RcString value The value to match against.