(options = {})
| 338 | * @returns {Map<string, Record<string, number>>} list of known properties |
| 339 | */ |
| 340 | const buildKnownProperties = (options = {}) => { |
| 341 | /** @type {Map<string, Record<string, number>>} */ |
| 342 | const knownProperties = new Map(); |
| 343 | |
| 344 | if (options.animation) { |
| 345 | knownProperties.set("animation", { |
| 346 | // animation-direction |
| 347 | normal: 1, |
| 348 | reverse: 1, |
| 349 | alternate: 1, |
| 350 | "alternate-reverse": 1, |
| 351 | // animation-fill-mode |
| 352 | forwards: 1, |
| 353 | backwards: 1, |
| 354 | both: 1, |
| 355 | // animation-iteration-count |
| 356 | infinite: 1, |
| 357 | // animation-play-state |
| 358 | paused: 1, |
| 359 | running: 1, |
| 360 | // animation-timing-function |
| 361 | ease: 1, |
| 362 | "ease-in": 1, |
| 363 | "ease-out": 1, |
| 364 | "ease-in-out": 1, |
| 365 | linear: 1, |
| 366 | "step-end": 1, |
| 367 | "step-start": 1, |
| 368 | // Special |
| 369 | none: Infinity, // No matter how many times you write none, it will never be an animation name |
| 370 | ...GLOBAL_VALUES |
| 371 | }); |
| 372 | knownProperties.set("animation-name", { |
| 373 | // Special |
| 374 | none: Infinity, // No matter how many times you write none, it will never be an animation name |
| 375 | ...GLOBAL_VALUES |
| 376 | }); |
| 377 | } |
| 378 | |
| 379 | if (options.container) { |
| 380 | knownProperties.set("container", { |
| 381 | // container-type |
| 382 | normal: 1, |
| 383 | size: 1, |
| 384 | "inline-size": 1, |
| 385 | "scroll-state": 1, |
| 386 | // Special |
| 387 | none: Infinity, |
| 388 | ...GLOBAL_VALUES |
| 389 | }); |
| 390 | knownProperties.set("container-name", { |
| 391 | // Special |
| 392 | none: Infinity, |
| 393 | ...GLOBAL_VALUES |
| 394 | }); |
| 395 | } |
| 396 | |
| 397 | if (options.customIdents) { |
no test coverage detected