| 63 | * @todo stop converting to camel case and use hyphenated format |
| 64 | */ |
| 65 | export const camelCaseProperty = ( |
| 66 | property: CssProperty | StyleProperty |
| 67 | ): StyleProperty => { |
| 68 | property = normalizeProperty(property) as CssProperty | StyleProperty; |
| 69 | // these are manually added with pascal case |
| 70 | if ( |
| 71 | property === "-webkit-font-smoothing" || |
| 72 | property === "WebkitFontSmoothing" |
| 73 | ) { |
| 74 | return "WebkitFontSmoothing"; |
| 75 | } |
| 76 | if ( |
| 77 | property === "-moz-osx-font-smoothing" || |
| 78 | property === "MozOsxFontSmoothing" |
| 79 | ) { |
| 80 | return "MozOsxFontSmoothing"; |
| 81 | } |
| 82 | if (property.startsWith("-")) { |
| 83 | return property as StyleProperty; |
| 84 | } |
| 85 | return camelCase(property) as StyleProperty; |
| 86 | }; |
| 87 | |
| 88 | const parseCssValue = (property: CssProperty, value: string) => { |
| 89 | if (property.startsWith("--")) { |