Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why css class is not applied?

could you please tell me why css class is not applied. ?

I imported my css external file this. @import url("https://gist.githubusercontent.com/eirikbakke/1059266/raw/d81dba46c76169c2b253de0baed790677883c221/gistfile1.css");

used like this

export default function App() {
  return (
    <div className="someclass">
      <h1 className="someclass">Hello CodeSandbox</h1>
      <h2>Start editing to see some magic happen!</h2>
    </div>
  );
}

here is my code https://codesandbox.io/s/priceless-turing-x62pz?file=/src/styles.css

like image 634
user944513 Avatar asked Mar 07 '26 13:03

user944513


1 Answers

That's because the external css file is being interpreted as text rather than a css file

The resource from “https://gist.githubusercontent.com/eirikbakke/1059266/raw/d81dba46c76169c2b253de0baed790677883c221/gistfile1.css” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff

like image 87
prabhu Avatar answered Mar 10 '26 08:03

prabhu