kevintang2022 / 6s063-webcomponent_password-input

MIT License
0 stars 0 forks source link

Shadow DOM CSS not loading because of non-relative path #2

Open BarishNamazov opened 2 years ago

BarishNamazov commented 2 years ago

In script.js, the CSS is linked via <link rel="stylesheet" href="shadowdom.css">. This does not work in other webpages since I think it will try to load css file from website's root path. I fix might be using href="./shadowdom.css".

BarishNamazov commented 2 years ago

Fixing this is important for alignment. See this example: https://jsfiddle.net/vsgmLh7c/60/