Describe the bug
I want to create a custom css for Giscus component. I created a new stylesheet in: /styles/giscus.css and I referenced it in React:
<Giscus
[...]
theme="/styles/giscus.css"
/>
However, the component is not styled.
Console output:
Refused to apply style from 'https://giscus.app/styles/giscus.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
This means, that it's trying to get a theme from https://giscus.app, not from relative url that I passed in.
Expected behavior
Component should be styled with my custom css.
Additional Context
If I pass:
theme="../../styles/giscus.css"
it also doesn't work and console output is the same.
No, this behaviour is expected. The widget is loaded within an <iframe>, so relative paths are relative to the iframe's src host, which is https://giscus.app.
Describe the bug I want to create a custom css for Giscus component. I created a new stylesheet in:
/styles/giscus.css
and I referenced it in React:However, the component is not styled. Console output:
This means, that it's trying to get a theme from
https://giscus.app
, not from relative url that I passed in.Expected behavior Component should be styled with my custom css.
Additional Context If I pass:
it also doesn't work and console output is the same.