-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[3.0.0-beta] Scoped styles not working on iOS using attribute strategy #8165
Comments
Thanks for creating this issue! Unfortunately, it's not possible to work on this without a reproduction. You don't have to use stackblitz, codesandbox or a repo would be helpful too. On a different note, it seems to be a browser compat issue, not an Astro one. Have you tried debugging this in Safari desktop? |
Hello @fflaten. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
True, but the breaking change to
I don't have access to a Mac unfortunately. I assumed the provided component would work as a repro in a new blank project, but will verify it. |
Looks like repro is a lot easier:
Even though workaround exist, this is P4 issue imo. |
Thanks for this, and it really is a browser compat issue that should make us reconsider the default. Astro default template rendered: https://lilnasy.github.io/astro-8165 document.querySelector(".astro-a[data-astro-cid-J7PV25F6]") |
Thanks. How did you test Safari on Windows? The selector hash is uppercased while the attribute is lowercase. Lowercasing the selector works on Firefox. Could you verify on Safari? |
Thanks for looking into it! That's reassuring, it means we can fix it on our side without changing the default.
Playwright builds. They build and release on their CDN every few days. The latest build number is 1888, https://playwright.azureedge.net/builds/webkit/1888/webkit-win64.zip. |
We talked about lower casing the hash in the compiler. This issue confirms that we should do it |
Fixed in #8180, released as [email protected]. |
What version of
astro
are you using?3.0.0-beta.4
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
pnpm
What operating system are you using?
iOS
What browser are you using?
Safari
Describe the Bug
Scoped styling are not applying properly on iOS when using the default strategy
attribute
in 3.0. Everything works in Edge on Windows, but not on iOS. Tested using both iOS 16 and 17 beta:Reverting to
class
orwhere
strategy works as expected.Seeing issues with multiple components, ex the theme toggle below:
Related #7893
What's the expected result?
Scoped styles works on iOS.
Link to Minimal Reproducible Example
See comment
Participation
The text was updated successfully, but these errors were encountered: