about summary refs log tree commit diff stats
path: root/src/css
Commit message (Collapse)AuthorAgeFilesLines
* cssvalues: fix casingbptato2024-05-161-61/+61
|
* luwrap: use separate context (+ various cleanups)bptato2024-05-101-0/+90
| | | | | | Use a LUContext to only load required CharRanges once per pager. Also, add kana & hangul vi word break categories for convenience.
* cascade: avoid empty ::before/::afterbptato2024-05-051-3/+2
| | | | | If `content' is empty, then generating before/after pseudo-elements is wrong.
* color: separate out JS convertersbptato2024-05-051-0/+1
| | | | | ansi2html depends on color, but we definitely do not want to link it to QJS, so the converters must be moved into a separate module.
* Use isSome instead of isOkbptato2024-05-052-6/+6
| | | | no point in having identical overloads
* cssparser: refactorbptato2024-05-015-139/+84
| | | | | | | | | * 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.)
* css, dom: simplify ident parsing, canvas fixesbptato2024-05-013-371/+287
| | | | | | | | * add CSSStyleDeclaration setter * move ident maps directly into enums * more complete CSSComputedValue stringifier * turn canvas into a pseudo-image in cascade * set canvas to inline-block
* css/values: refactorbptato2024-04-281-283/+222
| | | | | | | | | * clean up global parsing * getValueFromDecl (now parseValue) no longer depends on receiving a CSSDeclaration (just its value) * getComputedValues now also takes a tuple of (name, cvals) instead of a CSSDeclaration * fix padding shorthand accepting auto
* color: RGBAColor -> ARGBColorbptato2024-04-261-3/+3
|
* Initial image supportbptato2024-04-251-1/+5
| | | | | | | | | | | | | | | | | * png: add missing filters, various decoder fixes * term: fix kitty response interpretation, add support for kitty image detection * buffer, pager: initial image display support Emphasis on "initial"; it only "works" with kitty output and PNG input. Also, it's excruciatingly slow, and repaints images way too often. Left undocumented intentionally it for now, until it actually becomes useful. In the meantime, adventurous users can find out themselves why: [[siteconf]] url = "https://.*" images = true
* Update code stylebptato2024-04-178-972/+956
| | | | | | * separate params with ; (semicolon) instead of , (colon) * reduce screaming snake case use * wrap long lines
* css, layout: flexbox fixesbptato2024-04-061-2/+29
| | | | | | | * do not re-resolve FlexPendingItem sizes; it's pointless and it breaks percentage sizes * fix some bugs in `flex' shorthand parsing * add `flex-flow' shorthand
* Initial flexbox supportbptato2024-04-051-38/+158
| | | | | | | | | Still far from being fully standards-compliant, or even complete, but it seems to work slightly less horribly than having no flexbox support at all on sites that do use it. (Also includes various refactorings in layout to make it possible at all to add flexbox.)
* catom: at -> satbptato2024-03-212-19/+19
| | | | just for consistency
* stylednode: clean up code stylebptato2024-03-181-30/+39
|
* Move around some modulesbptato2024-03-141-1/+1
| | | | | | | | * extern -> gone, runproc absorbed by pager, others moved into io/ * display -> local/ (where else would we display?) * xhr -> html/ * move out WindowAttributes from term, so we don't depend on local from server
* rudimentary support for <video>, <audio>bptato2024-03-133-2/+17
| | | | | we just treat them as img tags. lazy, but works suprisingly well -- so long as the server sends us a Content-Type, anyway.
* css: fix {} macros on older Nim versionsbptato2024-03-111-6/+9
| | | | | old Nim chokes on unquoting enums without explicitly casting them to the target enum type.
* css: simplify property & value definitionsbptato2024-03-041-266/+272
| | | | having to manually add them to a million places is annoying
* catom: merge TagType with AttrTypebptato2024-03-042-1/+1
| | | | | it's inefficient and pointless to treat them differently, so just derive a new enum from TagType with a macro
* cssparser: fix another anb parsing bugbptato2024-03-021-2/+2
| | | | obviously for ident tokens we must check value, not unit
* cssparser: fix anb parser whitespace handling bugsbptato2024-03-021-4/+7
| | | | | * skip whitespace in some places where we didn't but should * fix crash in get_tok when eof comes after whitespace
* css: remove caption-side: left, right, fix caption-side: bottombptato2024-03-011-7/+2
| | | | | | | | left/right never really worked correctly, is non-standard, and the only browser that supported it (Firefox) removed it years ago. bottom was adding the table width to its offset instead of the height, that is now fixed.
* css/values: assign to the correct variablebptato2024-03-011-6/+6
|
* css: fix shorthands not overriding all valuesbptato2024-02-291-29/+32
| | | | background & list-style did not override unspecified values
* misc refactoringsbptato2024-02-271-2/+2
| | | | | | * rename buffer enums * fix isAscii for char 0x80 * remove dead code from URL
* term: improve pixels-per-column/line detectionbptato2024-02-251-1/+1
| | | | | | | | | Some terminal emulators (AKA vte) refuse to set ws_xpixel and ws_ypixel in the TIOCGWINSZ ioctl, so we now query for CSI 14 t as well. (Also CSI 18 t for good measure, just in case we can't ioctl for some reason.) Also added some fallback (optionally forced) config values for width, height, ppc, and ppl. (This is especially useful in dump mode.)
* css: always use defaultColor as the initial colorbptato2024-02-251-7/+4
| | | | | | | | | | This way, we do not end up with ugly contrast-corrected white on terminals with arbitrary backgrounds by default. (Now we get the native -cha-ansi(default) instead). (We leave background-color as transparent; this should have the same effect, since defaultColor as bgcolor is ignored, but makes more sense (and will allow us to un-ignore defaultColor as bgcolor in the future.))
* Allow non-RGB colors in CSSbptato2024-02-242-51/+99
| | | | | | | | | | | The -cha-ansi color type now sets ANSI colors in CSS. Also, color correction etc. has been improved a bit: * don't completely reset output state in processFormat for new colors * defaultColor is now separated from ANSI color type 0 * bright ANSI colors are no longer replaced with bold + dark variant * replaced ANSI color map to match xterm defaults
* css: reduce CSSComputedValue sizebptato2024-02-172-118/+96
| | | | | | | The `t' field was completely redundant, as it's already included in the CSSComputedValues index. + removed some unused functions
* layout: use html/body bgcolor as canvas bgcolorbptato2024-02-172-4/+15
| | | | | | This is required by the standard. (Without this, lots of websites have incorrect background colors, because they set the body height to 100% of the viewport.)
* css: hide noscript tags when scripting is enabledbptato2024-02-132-3/+25
|
* twtstr: misc refactoringsbptato2024-02-091-1/+1
| | | | | | * move out half width <-> full width converters * snake_case -> camelCase * improve toScreamingSnakeCase slicing
* buffer: load external resources when they are attachedbptato2024-02-081-0/+2
| | | | | We no longer have to wait for the entire document to be loaded to start loading CSS.
* dom: enumize attribute namesbptato2024-02-083-23/+30
|
* dom: atomize id, name, DOMTokenListbptato2024-02-082-67/+90
|
* Update chamebptato2024-02-074-61/+74
| | | | | | | | * Update chame to the latest version * Get rid of nodeType usage * Add atoms * Re-implement DOM attributes * document.write
* Use errDOMException template everywherebptato2024-01-111-7/+7
|
* Fix windowChange not refreshing valid media queriesbptato2024-01-101-1/+2
| | | | | | | | * css/cascade: copy stylesheet in applyMediaQuery (so that changes are reverted on re-style) * buffer: clear prevstyled in windowChange (to avoid using cached results from previous cascading passes); set window.attrs * pager: avoid windowChange if new attrs are identical to the old ones
* Use std/* imports everywherebptato2024-01-077-23/+23
|
* css/sheet: skip media queries without blocksbptato2024-01-041-0/+3
| | | | Without this, media queries without a block would crash the buffer.
* Compile with styleCheck:usagesbptato2023-12-282-8/+8
| | | | much better
* Move http out of main binarybptato2023-12-131-1/+1
| | | | | | | | | | | | Now it is (technically) no longer mandatory to link to libcurl. Also, Chawan is at last completely protocol and network backend agnostic :) * Implement multipart requests in local CGI * Implement simultaneous download of CGI data * Add REQUEST_HEADERS env var with all headers * cssparser: add a missing check in consumeEscape
* css: add case-insensitive matchingbptato2023-12-112-18/+82
| | | | Also case-sensitive, but for now that is the same as normal matching...
* css: add text-transformbptato2023-12-111-5/+29
| | | | | | | Probably not fully correct, but it's a good start. Includes proprietary extension -cha-half-width, which converts full-width characters to half-width ones.
* sheet: fix overflow in addAtRulebptato2023-12-091-1/+1
| | | | It is enough to just take the len of children there.
* cascade: simplifybptato2023-12-091-2/+1
|
* cascade: fix regressionbptato2023-12-091-18/+23
| | | | | Styled children must be added to their parents *before* they are styled, because match expects this to hold.
* selectorparser: enum-ize relbptato2023-12-092-25/+35
|
* sheet: fix a correctness issue, misc refactoringsbptato2023-12-092-51/+63
| | | | | | | * 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.
K. Agaram <vc@akkartik.com> 2021-02-27 06:55:41 -0800 committer Kartik K. Agaram <vc@akkartik.com> 2021-02-27 06:55:41 -0800 7817' href='/akkartik/mu/commit/412print-float-decimal.mu?h=hlt&id=a9e0cb7cc9da462c6e7886edfb554d7266e84c18'>a9e0cb7c ^
4a280280 ^
b6369d46 ^
4a280280 ^


a9e0cb7c ^
4a280280 ^




a9e0cb7c ^
4a280280 ^




a9e0cb7c ^
4a280280 ^




a9e0cb7c ^
4a280280 ^








a9e0cb7c ^
4a280280 ^







a9e0cb7c ^
4a280280 ^













4a280280 ^
4a280280 ^


4a280280 ^





4a280280 ^










4a280280 ^



a9e0cb7c ^
4a280280 ^




























































































































































































a9e0cb7c ^
4a280280 ^
4a280280 ^


a9e0cb7c ^
4a280280 ^




105f14f5 ^
a9e0cb7c ^
4a280280 ^




a9e0cb7c ^
4a280280 ^

e1eadf67 ^


4a280280 ^
e1eadf67 ^





4a280280 ^




a9e0cb7c ^
4a280280 ^


a9e0cb7c ^



4a280280 ^




a9e0cb7c ^
4a280280 ^









a9e0cb7c ^
4a280280 ^


a9e0cb7c ^


4a280280 ^



a9e0cb7c ^
4a280280 ^
a9e0cb7c ^
4a280280 ^

a9e0cb7c ^
b6369d46 ^






74f1512f ^
b6369d46 ^



74f1512f ^
b6369d46 ^



74f1512f ^
b6369d46 ^



74f1512f ^
b6369d46 ^







74f1512f ^
b6369d46 ^











































105f14f5 ^
b6369d46 ^


55dfa5b9 ^










b6369d46 ^
b6369d46 ^
55dfa5b9 ^
b6369d46 ^
55dfa5b9 ^

b6369d46 ^




55dfa5b9 ^
b6369d46 ^
6b1cde47 ^


4a280280 ^






cec5ef31 ^
4a280280 ^













74f1512f ^
4a280280 ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642