Commit 95e119a
authored
feat: add vendor-prefix support in mediafeature (#225)
- Add `value` getter to `CSSNode` for `MEDIA_FEATURE` nodes, returning
the
first child node or `null` for boolean features like `(hover)`
- Add `MEDIA_FEATURE` case to `is_vendor_prefixed` getter, checking the
feature name (e.g. `-ms-high-contrast` → `true`)
- Add `value: CSSNode | null` to the `MediaFeature` type; remove
`WithChildren`
for consistency with `Declaration`, which also hides children in favour
of
a typed `value` accessor
- Update tests to use `feature.value` instead of `feature.children`1 parent ad61272 commit 95e119a
3 files changed
Lines changed: 46 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
350 | 354 | | |
351 | 355 | | |
352 | 356 | | |
| |||
506 | 510 | | |
507 | 511 | | |
508 | 512 | | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
509 | 516 | | |
510 | 517 | | |
511 | 518 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
472 | 473 | | |
473 | 474 | | |
474 | 475 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
518 | | - | |
519 | | - | |
| 518 | + | |
520 | 519 | | |
521 | 520 | | |
522 | 521 | | |
| |||
533 | 532 | | |
534 | 533 | | |
535 | 534 | | |
536 | | - | |
| 535 | + | |
537 | 536 | | |
538 | 537 | | |
539 | 538 | | |
| |||
545 | 544 | | |
546 | 545 | | |
547 | 546 | | |
548 | | - | |
549 | | - | |
| 547 | + | |
550 | 548 | | |
551 | 549 | | |
552 | | - | |
| 550 | + | |
553 | 551 | | |
554 | 552 | | |
555 | 553 | | |
556 | 554 | | |
557 | 555 | | |
558 | 556 | | |
559 | | - | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
560 | 560 | | |
561 | | - | |
562 | | - | |
563 | | - | |
| 561 | + | |
| 562 | + | |
564 | 563 | | |
565 | 564 | | |
566 | | - | |
| 565 | + | |
567 | 566 | | |
568 | 567 | | |
569 | 568 | | |
570 | 569 | | |
571 | 570 | | |
572 | 571 | | |
573 | | - | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
574 | 589 | | |
575 | | - | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
576 | 594 | | |
577 | 595 | | |
578 | 596 | | |
| |||
0 commit comments