Skip to content

Being able to target elements with data attributes #378

Description

@Sparkmasterflex

Describe the feature request

I'm working on a project where we're combining StyleX and Radix-UI and their Select component has a disabled state for options. It puts this value as a aria-disabled and a data-disabled attributes and then style with css off of this:

Screenshot 2024-01-25 at 3 14 14 PM
.SelectItem[data-disabled] {
  color: var(--mauve-8);
  pointer-events: none;
}

I think because it's not an actual <option> that they're rendering, it wouldn't be valid for them to use the actual disabled attribute that is put on form fields and such.

I've been looking through docs and code for StyleX and I can't find any way to do this

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions