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

Allow class:(class name) and style:(property-name)=(value) format #14

Open
Tal500 opened this issue Sep 5, 2021 · 0 comments
Open

Allow class:(class name) and style:(property-name)=(value) format #14

Tal500 opened this issue Sep 5, 2021 · 0 comments

Comments

@Tal500
Copy link
Owner

Tal500 commented Sep 5, 2021

Allow class:(class name) and style:(property-name)=(value) format, which is similar to Svelte class:(.) (although svelte doesn't support this style expression).

The style:(style_property)=(value) will update the HTML element using the DOM property element.style.style_property, which is cleaner and support legacy IE versions!

It will raise an exception in parsing time if both the new style:(.)=(.) format and the regular style=(.) is used, because it may conflict (and harder to set up in the JS DOM function).

Both of them will raise an exception in parsing time if the same property/class is defined twice for the same element.

This will have additionally the following advantages:

  • Support conditional attribute scheme more easily.
  • Better readability (sometimes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant