[RFC] Design Systems + Theming #800
Replies: 9 comments
-
Gatsby Themes |
Beta Was this translation helpful? Give feedback.
-
My fist impression of Gatsby Themes is that it seems like an awful lot of complexity for a limited number of cases where it would truly be useful. Having CSS-in-JS as part of the mix makes sense, but I think our need should be served with something leaner and more open. I found this short article about using Emotion with Web Components - seems like a promising path to pursue. https://css-tricks.com/web-standards-meet-user-land-using-css-in-js-to-style-custom-elements/ I played around a bit with Styled-Components in the site build but with no success; I have not used Emotion yet but it looks easy enough and it not dependent on JSX. |
Beta Was this translation helpful? Give feedback.
-
Should also have some documentation practices around handling FOUC and things like loading fonts from the build and not from Google. |
Beta Was this translation helpful? Give feedback.
-
TIL Also be aware of example usage, works nice with external files too + |
Beta Was this translation helpful? Give feedback.
-
Something worth documenting somewhere, or a good trick in general, but if you want to disable ShadowDOM for a LitElement, you can use createRenderRoot() {
return this; |
Beta Was this translation helpful? Give feedback.
-
An article on design systems when moving from stencil to lit |
Beta Was this translation helpful? Give feedback.
-
Got a pretty cool example of a project using Greenwood + Storybook + @web/test-runner working with Lit + CSS Custom properties, building a Single Page Application! 👀 🥳 |
Beta Was this translation helpful? Give feedback.
-
One suggestion I've seen to help with the FOUC and WCs is to use this trick :not(:defined) {
opacity: 0;
} To help keep custom elements hidden until their respective |
Beta Was this translation helpful? Give feedback.
-
I think with support for Import Attributes now in Greenwood, design system work is a lot more achievable, and so can close this one out. |
Beta Was this translation helpful? Give feedback.
-
Type of Change
Summary
Part of maintaining any website with some degree of UX consistency tends to require a bit of planning and implementation around a design system. A way of expressing and reusing styles across a website and its components, from things like fonts and icons, to color, to heading styles, and all sorts of readability and formatting related considerations that make any website a pleasure to use.
This RFC aims to start the discussion around how to manage these sorts of elements and how to implement them in a Web Components world, mostly when dealing with Shadow DOM.
Details
To dig into the details a bit more, some technologies / topics that should be evaluated and explored are:
I'm sure there's more, but this should get the conversation going and we can use the website to create POC branches to try different things out. Ideally avoid picking winners / losers and hopefully being able to support multiple workflows instead. We might pick our own for the website, but it shouldn't necessarily be defacto for greenwood specifically, if that makes sense.
Related Articles
Beta Was this translation helpful? Give feedback.
All reactions