finsweet / developer-starter

Developer starter template for Finsweet projects.
https://www.finsweet.com/
187 stars 67 forks source link

Handle CSS Files with localhost #30

Closed initweb-fr closed 1 year ago

initweb-fr commented 1 year ago

For a recent project, I dynamically added custom class based on cms element width/height ratio. Then, I needed to style them in css with specific properties.

Couldn't add style them in Webflow, because my JS Script hasn't been run yet. Couldn't add style in Inspector, because I needed to refresh the page for a specific element.

So, I created a css file in my Developer Starter File, imported it in the index.ts, try pnpm dev and discovered that my css file was accessible at http://localhost:3000/index.css. There is no documentation about it in this repo, and I think it could be very useful for a lot of people to handle css in there developer starter file.

alexiglesias93 commented 1 year ago

Addessed in #33 , thanks for the suggestion!