libwebsockets/lib/misc/css-lextable-strings.txt
Andy Green 63d2f844db lhp: Lightweight HTML Parser
Introduce a very lightweight html5 + css2.1+ stateful stream parser, along
the same lines as the lws json and cbor ones.

This is interesting primarily because of just how low-resource it is for
modest css + html, it uses an lwsac to hold the entirity of the css in
memory at once but the html is parsed in chunks without any need to keep
previous chunks around (chunks may be as small as 1 byte).

A user callback receives element entry and exit callbacks with payload and
all attributes parsed out, CSS related to the active element stack is
parsed to provide a list of active css attributes, which takes heap for the
duration of the parsing.

In effect this provides rich information about the html and css state to
the callback, which has the job of producing the layout in a user-defined
way.

As such, there is no DOM in memory at one time, there is only a stack of
active elements like <html><body><div>xxx with their associated attributes
(like class).  So as it is, it does not support DOM modification such as
JS changing elements after parsing, although elements with interesting IDs
could be kept around by the callback.  There is a corresponding tiny and
relatively flat heap usage regardless of html size.

Default CSS is specified as recommended in the CSS 2.1 standard.

Inline <style></style> elements are supported, but not pre-html5 style= in
element attributes, since these are incompatible with strict CSP.

What the attributes should mean on your system, eg, font-size, font-family
etc is left for the user callback to decide, along with how to lay out the
items using the CSS attributes, and render them.

Fixed point 32.32 constants are used (fraction expressed at parts in 100M)
instead of floating point.

If you have presentation needs, even on a constrained display on a
constrained microcontroller, this makes it feasible to use standardized
markup and styling instead of roll your own.
2022-05-04 08:43:26 +01:00

121 lines
1.6 KiB
Plaintext

azimuth:
background-attachment:
background-color:
background-image:
background-position:
background-repeat:
background:
border-collapse:
border-color:
border-spacing:
border-style:
border-top:
border-right:
border-bottom:
border-left:
border-top-color:
border-right-color:
border-bottom-color:
border-left-color:
border-top-style:
border-right-style:
border-bottom-style:
border-left-style:
border-top-width:
border-right-width:
border-bottom-width:
border-left-width:
border-width:
border-top-left-radius:
border-top-right-radius:
border-bottom-left-radius:
border-bottom-right-radius:
border-radius:
border:
bottom:
caption-side:
clear:
clip:
color:
content:
counter-increment:
counter-reset:
cue-after:
cue-before:
cue:
cursor:
direction:
display:
elevation:
empty-cells:
float:
font-family:
font-size:
font-style:
font-variant:
font-weight:
font:
height:
left:
letter-spacing:
line-height:
list-style-image:
list-style-position:
list-style-type:
list-style:
margin-right:
margin-left:
margin-top:
margin-bottom:
margin:
max-height:
max-width:
min-height:
min-width:
orphans:
outline-color:
outline-style:
outline-width:
outline:
overflow:
padding-top:
padding-right:
padding-bottom:
padding-left:
padding:
page-break-after:
page-break-before:
page-break-inside:
pause-after:
pause-before:
pause:
pitch-range:
pitch:
play-during:
position:
quotes:
richness:
right:
speak-header:
speak-numeral:
speak-punctuation:
speak:
speech-rate:
stress:
table-layout:
text-align:
text-decoration:
text-indent:
text-transform:
top:
unicode-bidi:
vertical-align:
visibility:
voice-family:
volume:
white-space:
widows:
width:
word-spacing:
z-index: