-
Notifications
You must be signed in to change notification settings - Fork 4
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
How can I override the default css file? #19
Comments
Hi Petassis , {% block dashboards_style %} |
I checked your link and did inspect element on it , and it seems you are using an iframe . content.js:613 @import rules are not allowed here. See WICG/construct-stylesheets#119 (comment). content.js:613 @import rules are not allowed here. See WICG/construct-stylesheets#119 (comment). Avoid using @import and instead directly include the CSS files using tags. This avoids the cross-origin issues that @import can cause in iframes. iframe.onload = () => { |
Dear Ali, Thank you for the replies. Regarding iframe, I am not sure I use one. |
Dear Petatsis, |
Dear Ali, I am not sure I see an error while loading the page. Only the matomo.js, which is don downloaded as it comes from another domain. I am still missing a way to override the default CSS stylesheet. Putting it before the template's CSS, did not work, as dashboards' CSS changes font sizes, which the template CSS does not. My current plan is to a) modify the dashboards CSS to include a prefix (namespace) for everything, and b) use a div to put dashboards content in it, which has the prefix as its class (thus I can limit the stylesheet only in the dashboards contents). But I don't know how I can override the default css in the static folder. |
Modifying the css file to add a prefix, seems to be an adequate solution. https://digitisation.vast-project.eu/dashboards/vast_dashboards/activitiesdashboard/ It event responds to the template theme changes (as I switch the classes light, dark in body). The changes I have done to the css are here: And the "customisations" are here: I would propose to do the changes in css also in the dashboards package, to ease integration with existing applications. |
I think I agree on this, we should prefix all the classes in the css with something sensible. We should also move any rules where we are setting styles on elements to a separate css file too so that it can be included in the default template but easily excluded in the case where you are including dashboards in an existing site. |
Hi all,
I am using
{% block dashboards_style %}{% endblock dashboards_style %}
to include the stylesheets, which finally results in:Is there a way to change the default css?
I want to use dashboards inside another template, and it alters also the template.
For example, it is shown like this:
https://digitisation.vast-project.eu/dashboards/vast_dashboards/activitiesdashboard/
(If you click the first sidebar menu, you will the original template rendering).
The text was updated successfully, but these errors were encountered: