about summary refs log tree commit diff stats
path: root/src/css/sheet.nim
Commit message (Collapse)AuthorAgeFilesLines
* sheet: dedupe tag :is hashesbptato2025-01-171-1/+2
|
* cascade: basic CSS variable supportbptato2025-01-161-14/+11
| | | | | | | | | | | and once again, there was light... Well, it barely works, but it's enough to get colors back on most sites. Nested variables aren't supported for now, and shorthand expansion only "works" for `background' (it's a hack). Props to the W3C for introducing the C preprocessor to CSS - I was starting to confuse it with JSSS after calc().
* sheet, selectorparser: fix attr hashing, hash multiple tags in :isbptato2025-01-161-16/+17
|
* css: refactor selector parsing & cascading, some work on variablesbptato2025-01-141-16/+30
| | | | | | | | | Untangled some nested arrays to reduce the number of intermediary seqs in cascade, and collapsed the two rule def sorts into just one (per pseudo element). This should make cascading somewhat faster. Also, we now parse variables, but they aren't resolved yet. Probably a seq won't cut it for var lookup...
* cssvalues, sheet: fix quotes parsing, misc cleanupbptato2025-01-121-4/+2
|
* mediaquery: add serializationbptato2025-01-061-4/+2
| | | | also, reduce the number of types named MediaQueryList by 50%
* css: resolve units to px before layoutbptato2024-12-161-19/+23
| | | | Lets us skip a couple pointless multiplications/divisions during layout.
* dom, css: fix case-insensitive class/id/attr matchingbptato2024-12-151-1/+1
| | | | Uses an additional lower-case map for O(1) case-insensitive comparisons.
* cssparser: misc cleanupbptato2024-12-071-1/+1
| | | | another case of "the object model was unnecessarily complex"
* sheet, mediaquery: misc cleanupbptato2024-12-011-1/+1
|
* dom: add support for @importbptato2024-12-011-22/+41
| | | | only the most basic form; no media queries yet
* cssparser: fix parsing of unrecognized at rulesbptato2024-11-021-3/+2
| | | | + clean up a bit
* cssvalues, sheet: fix some more case sensitivity bugsbptato2024-08-021-3/+2
|
* css: hash attribute namesbptato2024-07-291-41/+34
|
* css: slightly optimize cascadebptato2024-06-021-12/+24
| | | | Parse rule values in sheet addRule, not during cascade.
* cssparser: refactorbptato2024-05-011-12/+9
| | | | | | | | | * factor out skipWhitespace * remove streams dependency (cssparser could never stream without blocking the event loop, so we were just passing a StringStream in all cases, which made the whole streaming pointless.)
* Update code stylebptato2024-04-171-24/+18
| | | | | | * separate params with ; (semicolon) instead of , (colon) * reduce screaming snake case use * wrap long lines
* dom: atomize id, name, DOMTokenListbptato2024-02-081-57/+60
|
* Update chamebptato2024-02-071-25/+35
| | | | | | | | * Update chame to the latest version * Get rid of nodeType usage * Add atoms * Re-implement DOM attributes * document.write
* Use std/* imports everywherebptato2024-01-071-3/+3
|
* css/sheet: skip media queries without blocksbptato2024-01-041-0/+3
| | | | Without this, media queries without a block would crash the buffer.
* sheet: fix overflow in addAtRulebptato2023-12-091-1/+1
| | | | It is enough to just take the len of children there.
* sheet: fix a correctness issue, misc refactoringsbptato2023-12-091-49/+61
| | | | | | | * Fix a bug where rules would be sorted incorrectly if retrieved from the cache. * Use withValue where possible * camelCase some variables, de-extern some functions, etc.
* reduce new() usagebptato2023-10-251-4/+5
|
* Move HTML parsing into Chamebptato2023-08-151-1/+2
| | | | Operation "modularize Chawan somewhat" part 2
* css: very minor optimizationsbptato2023-07-281-14/+10
| | | | probably insignificant overall
* css: handle unknown tag names correctlybptato2023-07-251-1/+1
| | | | | | Instead of grouping all of them into TAG_UNKNOWN, match their tag names. To-do: this implementation is not very efficient.
* WIP selector rewritebptato2023-01-271-19/+18
| | | | pretty slow for some reason
* css: fix some bugs and improve cascading a bitbptato2022-12-291-1/+1
|
* Use more accurate selector terminologybptato2022-08-231-4/+9
|
* Merge functional and normal pseudo-class selectorsbptato2022-08-211-10/+10
| | | | And parse An+B syntax for nth-child/nth-last-child.
* Refactor css function selectors a bitbptato2022-08-201-1/+1
|
* Update CSS tokenizerbptato2022-07-291-2/+1
| | | | It was slightly outdated and in many places incorrect.
* Rename conflicting source filesbptato2022-05-101-2/+2
| | | | Nim can't really differentiate between them, unfortunately.
* Some loader polishingbptato2022-02-091-0/+1
|
* Optimize :is selectorbptato2022-01-301-1/+51
|
* Remove some unused declarationsbptato2022-01-241-1/+0
|
* Optimize cascading algorithmbptato2022-01-241-2/+98
|
* Small cascade optimizationsbptato2021-12-311-3/+6
|
* Cascade optimizations, start layout engine rewritebptato2021-12-291-1/+1
|
* Implement basic media query supportbptato2021-12-271-25/+27
|
* Refactor buffer rendering proceduresbptato2021-12-231-0/+3
|
* Preparation for at rules, small inline-block fixbptato2021-12-191-0/+46