|
1 | | -// cSpell:ignore rcap,vmin,svmin,lvmin,dvmin,cqmin,vmax,svmax,lvmax,dvmax,cqmax,currentcolor,oklab,oklch,prophoto |
| 1 | +// cSpell:ignore rcap,vmin,svmin,lvmin,dvmin,cqmin,vmax,svmax,lvmax,dvmax,cqmax,currentcolor,oklab,oklch,prophoto,squircle,oldstyle,nums |
2 | 2 |
|
3 | 3 | import Color from "colorjs.io"; |
4 | 4 | import type { |
@@ -1000,6 +1000,8 @@ export function parseCustomDeclaration( |
1000 | 1000 | property, |
1001 | 1001 | parseUnparsed(declaration.value.value, builder, property), |
1002 | 1002 | ); |
| 1003 | + } else if (property === "corner-shape") { |
| 1004 | + parseCornerShape(declaration.value, builder); |
1003 | 1005 | } else if ( |
1004 | 1006 | validProperties.has(property) || |
1005 | 1007 | property.startsWith("--") || |
@@ -3091,6 +3093,19 @@ function parseObjectPosition( |
3091 | 3093 | ]); |
3092 | 3094 | } |
3093 | 3095 |
|
| 3096 | +function parseCornerShape( |
| 3097 | + declaration: CustomProperty, |
| 3098 | + builder: StylesheetBuilder, |
| 3099 | +) { |
| 3100 | + const shape = parseUnparsed(declaration.value, builder, "corner-shape"); |
| 3101 | + |
| 3102 | + if (shape === "round") { |
| 3103 | + builder.addDescriptor("borderCurve", "circular"); |
| 3104 | + } else if (shape === "squircle") { |
| 3105 | + builder.addDescriptor("borderCurve", "continuous"); |
| 3106 | + } |
| 3107 | +} |
| 3108 | + |
3094 | 3109 | function parseVisibility( |
3095 | 3110 | declaration: DeclarationType<"visibility">, |
3096 | 3111 | builder: StylesheetBuilder, |
|
0 commit comments