NovaSVG 0.11.5
An SVG library
Loading...
Searching...
No Matches
nova::svg::css_query Class Referenceabstract

#include <foreign_object.h>

Public Member Functions

virtual ~css_query ()=default
virtual std::optional< css_declaration > declared (const std::vector< html_tag > &nodes, int index, std::string_view property) const =0

Detailed Description

The document's CSS, for markup the document did not parse itself. A selector reaches through the foreignObject into the svg around it (mermaid's .section-0 span { color: black }), so the answer depends on the svg ancestors of the foreignObject, which only the document knows.

Definition at line 65 of file foreign_object.h.

Constructor & Destructor Documentation

◆ ~css_query()

virtual nova::svg::css_query::~css_query ( )
virtualdefault

Member Function Documentation

◆ declared()

virtual std::optional< css_declaration > nova::svg::css_query::declared ( const std::vector< html_tag > & nodes,
int index,
std::string_view property ) const
pure virtual

The declaration of property ("color", "background-color", ...) that wins for nodes[index] among the document's style sheets, or nothing. Declarations in a style="" attribute are not included: they are in the markup, the renderer reads them (they beat any rule unless !important).


The documentation for this class was generated from the following file: