-
Notifications
You must be signed in to change notification settings - Fork 15
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
Make the interpolation symbols configurable #33
Comments
That could be a useful option, although I can't think of a scenario apart from yours that would call for it. I wouldn't want to encourage putting |
We're working with web components so I'm using superviews.js in conjuction with skate.js. I gave the prototype to our web dev and he created the following snippet to test out the shadow dom:
For web components, many advocate to keep the styles local to the template. Even when we want to make it external for sharing, they recommend to put it in a webcomponent template. Some are even leaning away from external style sheets. |
I see - thanks for the link. Looking at it, There are probably other tags e.g. Would this better solve your issue? BTW, out of interest, why would you choose |
Our initial fix was to use literal like the As for |
OK I'll take a look at it then and see what changes will be required. I don't think it's a case of just modifying the interpolation function to use the new configurable symbols though. I think the getAttrs method will need to change too as it uses the hardcoded |
Ferrugemjs also use superviewsjs and the only way do that is by importing |
Ferrugemjs probably only supports style imports because the underlying superviews does not support the style tag. (I wonder if the maintainers would advertise that they now support style tags if this is fixed :) ) That being said, just because this bug gets fixed does not mean that you have to use style tags. You can continue to use style imports. Nothing should break. |
@davidjamesstone I've run into a similar issue trying to use |
Thanks dak. I'll try and get this in ASAP. I'm currently overhauling the documentation for superview which is why it's been a while since the last update. |
Style tags such as the following create errors in the generated javascript:
<style>.my-class { background: red; }</style>
Superviews tries to interpolate the stuff within the curly braces.
For my purposes, I've changed the interpolate function to
Which works great for me, but forces people to use {%variable%} instead of {variable}. Instead of introducing a breaking change, I suggest making the interpolation symbols configurable.
The text was updated successfully, but these errors were encountered: