Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OP-25] Compound Selector with ::file-selector-button #221

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

Jeremy-Walton
Copy link
Member

Why?

There is an issue with compound selectors that have a child under ::file-selector-button in it. It breaks the whole selector

Due to how the file selector button is styled, if you put a child selector in the button global style, it will break it.

E.G. Always styling icons within buttons with a certain color

%btn-global {
  .material-symbols-outlined {
    color: red;
  }
}

// Output that is broken
.form-control[type=file]::file-selector-button .material-symbols-outlined,
.btn .material-symbols-outlined {
  color: red;
}

Technically this is a breaking change though I suspect not many projects are styling the file selector button so it may not be an issue.

What Changed

  • Reimplement the file selector button styles to not extend the button

Sanity Check

  • [ ] Have you updated any usage of changed tokens?
  • [ ] Have you updated the docs with any component changes?
  • [ ] Have you updated the dependency graph with any component changes?
  • Have you run linters?
  • Have you run prettier?
  • Have you tried building the css?
  • Have you tried building storybook?
  • [ ] Do you need to update the package version?

Screenshots

Screenshot 2024-02-14 at 3 36 34 PM

@Jeremy-Walton Jeremy-Walton added Breaking Change This will cause problems so be sure to indicate that in the release notes Components Changes to a component labels Feb 14, 2024
@Jeremy-Walton Jeremy-Walton added this to the v1.0.0 Release milestone Feb 14, 2024
@Jeremy-Walton Jeremy-Walton self-assigned this Feb 14, 2024
Copy link

linear bot commented Feb 14, 2024

@Jeremy-Walton Jeremy-Walton force-pushed the op-25-child-selector-in-group-issue branch from 15f5e61 to 1b780df Compare February 16, 2024 15:46
@Jeremy-Walton Jeremy-Walton merged commit 0cdd54e into main Feb 16, 2024
1 check passed
@Jeremy-Walton Jeremy-Walton deleted the op-25-child-selector-in-group-issue branch February 16, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change This will cause problems so be sure to indicate that in the release notes Components Changes to a component
Development

Successfully merging this pull request may close these issues.

2 participants