dmv.community is one of the many independent Mastodon servers you can use to participate in the fediverse.
A small regional Mastodon instance for those in the DC, Maryland, and Virginia areas. Local news, commentary, and conversation.

Administered by:

Server stats:

155
active users

#WebComponents

4 posts4 participants0 posts today

I'm in total agreement with this post: gomakethings.com/the-shadow-do - the ability to have a global CSS system is something that has been encouraged for YEARS as a matter of reducing the download footprint, yet shadow dom discourages this.

And there shouldn't be any technical reason why slots should require shadow. take this declared child, move it to that spot in my html structure. It can be (and has been) faked by multiple frameworks including lit, stencil, and JET.

'generic' web components that use internal CSS to define the layout, and then rely on a global css system to be flexible in appearance, is what we web-devs really want.

Logo
gomakethings.comThe Shadow DOM is an antipatternIn my video on building a modern web app with vanilla Web Components, I mentioned that I believe the Shadow DOM is an antipattern when using Web Components. I had a few folks in the comments ask me why. After all, the Shadow DOM is touted as one of the premiere features of working with Web Component. And certain features, like slots, require the Shadow DOM to work. I’ve built a lot of Web Components over the last couple of years, and in my experience, the Shadow DOM creates more problems than it fixes.

What's the best way to provide default styles for a web component?

like: most web components do have `display: inline` but sometimes a display: block; would be better.

I guess my approach would be to never set any styles at all in the JS and say: the defaults are what the user agent gives you. But I did wonder if I can say somehow: "this element is a block element and not an inline element", without having a FOUC (Flash of Unstyled Content). #WebComponents

So…whether you like generative images or not (heck, I’m not sure if I like generative images, especially not this way) we made a thing at my new(-ish) gig: preview.reve.art/ It’s the ways of making images AFTER this first foray that I’m most excited about, but “any sufficiently complex system…”. Check it out as you will and share what you’re able to bring to live?

preview.reve.artReve: Bring your ideas to lifeBring your ideas to life with Reve.Art

Today, I'm excited to release the CEM Validator for your #webcomponents!

This is designed to be an automated check before your components go to production. I know there is a ton of stuff that can be added to this, but I decided to start small. Features include:

✅ package.json validation
✅ module and definition path validation
✅ a check to ensure you are exporting all types for your APIs
✅ a check to make sure the tag name is present for your components

wc-toolkit.com/cem-utilities/c

Web Components ToolkitCustom CEM TypesTypes to make working with custom data in the CEM easier

Today, I'm excited to roll out the #webcomponents lazy loader tool!

This is great for environments where teams need to be able to drop in a <script> tag and begin building. The tool only loads what's on the page and progressively loads more as the page content changes. Other features include:

✅ Eager loading
✅ Dependency configuration
✅ Tag scoping
✅ Reduced FOUC settings
✅ Runtime configuration
✅ Ability to extend the component list

#html #css #javascript #webdev
wc-toolkit.com/adoption/lazy-l

Web Components ToolkitLazy LoaderA tool for generating an entry point for lazy-loading custom elements/web components.

Has anyone come across any #js lib that helps wire up points (times) in a video to functions? I'm probably going to roll my own, but just wondering if there is any good prior art. The task I have been set is to connect docs and videos together to form sort of tutorial content.