Skip to content

Support for SVG attributes like rx and ry #1522

Open
@jylertones

Description

Describe the bug

I was writing a style that would be for an SVG element, and everything works great! However, I get type errors from this simple style:

export const button = style({
  cursor: 'pointer',
  fill: backgroundColor,
  rx: baseTheme.border.radius[2],
  ry: baseTheme.border.radius[2],
});

Vanilla extract tells me that rx and ry aren't valid for ComplexStyleRule

I can try to create a PR with the change, but would this change be acceptable?

Reproduction

https://codesandbox.io/p/devbox/lk7fvk?file=%2Fsrc%2FSvgStyles.css.ts%3A4%2C4

System Info

Simple setup: TypeScript, React, Vanilla Extract with Vite

Used Package Manager

pnpm

Logs

Object literal may only specify known properties, and 'rx' does not exist in type 'ComplexStyleRule'.ts(2353)

Validations

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttype issueIssue related to a typeupstream issueIssue caused by a required upstream dependency

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions