ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_css_rule_t Struct Reference

One selector { ... } rule: a (possibly descendant) selector plus its declarations. More...

#include <reflow_css.h>

Collaboration diagram for ra8_css_rule_t:

Data Fields

uint8_t sel_tag
 Type tag, or k_reflow_tag_unknown = no type.
uint8_t anc_count
 Ancestor parts in anc (0 = simple).
uint16_t class_off
 Class name slice offset (class_len 0 = none).
uint16_t class_len
 Class name slice length, bytes.
uint16_t id_off
 Id name slice offset (id_len 0 = none).
uint16_t id_len
 Id name slice length, bytes.
uint16_t order
 Source order (lower = earlier; ties to later).
ra8_css_anc_t anc [k_ra8_css_max_anc]
 Descendant ancestor parts.
ra8_css_style_t decl
 Declared properties.

Detailed Description

One selector { ... } rule: a (possibly descendant) selector plus its declarations.

The SUBJECT is a compound of up to one type + one class + one id constraint (e.g. p, .note, #x, p.note, p#x); an element matches when every present constraint matches. A constraint is "present" when its field is non-default: sel_tag != k_reflow_tag_unknown, class_len > 0, id_len > 0. No constraint at all (*) matches every element.

A DESCENDANT selector (div p, .chapter p, .a .b, #id p) adds up to k_ra8_css_max_anc ancestor compounds in anc (selector order, outermost first); the rule matches only when the subject matches AND each ancestor part matches some element on the open-element ancestor stack, in order (the CSS descendant combinator – any depth between parts). Specificity sums every part. Multiple classes per compound (.a.b), child/sibling combinators and pseudo selectors are still not parsed (the rule is dropped).

Definition at line 173 of file reflow_css.h.

Field Documentation

◆ anc

ra8_css_anc_t ra8_css_rule_t::anc[k_ra8_css_max_anc]

Descendant ancestor parts.

Definition at line 181 of file reflow_css.h.

Referenced by internal_parse_complex_selector(), internal_rule_matches_ctx(), and internal_rule_rank().

◆ anc_count

uint8_t ra8_css_rule_t::anc_count

Ancestor parts in anc (0 = simple).

Definition at line 175 of file reflow_css.h.

Referenced by internal_parse_complex_selector(), internal_rule_matches_ctx(), and internal_rule_rank().

◆ class_len

uint16_t ra8_css_rule_t::class_len

Class name slice length, bytes.

Definition at line 177 of file reflow_css.h.

Referenced by internal_parse_complex_selector(), internal_parse_sel_part(), internal_rule_rank(), and ra8_css_rule_matches().

◆ class_off

uint16_t ra8_css_rule_t::class_off

Class name slice offset (class_len 0 = none).

Definition at line 176 of file reflow_css.h.

Referenced by internal_parse_complex_selector(), internal_parse_sel_part(), and ra8_css_rule_matches().

◆ decl

ra8_css_style_t ra8_css_rule_t::decl

Declared properties.

Definition at line 182 of file reflow_css.h.

Referenced by internal_parse_selector_list(), and internal_resolve().

◆ id_len

uint16_t ra8_css_rule_t::id_len

Id name slice length, bytes.

Definition at line 179 of file reflow_css.h.

Referenced by internal_parse_complex_selector(), internal_parse_sel_part(), internal_rule_rank(), and ra8_css_rule_matches().

◆ id_off

uint16_t ra8_css_rule_t::id_off

Id name slice offset (id_len 0 = none).

Definition at line 178 of file reflow_css.h.

Referenced by internal_parse_complex_selector(), internal_parse_sel_part(), and ra8_css_rule_matches().

◆ order

uint16_t ra8_css_rule_t::order

Source order (lower = earlier; ties to later).

Definition at line 180 of file reflow_css.h.

Referenced by internal_push_rule(), and internal_resolve().

◆ sel_tag

uint8_t ra8_css_rule_t::sel_tag

Type tag, or k_reflow_tag_unknown = no type.

Definition at line 174 of file reflow_css.h.

Referenced by internal_parse_complex_selector(), internal_parse_sel_type(), internal_rule_rank(), and ra8_css_rule_matches().


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