properties.cjs 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819
  1. // NOTICE: This file is generated by Rollup. To modify it,
  2. // please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
  3. 'use strict';
  4. /** @type {ReadonlySet<string>} */
  5. const acceptCustomIdentsProperties = new Set([
  6. 'animation',
  7. 'animation-name',
  8. 'font',
  9. 'font-family',
  10. 'counter-increment',
  11. 'grid-row',
  12. 'grid-column',
  13. 'grid-area',
  14. 'list-style',
  15. 'list-style-type',
  16. ]);
  17. /** @type {ReadonlyMap<string, ReadonlySet<string>>} */
  18. const shorthandToResetToInitialProperty = new Map([
  19. [
  20. 'border',
  21. new Set([
  22. 'border-image',
  23. 'border-image-outset',
  24. 'border-image-repeat',
  25. 'border-image-slice',
  26. 'border-image-source',
  27. 'border-image-width',
  28. ]),
  29. ],
  30. [
  31. /** @see https://www.w3.org/TR/css-fonts-4/#font-prop */
  32. 'font',
  33. new Set([
  34. // prettier-ignore
  35. 'font-feature-settings',
  36. 'font-kerning',
  37. 'font-language-override',
  38. 'font-optical-sizing',
  39. 'font-size-adjust',
  40. 'font-variant-alternates',
  41. 'font-variant-caps',
  42. 'font-variant-east-asian',
  43. 'font-variant-emoji',
  44. 'font-variant-ligatures',
  45. 'font-variant-numeric',
  46. 'font-variant-position',
  47. 'font-variation-settings',
  48. ]),
  49. ],
  50. ]);
  51. /** @type {import('stylelint').LonghandSubPropertiesOfShorthandProperties} */
  52. const longhandSubPropertiesOfShorthandProperties = new Map([
  53. // Sort alphabetically
  54. [
  55. 'animation',
  56. new Set([
  57. // prettier-ignore
  58. 'animation-name',
  59. 'animation-duration',
  60. 'animation-timing-function',
  61. 'animation-delay',
  62. 'animation-iteration-count',
  63. 'animation-direction',
  64. 'animation-fill-mode',
  65. 'animation-play-state',
  66. ]),
  67. ],
  68. [
  69. 'background',
  70. new Set([
  71. // prettier-ignore
  72. 'background-image',
  73. 'background-size',
  74. 'background-position',
  75. 'background-repeat',
  76. 'background-origin',
  77. 'background-clip',
  78. 'background-attachment',
  79. 'background-color',
  80. ]),
  81. ],
  82. [
  83. 'border',
  84. new Set([
  85. // prettier-ignore
  86. 'border-top-width',
  87. 'border-right-width',
  88. 'border-bottom-width',
  89. 'border-left-width',
  90. 'border-top-style',
  91. 'border-right-style',
  92. 'border-bottom-style',
  93. 'border-left-style',
  94. 'border-top-color',
  95. 'border-right-color',
  96. 'border-bottom-color',
  97. 'border-left-color',
  98. 'border-width',
  99. 'border-style',
  100. 'border-color',
  101. ]),
  102. ],
  103. [
  104. 'border-block',
  105. new Set([
  106. // prettier-ignore
  107. 'border-block-width',
  108. 'border-block-style',
  109. 'border-block-color',
  110. ]),
  111. ],
  112. [
  113. 'border-block-end',
  114. new Set([
  115. // prettier-ignore
  116. 'border-block-end-width',
  117. 'border-block-end-style',
  118. 'border-block-end-color',
  119. ]),
  120. ],
  121. [
  122. 'border-block-start',
  123. new Set([
  124. // prettier-ignore
  125. 'border-block-start-width',
  126. 'border-block-start-style',
  127. 'border-block-start-color',
  128. ]),
  129. ],
  130. [
  131. 'border-bottom',
  132. new Set([
  133. // prettier-ignore
  134. 'border-bottom-width',
  135. 'border-bottom-style',
  136. 'border-bottom-color',
  137. ]),
  138. ],
  139. [
  140. 'border-color',
  141. new Set([
  142. // prettier-ignore
  143. 'border-top-color',
  144. 'border-right-color',
  145. 'border-bottom-color',
  146. 'border-left-color',
  147. ]),
  148. ],
  149. [
  150. 'border-image',
  151. new Set([
  152. // prettier-ignore
  153. 'border-image-source',
  154. 'border-image-slice',
  155. 'border-image-width',
  156. 'border-image-outset',
  157. 'border-image-repeat',
  158. ]),
  159. ],
  160. [
  161. 'border-inline',
  162. new Set([
  163. // prettier-ignore
  164. 'border-inline-width',
  165. 'border-inline-style',
  166. 'border-inline-color',
  167. ]),
  168. ],
  169. [
  170. 'border-inline-end',
  171. new Set([
  172. // prettier-ignore
  173. 'border-inline-end-width',
  174. 'border-inline-end-style',
  175. 'border-inline-end-color',
  176. ]),
  177. ],
  178. [
  179. 'border-inline-start',
  180. new Set([
  181. // prettier-ignore
  182. 'border-inline-start-width',
  183. 'border-inline-start-style',
  184. 'border-inline-start-color',
  185. ]),
  186. ],
  187. [
  188. 'border-left',
  189. new Set([
  190. // prettier-ignore
  191. 'border-left-width',
  192. 'border-left-style',
  193. 'border-left-color',
  194. ]),
  195. ],
  196. [
  197. 'border-radius',
  198. new Set([
  199. // prettier-ignore
  200. 'border-top-left-radius',
  201. 'border-top-right-radius',
  202. 'border-bottom-right-radius',
  203. 'border-bottom-left-radius',
  204. ]),
  205. ],
  206. [
  207. 'border-right',
  208. new Set([
  209. // prettier-ignore
  210. 'border-right-width',
  211. 'border-right-style',
  212. 'border-right-color',
  213. ]),
  214. ],
  215. [
  216. 'border-style',
  217. new Set([
  218. // prettier-ignore
  219. 'border-top-style',
  220. 'border-right-style',
  221. 'border-bottom-style',
  222. 'border-left-style',
  223. ]),
  224. ],
  225. [
  226. 'border-top',
  227. new Set([
  228. // prettier-ignore
  229. 'border-top-width',
  230. 'border-top-style',
  231. 'border-top-color',
  232. ]),
  233. ],
  234. [
  235. 'border-width',
  236. new Set([
  237. // prettier-ignore
  238. 'border-top-width',
  239. 'border-right-width',
  240. 'border-bottom-width',
  241. 'border-left-width',
  242. ]),
  243. ],
  244. [
  245. 'column-rule',
  246. new Set([
  247. // prettier-ignore
  248. 'column-rule-width',
  249. 'column-rule-style',
  250. 'column-rule-color',
  251. ]),
  252. ],
  253. [
  254. 'columns',
  255. new Set([
  256. // prettier-ignore
  257. 'column-width',
  258. 'column-count',
  259. ]),
  260. ],
  261. [
  262. 'flex',
  263. new Set([
  264. // prettier-ignore
  265. 'flex-grow',
  266. 'flex-shrink',
  267. 'flex-basis',
  268. ]),
  269. ],
  270. [
  271. 'flex-flow',
  272. new Set([
  273. // prettier-ignore
  274. 'flex-direction',
  275. 'flex-wrap',
  276. ]),
  277. ],
  278. [
  279. 'font',
  280. new Set([
  281. // prettier-ignore
  282. 'font-style',
  283. /**
  284. * reset explicitly: normal | small-caps
  285. * reset implicitly: all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps
  286. * i.e. either way it will be reset
  287. * {@link https://www.w3.org/TR/css-fonts-4/#font-variant-prop World Wide Web Consortium}
  288. */
  289. 'font-variant',
  290. 'font-weight',
  291. 'font-stretch',
  292. 'font-size',
  293. 'line-height',
  294. 'font-family',
  295. ]),
  296. ],
  297. [
  298. 'font-synthesis',
  299. new Set([
  300. // prettier-ignore
  301. 'font-synthesis-weight',
  302. 'font-synthesis-style',
  303. 'font-synthesis-small-caps',
  304. ]),
  305. ],
  306. [
  307. 'font-variant',
  308. new Set([
  309. // prettier-ignore
  310. 'font-variant-ligatures',
  311. 'font-variant-position',
  312. 'font-variant-caps',
  313. 'font-variant-numeric',
  314. 'font-variant-alternates',
  315. 'font-variant-east-asian',
  316. 'font-variant-emoji',
  317. ]),
  318. ],
  319. [
  320. 'gap',
  321. new Set([
  322. // prettier-ignore
  323. 'row-gap',
  324. 'column-gap',
  325. ]),
  326. ],
  327. [
  328. 'grid',
  329. new Set([
  330. // prettier-ignore
  331. 'grid-template-rows',
  332. 'grid-template-columns',
  333. 'grid-template-areas',
  334. 'grid-auto-rows',
  335. 'grid-auto-columns',
  336. 'grid-auto-flow',
  337. 'grid-column-gap',
  338. 'grid-row-gap',
  339. ]),
  340. ],
  341. [
  342. 'grid-area',
  343. new Set([
  344. // prettier-ignore
  345. 'grid-row-start',
  346. 'grid-column-start',
  347. 'grid-row-end',
  348. 'grid-column-end',
  349. ]),
  350. ],
  351. [
  352. 'grid-column',
  353. new Set([
  354. // prettier-ignore
  355. 'grid-column-start',
  356. 'grid-column-end',
  357. ]),
  358. ],
  359. [
  360. 'grid-gap',
  361. new Set([
  362. // prettier-ignore
  363. 'grid-row-gap',
  364. 'grid-column-gap',
  365. ]),
  366. ],
  367. [
  368. 'grid-row',
  369. new Set([
  370. // prettier-ignore
  371. 'grid-row-start',
  372. 'grid-row-end',
  373. ]),
  374. ],
  375. [
  376. 'grid-template',
  377. new Set([
  378. // prettier-ignore
  379. 'grid-template-columns',
  380. 'grid-template-rows',
  381. 'grid-template-areas',
  382. ]),
  383. ],
  384. [
  385. 'inset',
  386. new Set([
  387. // prettier-ignore
  388. 'top',
  389. 'right',
  390. 'bottom',
  391. 'left',
  392. ]),
  393. ],
  394. [
  395. 'inset-block',
  396. new Set([
  397. // prettier-ignore
  398. 'inset-block-start',
  399. 'inset-block-end',
  400. ]),
  401. ],
  402. [
  403. 'inset-inline',
  404. new Set([
  405. // prettier-ignore
  406. 'inset-inline-start',
  407. 'inset-inline-end',
  408. ]),
  409. ],
  410. [
  411. 'list-style',
  412. new Set([
  413. // prettier-ignore
  414. 'list-style-type',
  415. 'list-style-position',
  416. 'list-style-image',
  417. ]),
  418. ],
  419. [
  420. 'margin',
  421. new Set([
  422. // prettier-ignore
  423. 'margin-top',
  424. 'margin-right',
  425. 'margin-bottom',
  426. 'margin-left',
  427. ]),
  428. ],
  429. [
  430. 'margin-block',
  431. new Set([
  432. // prettier-ignore
  433. 'margin-block-start',
  434. 'margin-block-end',
  435. ]),
  436. ],
  437. [
  438. 'margin-inline',
  439. new Set([
  440. // prettier-ignore
  441. 'margin-inline-start',
  442. 'margin-inline-end',
  443. ]),
  444. ],
  445. [
  446. 'mask',
  447. new Set([
  448. // prettier-ignore
  449. 'mask-image',
  450. 'mask-mode',
  451. 'mask-position',
  452. 'mask-size',
  453. 'mask-repeat',
  454. 'mask-origin',
  455. 'mask-clip',
  456. 'mask-composite',
  457. ]),
  458. ],
  459. [
  460. 'outline',
  461. new Set([
  462. // prettier-ignore
  463. 'outline-color',
  464. 'outline-style',
  465. 'outline-width',
  466. ]),
  467. ],
  468. [
  469. 'overflow',
  470. new Set([
  471. // prettier-ignore
  472. 'overflow-x',
  473. 'overflow-y',
  474. ]),
  475. ],
  476. [
  477. 'overscroll-behavior',
  478. new Set([
  479. // prettier-ignore
  480. 'overscroll-behavior-x',
  481. 'overscroll-behavior-y',
  482. ]),
  483. ],
  484. [
  485. 'padding',
  486. new Set([
  487. // prettier-ignore
  488. 'padding-top',
  489. 'padding-right',
  490. 'padding-bottom',
  491. 'padding-left',
  492. ]),
  493. ],
  494. [
  495. 'padding-block',
  496. new Set([
  497. // prettier-ignore
  498. 'padding-block-start',
  499. 'padding-block-end',
  500. ]),
  501. ],
  502. [
  503. 'padding-inline',
  504. new Set([
  505. // prettier-ignore
  506. 'padding-inline-start',
  507. 'padding-inline-end',
  508. ]),
  509. ],
  510. [
  511. 'place-content',
  512. new Set([
  513. // prettier-ignore
  514. 'align-content',
  515. 'justify-content',
  516. ]),
  517. ],
  518. [
  519. 'place-items',
  520. new Set([
  521. // prettier-ignore
  522. 'align-items',
  523. 'justify-items',
  524. ]),
  525. ],
  526. [
  527. 'place-self',
  528. new Set([
  529. // prettier-ignore
  530. 'align-self',
  531. 'justify-self',
  532. ]),
  533. ],
  534. [
  535. 'scroll-margin',
  536. new Set([
  537. // prettier-ignore
  538. 'scroll-margin-top',
  539. 'scroll-margin-right',
  540. 'scroll-margin-bottom',
  541. 'scroll-margin-left',
  542. ]),
  543. ],
  544. [
  545. 'scroll-margin-block',
  546. new Set([
  547. // prettier-ignore
  548. 'scroll-margin-block-start',
  549. 'scroll-margin-block-end',
  550. ]),
  551. ],
  552. [
  553. 'scroll-margin-inline',
  554. new Set([
  555. // prettier-ignore
  556. 'scroll-margin-inline-start',
  557. 'scroll-margin-inline-end',
  558. ]),
  559. ],
  560. [
  561. 'scroll-padding',
  562. new Set([
  563. // prettier-ignore
  564. 'scroll-padding-top',
  565. 'scroll-padding-right',
  566. 'scroll-padding-bottom',
  567. 'scroll-padding-left',
  568. ]),
  569. ],
  570. [
  571. 'scroll-padding-block',
  572. new Set([
  573. // prettier-ignore
  574. 'scroll-padding-block-start',
  575. 'scroll-padding-block-end',
  576. ]),
  577. ],
  578. [
  579. 'scroll-padding-inline',
  580. new Set([
  581. // prettier-ignore
  582. 'scroll-padding-inline-start',
  583. 'scroll-padding-inline-end',
  584. ]),
  585. ],
  586. [
  587. 'text-decoration',
  588. new Set([
  589. // prettier-ignore
  590. 'text-decoration-line',
  591. 'text-decoration-style',
  592. 'text-decoration-color',
  593. 'text-decoration-thickness',
  594. ]),
  595. ],
  596. [
  597. 'text-emphasis',
  598. new Set([
  599. // prettier-ignore
  600. 'text-emphasis-style',
  601. 'text-emphasis-color',
  602. ]),
  603. ],
  604. [
  605. 'transition',
  606. new Set([
  607. // prettier-ignore
  608. 'transition-property',
  609. 'transition-duration',
  610. 'transition-timing-function',
  611. 'transition-delay',
  612. ]),
  613. ],
  614. ]);
  615. /** @type {ReadonlySet<string>} */
  616. const singleValueColorProperties = new Set([
  617. 'accent-color',
  618. 'background-color',
  619. 'border-block-color',
  620. 'border-block-end-color',
  621. 'border-block-start-color',
  622. 'border-bottom-color',
  623. 'border-inline-color',
  624. 'border-inline-end-color',
  625. 'border-inline-start-color',
  626. 'border-left-color',
  627. 'border-right-color',
  628. 'border-top-color',
  629. 'caret-color',
  630. 'color',
  631. 'column-rule-color',
  632. 'outline-color',
  633. 'text-decoration-color',
  634. 'text-emphasis-color',
  635. // SVG
  636. 'flood-color',
  637. 'lighting-color',
  638. 'stop-color',
  639. ]);
  640. /** @type {ReadonlySet<string>} */
  641. const multiValueColorProperties = new Set(['border-color', 'scrollbar-color']);
  642. /** @type {ReadonlySet<string>} */
  643. const colorProperties = new Set([
  644. ...singleValueColorProperties,
  645. ...multiValueColorProperties,
  646. ]);
  647. /** @type {ReadonlySet<string>} */
  648. const longhandTimeProperties = new Set([
  649. 'transition-duration',
  650. 'transition-delay',
  651. 'animation-duration',
  652. 'animation-delay',
  653. ]);
  654. /** @type {ReadonlySet<string>} */
  655. const shorthandTimeProperties = new Set(['transition', 'animation']);
  656. /** @type {ReadonlySet<string>} */
  657. const pageContextProperties = new Set([
  658. 'direction',
  659. 'background-color',
  660. 'background-image',
  661. 'background-repeat',
  662. 'background-attachment',
  663. 'background-position',
  664. 'background',
  665. 'border-top-width',
  666. 'border-right-width',
  667. 'border-bottom-width',
  668. 'border-left-width',
  669. 'border-width',
  670. 'border-top-color',
  671. 'border-right-color',
  672. 'border-bottom-color',
  673. 'border-left-color',
  674. 'border-color',
  675. 'border-top-style',
  676. 'border-right-style',
  677. 'border-bottom-style',
  678. 'border-left-style',
  679. 'border-style',
  680. 'border-top',
  681. 'border-right',
  682. 'border-bottom',
  683. 'border-left',
  684. 'border',
  685. 'counter-reset',
  686. 'counter-increment',
  687. 'color',
  688. 'font-family',
  689. 'font-size',
  690. 'font-style',
  691. 'font-variant',
  692. 'font-weight',
  693. 'font',
  694. 'height',
  695. 'min-height',
  696. 'max-height',
  697. 'line-height',
  698. 'margin-top',
  699. 'margin-right',
  700. 'margin-bottom',
  701. 'margin-left',
  702. 'margin',
  703. 'outline-width',
  704. 'outline-style',
  705. 'outline-color',
  706. 'outline',
  707. 'padding-top',
  708. 'padding-right',
  709. 'padding-bottom',
  710. 'padding-left',
  711. 'padding',
  712. 'quotes',
  713. 'letter-spacing',
  714. 'text-align',
  715. 'text-decoration',
  716. 'text-indent',
  717. 'text-transform',
  718. 'white-space',
  719. 'word-spacing',
  720. 'visibility',
  721. 'width',
  722. 'min-width',
  723. 'max-width',
  724. ]);
  725. /** @type {ReadonlySet<string>} */
  726. const marginContextProperties = new Set([
  727. 'direction',
  728. 'unicode-bidi',
  729. 'background-color',
  730. 'background-image',
  731. 'background-repeat',
  732. 'background-attachment',
  733. 'background-position',
  734. 'background',
  735. 'border-top-width',
  736. 'border-right-width',
  737. 'border-bottom-width',
  738. 'border-left-width',
  739. 'border-width',
  740. 'border-top-color',
  741. 'border-right-color',
  742. 'border-bottom-color',
  743. 'border-left-color',
  744. 'border-color',
  745. 'border-top-style',
  746. 'border-right-style',
  747. 'border-bottom-style',
  748. 'border-left-style',
  749. 'border-style',
  750. 'border-top',
  751. 'border-right',
  752. 'border-bottom',
  753. 'border-left',
  754. 'border',
  755. 'counter-reset',
  756. 'counter-increment',
  757. 'content',
  758. 'color',
  759. 'font-family',
  760. 'font-size',
  761. 'font-style',
  762. 'font-variant',
  763. 'font-weight',
  764. 'font',
  765. 'height',
  766. 'min-height',
  767. 'max-height',
  768. 'line-height',
  769. 'margin-top',
  770. 'margin-right',
  771. 'margin-bottom',
  772. 'margin-left',
  773. 'margin',
  774. 'outline-width',
  775. 'outline-style',
  776. 'outline-color',
  777. 'outline',
  778. 'overflow',
  779. 'padding-top',
  780. 'padding-right',
  781. 'padding-bottom',
  782. 'padding-left',
  783. 'padding',
  784. 'quotes',
  785. 'letter-spacing',
  786. 'text-align',
  787. 'text-decoration',
  788. 'text-indent',
  789. 'text-transform',
  790. 'white-space',
  791. 'word-spacing',
  792. 'vertical-align',
  793. 'visibility',
  794. 'width',
  795. 'min-width',
  796. 'max-width',
  797. 'z-index',
  798. ]);
  799. exports.acceptCustomIdentsProperties = acceptCustomIdentsProperties;
  800. exports.colorProperties = colorProperties;
  801. exports.longhandSubPropertiesOfShorthandProperties = longhandSubPropertiesOfShorthandProperties;
  802. exports.longhandTimeProperties = longhandTimeProperties;
  803. exports.marginContextProperties = marginContextProperties;
  804. exports.multiValueColorProperties = multiValueColorProperties;
  805. exports.pageContextProperties = pageContextProperties;
  806. exports.shorthandTimeProperties = shorthandTimeProperties;
  807. exports.shorthandToResetToInitialProperty = shorthandToResetToInitialProperty;
  808. exports.singleValueColorProperties = singleValueColorProperties;