Luce packages
LuceLuce BaseLuciaOS

dymokomi/luce-browser-css

CSS Syntax Level 3 below the object model (tokenizer, tokens, component values) and the generated CSS data tables, from Ladybird's LibWeb, in luce-base.

A library written in luce-base. Latest release 0.5.1.

Install#

luc add dymokomi/luce-browser-css

Documentation#

luce-browser-css

CSS Syntax Level 3 below the object model (tokenizer, tokens, component values) and the generated CSS data tables, from Ladybird's LibWeb, in luce-base.

Part of the luce-browser family, a faithful port of Ladybird's LibWeb to luce-base; the design every porter follows is DESIGN.md.

ModuleContents
css_syntaxCSS tokenizer, tokens, component values
css_datagenerated CSS data: properties, keywords, enums, units, descriptors, media features, pseudo-classes and -elements, transform functions

Depends on: luce-std, luce-browser-foundation.

Status

Skeleton: every type of the phase-1 closure is declared and every function has its generated signature and a trap("unported: ...") body, grouped by region (docs/regions.tsv). Regions replace their stub fragments with ported code (DESIGN.md ยง4.5). docs/namemap.tsv maps every C++ name to its Luce name; docs/gc_fields.tsv lists the GC pointer fields each cell must visit.

The skeleton is generated from Ladybird at 47c82b38d0 (see PIN) by a local tool that is not part of this repository.

css_data is generated by tools/gen_css, a Luce port of Ladybird's generate_libweb_css_*.py generators, from Ladybird's JSON files in data/css (see docs/regions/r12c.md).

Testing

./test.sh type-checks every module and runs the unit tests of css_syntax (the CSS tokenizer corpora in tests/, TestCSSTokenStream and focused cases) and css_data. It also regenerates css_data's generated fragments and compares them with the committed ones, and compares everything css_data answers with a dump of Ladybird's generated C++ (tests/css_data_dump, tests/data/).

License

BSD-2-Clause, as Ladybird; see LICENSE.

Dependencies#

Versions#

0.5.1

Browse source · pack · commit 533465a06eaa

SHA-256 9d5a8c29ba0e2a27545efe9f4c25c636cb05847ac8b33234c05f81c871df7e00

tools use collections.Buffer; dependencies name no version