-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add <style> tag support *within* each <template> #35
Comments
If we support |
I'm i'm 50/50 on whether or not I agree with this, because I agree we shouldn't break the web -- but in practice when would someone want a component to modify the global styles? |
When we need to programatically generate styles. It is a very powerful tool when you need it. |
sounds good to me. |
Updated the examples in the OP |
Here is the package that already (kinda) implements this feature (but not with classes): https://github.com/cardstack/glimmer-scoped-css |
Update:
|
Update 3:
scoped
(this is default, so to specify is redundant):deep()
for punching under the component boundary (such as when styling an external library)global
attribute.Update 2: I don't think it's a good idea to support
<style>
as a vanilla tag in gjs/gts -- we don't have the bandwidth to implement support for that across the 10+ syntax parsers that the community needs to support.Example for Update 2
Example, each component's
style
has its own scope.Update: per discussion below, in-
<template>
styles now have thescoped
attribute.We'd want to include a lint for folks to enable.
forbid-global-style-tag
or something like that -- that way folks can still do global styles in a component if they really want toRemoved after update 2 (see above)
Additionally, related to #34
these features should be able to work together:
Here, precedence should be that:
The text was updated successfully, but these errors were encountered: