-
Notifications
You must be signed in to change notification settings - Fork 66
feat(theme): add prefixed CSS #567
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
Conversation
|
|
@Arno500 is attempting to deploy a commit to the ory Team on Vercel. A member of the Team first needs to authorize it. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #567 +/- ##
===========================================
+ Coverage 42.43% 53.41% +10.98%
===========================================
Files 136 159 +23
Lines 2008 2930 +922
Branches 288 453 +165
===========================================
+ Hits 852 1565 +713
- Misses 1149 1306 +157
- Partials 7 59 +52
🚀 New features to boost your workflow:
|
|
Thanks for the PR. I do like this approach. I had already looked into this a little, and came up with what I have in #569. WDYT? Seems like it would be the same outcome, though, so I don't really have a preference. I do think we can omit the additional export, and just change the existing stylesheet, with a changelog note to add |
|
Hello! |
Ok, I tried different imports, but it doesn't seem this is possible to solve with plain CSS nesting. So I think your approach is better. Could you remove the
:host is for shadow doms and has no effect outside of one. Could be another interesting way to scope though, but I think that probably would break something else. |
|
Actually, I think just putting the variables as-is inside |
|
Am st00pid, it was working in my solution because: .ory,
:host {
... vars
}So of course! The plugin is too smart and is doing some magic. I guess the EDIT: done |
This should fix ory#566 by prepending a ".ory" before all selectors, meaning that every component can be wrapped in something that contains the class "ory" to apply the style. Signed-off-by: Arno DUBOIS <arno.du@orange.fr>
This should fix #566 by prepending a ".ory" before all selectors, meaning that every component can be wrapped in something that contains the class "ory" to apply the style.
Related Issue or Design Document
Checklist
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact security@ory.sh) from the maintainers to push the changes.
Further comments
It's definitely not the cleanest implementation, but it's absolutely transparent to the user. That said, it seems the new version of Tailwind styles misses some styles (like cursor: pointer; on buttons). But I can confirm I had the exact same render between "old global" and "prefixed" ones. Except the fonts, but well, that's another problem and I do not mind it too much!
Overall, the only "drawback" of this solution is that we have to add an element wrapping the components with the class "ory". It's not horrible, but still not the golden solution :/
Before
After