about summary refs log tree commit diff stats
path: root/src/css/sheet.nim
Commit message (Collapse)AuthorAgeFilesLines
* 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