Skip to main content
Question

Linking a local CSS file for the plugin UI in HTML

  • May 26, 2023
  • 1 reply
  • 1865 views

I want to use this UI library which was introduced in Figma’s official tutorial for plugin development.

GitHub

I installed this library with NPM.
But I can’t link the CSS file.

Here’s my html code.

<link rel="stylesheet" href="node_modules/figma-plugin-ds/dist/figma-plugin-ds.css">

The path for the href is not wrong, because VS Code can follow the link.
I tried to put the link tag in head tag, but it didn’t work.

Plus, if I use CDN for the CSS like this, it works.

<link
  rel="stylesheet"
  href="https://cdn.jsdelivr.net/gh/thomas-lowry/figma-plugin-ds/dist/figma-plugin-ds.css"
/>

But I don’t want to use this, because of the delay of style adjustment. It makes the UI blink.

What am I doing wrong? I want to link this CSS file in my local!
Thank you.

This topic has been closed for comments

1 reply

tank666
  • 4863 replies
  • May 26, 2023

@hoodie0512,


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings