uswds / uswds-proposals

Proposals for USWDS components
Creative Commons Zero v1.0 Universal
3 stars 1 forks source link

Add proposed ADR for Lit framework #7

Open heymatthenry opened 3 months ago

heymatthenry commented 3 months ago

I do believe the styling approach on Lit can be less flexible than StencilJS, but overall they are similar in that they're a light layer on top of the native APIs.

I think that's right about the light layer on top of native APIs. I think under the hood what's happening here:

https://github.com/uswds/uswds-next/blob/ff9102731831c554b95e5c06e917596e57523c3b/web-components/src/components/usa-banner/index.js#L23-L34

…is a mix of the adopted stylesheet (for the imported sass) and constructed stylesheet (for the CSS-in-looking stuff) APIs

Whichever way we end up going, we'll need to have a story about how styles are packaged and how we're going to use custom properties, but that's a separate issue.

mahoneycm commented 2 months ago

I've been enjoying the Lit experience so far! I enjoy being able to write in vanilla JS over TS. The ability to pull in SCSS while we make style decisions has also made getting started pretty effortless. Using reactive properties has also made experimenting with variant attributes / classes a breeze 👍

annepetersen commented 2 weeks ago

Did we want to address whether we want to capitalize Web Components in here? (right now it's not capitalized in this doc, but in other places like the README we're doing so consistently to differentiate from USWDS components)