#CSS - overwrite style with external CSS file

4 messages · Page 1 of 1 (latest)

storm bough
#

Hey guys,

I am trying to overwrite the app style build with SCSS with an external file.

I am loading the global.scss style file in my layout and load the customers css afterwards.

---
import "@/styles/global.scss";
---

<link
    rel="stylesheet"
    href="styles/customer.css"
/>

After building the app the customers style is not applied because it is overwritten by global styles.

How can I load the customers css after the global style?

storm bough
#

In DEV mode locally the global style is injected in a style tag at the end of the head tag.

So all i have to solve is how to load the custom styles at the end, after the global styles.

Anyone had this issue before or have an idea how to solve this?

storm bough
#

CSS - overwrite style with external CSS file

wispy dagger
#

You can try using a ?url import with a <link> tag to control the order of your CSS: ```jsx

import globalCSS from '@/styles/global.scss?url'

<link rel="stylesheet" href={globalCSS} />
<link rel="stylesheet" href="styles/customer.css" />