How to Add CSS to Your Web Components — JavaScript Tutorial

preview_player
Показать описание
Today I'll be demonstrating a few ways to add CSS to your JavaScript Web Components - there are a few ways to do this, each with their own advantages and disadvantages.

For the Table used in this video, see my previous tutorial:

For your reference, check this out:

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!

#dcode #javascript #css
Рекомендации по теме
Комментарии
Автор

The hint with the variable-injection into the Component is pretty cool. Thanks..

AndreasLepsuch
Автор

Thanks Dom! Great info as always. I’m really enjoying this web components series. Wish I would have watched this BEFORE attempting to learn Angular. Things would have made way more sense.

kerrykreiter
Автор

Excellent video. Dom, i found just having a "tmp.css" file open and writing the css in it, then pasting it in the component, "const css " variable. This way you get the benefit of syntax highlighting while creating.

danielmadison
Автор

Good tut. I guess the vs-code extension: 'Inline HTML' give you the ability of syntax highlighting for css and html...

AndreasLepsuch
Автор

I don't use web components yet but this is quite useful for the future

TomasMisura