(value: string | undefined)
| 872 | * values) collapses to `"fill"` — the CSS default for replaced elements. |
| 873 | */ |
| 874 | export function normalizeObjectFit(value: string | undefined): ObjectFit { |
| 875 | switch ((value ?? "").trim().toLowerCase()) { |
| 876 | case "cover": |
| 877 | return "cover"; |
| 878 | case "contain": |
| 879 | return "contain"; |
| 880 | case "none": |
| 881 | return "none"; |
| 882 | case "scale-down": |
| 883 | return "scale-down"; |
| 884 | default: |
| 885 | return "fill"; |
| 886 | } |
| 887 | } |
| 888 | |
| 889 | /** |
| 890 | * Parse a CSS `matrix(a,b,c,d,e,f)` or `matrix3d(...)` string into a 6-element |
no outgoing calls
no test coverage detected