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

[RFC]: Template class object binding #87

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

pmdartus
Copy link
Member

@pmdartus pmdartus commented Jan 4, 2024

This proposal aims to improve the Developer Experience (DX) around managing components with complex styles by enabling developers to describe the classes applied to an element using JavaScript objects.

Rendered

POC branch: https://github.com/salesforce/lwc/tree/pmdartus/class-shorthand

Co-authored-by: Abdulsattar Mohammed <abdulsattarmohammed@salesforce.com>
Copy link
Contributor

@abdulsattar abdulsattar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a great little utility!

text/0135-template-class-object-binding.md Show resolved Hide resolved
text/0135-template-class-object-binding.md Show resolved Hide resolved
text/0135-template-class-object-binding.md Outdated Show resolved Hide resolved
text/0135-template-class-object-binding.md Outdated Show resolved Hide resolved
Copy link
Contributor

@ravijayaramappa ravijayaramappa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, its a very intuitive improvement.

pmdartus and others added 2 commits January 5, 2024 10:26
Co-authored-by: Kevin Venkiteswaran <kkvenkit@gmail.com>
@caridy
Copy link
Contributor

caridy commented Jan 23, 2024

I don't have a strong opinion about this particular proposal. I do remember we looked at something like this in the past, and we kinda decided not to pursue it, don't remember the details from back then.

Now, if all goes well, we favor local selectors without the need for classes, in fact the new SDS architecture doesn't use classes anymore, so I expect this to be a less of a problem in the future.

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

Successfully merging this pull request may close these issues.

None yet

7 participants