Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load css #6

Open
tony-philipose opened this issue Jul 2, 2021 · 3 comments
Open

Unable to load css #6

tony-philipose opened this issue Jul 2, 2021 · 3 comments

Comments

@tony-philipose
Copy link

tony-philipose commented Jul 2, 2021

First, I have added the custom app to the site contents, the styles become loaded successfully, then remove the app from the site contents of a particular site and then re-install it, but the CSS is not loading??

@tony-philipose tony-philipose changed the title Unable load css Unable to load css Jul 2, 2021
@hugoabernier
Copy link
Owner

@tony-philipose can you take a look if there are any error messages in your browser's developer console?

@mcxycross
Copy link

mcxycross commented Aug 12, 2022

I have the same issue and the error in the browser console was the following:

Refused to apply style from 'https://tenant.sharepoint.com/Style%20Library/custom.css' because its MIME type ('') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Is there a way to fix this?

@arthur469
Copy link

arthur469 commented Jul 19, 2023

The path of your CSS file seems to be incorrect. By default it's $customCSSUrl = "/Style%20Library/custom.css"
You should modify the value of $customCSSUrl by the location of your custom.css.

If your custom.css file is host on a site, then, $customCSSUrl = /sites/{your-site-name}/Style%20Library/custom.css

Hope it will help somebody.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants