about summary refs log tree commit diff stats
path: root/src/css
Commit message (Collapse)AuthorAgeFilesLines
* mediaquery: fix logic errorbptato2023-08-141-1/+1
| | | | Not isAscii means we cannot convert to char. Oops.
* css: implement case insensitivitybptato2023-08-102-127/+142
| | | | For some reason I forgot about this.
* Fixes & workarounds to compile on Nim 2.0.0bptato2023-08-012-3/+4
| | | | | | | | | | | | | | * Import punycode, as it has been removed from stdlib. * Fix some syntax errors * Apparently you can no longer compare distinct pointers with nil. Add explicit comparisons with typeof(nil) instead. * htmlparser: rename _ to other, as semantics of _ have changed. (Quite a shame, it looked better with _. Oh well.) * Explicitly specify mm:refc, as the browser OOMs with orc for some reason. Confirmed to compile & run on 2.0.0, 1.6.14, 1.6.12, 1.6.10 and 1.6.8. (<1.6.8 it's broken & wontfix.)
* css: very minor optimizationsbptato2023-07-282-19/+15
| | | | probably insignificant overall
* mediaquery: fix some missing has checks in parserbptato2023-07-281-0/+2
|
* css: handle unknown tag names correctlybptato2023-07-253-5/+16
| | | | | | Instead of grouping all of them into TAG_UNKNOWN, match their tag names. To-do: this implementation is not very efficient.
* mediaquery: better debugging functionsbptato2023-07-231-3/+35
|
* css: fix percentage min/max-width valuesbptato2023-07-231-1/+1
|
* Add StyledNode stringifier for debuggingbptato2023-07-081-0/+14
|
* Fix bug in media-query parsingbptato2023-07-043-12/+36
| | | | This fixes interpretation of "@media (min/max-width: 1234px)".
* Use LayoutUnit in layoutbptato2023-07-042-24/+28
| | | | Reduces ugly rendering caused by rounding errors.
* cascade: remove sugar, add DeclarationListMap typebptato2023-06-291-36/+53
| | | | So we don't have to pass each DeclarationList separately.
* cssparser: remove unused function, cast instead of collectbptato2023-06-291-21/+5
|
* css/values: remove stray eprintbptato2023-06-251-2/+0
|
* cssparser: remove SyntaxErrorbptato2023-06-251-20/+27
| | | | return DOMException instead
* css/values: use Result instead of exceptionsbptato2023-06-252-308/+342
|
* input size as presentational hintbptato2023-06-181-0/+8
|
* Fix various layout bugs, prepare for image supportbptato2023-06-122-6/+9
|
* Use width, height for canvas in cssbptato2023-06-101-1/+1
|
* Add support for visibilitybptato2023-06-071-5/+25
|
* Add support for width, height media querybptato2023-06-073-46/+220
|
* Add support for canvas and multipartbptato2023-06-053-25/+20
| | | | | | | | | | | | | | | Quite incomplete canvas implementation. Crucially, the layout engine can't do much with whatever is drawn because it doesn't support images yet. I've re-introduced multipart as well, with the FormData API. For the append function I've also introduced a hack to the JS binding generator that allows requesting the JSContext pointer in nim procs. Really I should just fix the union generator thing and add support for overloading. In conclusion, for now the only thing canvas can be used for is exporting it as PNG and uploading it somewhere. Also, we now have PNG encoding and decoding too. (Now if only we had sixels as well...)
* css/values: add some stringifiersbptato2023-03-101-4/+13
|
* css/match: fix next sibling selector (+)bptato2023-02-131-2/+2
|
* Remove unused variablebptato2023-01-271-1/+0
|
* WIP selector rewritebptato2023-01-274-451/+365
| | | | pretty slow for some reason
* selectorparser: refactor, fix combinator bugsbptato2023-01-201-79/+79
| | | | Fixes universal selectors after a combinator.
* selectorparser: parse comma correctly in combinatorsbptato2023-01-201-0/+3
|
* css/values: remove equalsbptato2023-01-081-32/+0
| | | | it had zero practical use and was annoying anyways
* css/values: add floatbptato2023-01-081-4/+23
| | | | it does nothing...
* css/cascade, layout/engine: add table alignbptato2023-01-082-5/+17
| | | | Also fix margin-left/right: auto, to some extent.
* selectorparser: do not accept invalid selectorsbptato2023-01-071-44/+78
|
* css/cascade: remove scoped sheetsbptato2023-01-072-34/+2
| | | | ...in favor of handling all style elements like other browsers
* css/values, parser, ...: fix background-imagebptato2023-01-062-8/+44
|
* ua.css: fix color, css/values: fix globalsbptato2023-01-041-1/+8
|
* css/values: consistently use exceptionsbptato2023-01-031-56/+41
| | | | | Options are great, but only if used consistently. This also fixes some weird bugs where exceptions were handled incorrectly.
* css/values: remove todobptato2023-01-031-1/+0
|
* dom: add better attribute reflectionbptato2023-01-021-2/+4
| | | | | Instead of creating a new function for each attribute, use a single magic function for reflected attributes.
* selectorparser: support :link, :visitedbptato2023-01-014-7/+22
| | | | I say "support", but :visited is never matched.
* css/values: apply presentational hints after UA stylebptato2023-01-011-4/+5
| | | | | So that e.g. table valign overrides the user-agent vertical-align value, but still respects user/author style.
* cascade: document a bitbptato2023-01-011-2/+7
|
* css/cascade: fix stylesheets not being copied in <head>bptato2022-12-311-1/+3
|
* selectorparser: accept less invalid selectorsbptato2022-12-311-2/+14
|
* css: fix some bugs and improve cascading a bitbptato2022-12-297-18/+78
|
* css/values: fix length shorthand handlingbptato2022-12-281-10/+15
|
* selectorparser: fix pseudo elements on combinator selectorsbptato2022-12-281-2/+5
|
* layout/engine: get rid of dom dependencybptato2022-12-273-23/+73
| | | | Layout should only depend on cascading.
* Implement DOMTokenList, item functions for collectionsbptato2022-12-261-1/+1
|
* Fix broken css color function parsingbptato2022-12-251-31/+49
|
* Add font color presentational hintbptato2022-12-251-0/+6
|