You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, clean-jsdoc-theme loads custom CSS and JavaScript files near the beginning of the <head> section of index.js. Since custom CSS files are loaded before clean-jsdoc-theme.min.css, conflicting styles in clean-jsdoc-theme.min.css override those in a custom CSS file.
In my use case I have loaded an octocat svg file to customize my menu link to my GitHub page. In my custom CSS file I use the svg as a mask-image with a background-color of currentColor to accommodate theme toggling, However, the .nav-bar-item:hover background style from clean-jsdoc-theme.min.css overrides my custom hover style. I managed a work around my using !important, but this is admittedly clumsy.
However, since my custom JavaScript is loaded before tippy.js it can't access it. I haven't yet figured out a workaround for this yet.
I think that loading custom CSS and JavaScript files at the end of the <head> section would be an easy solution. Anyone competent enough to create custom CSS and JavaScript for their docs should be able to prevent the unintended consequences of reusing variables, functions, and selectors from the index.html file, etc. (perhaps a disclaimer in your documentation).
The text was updated successfully, but these errors were encountered:
So I figured out a workaround for the JavaScript issue (rather embarrassed about this). It was simply to enclose the code in a window.onload event. Still seems a bit kludgy, but seems to work.
Currently, clean-jsdoc-theme loads custom CSS and JavaScript files near the beginning of the
<head>
section of index.js. Since custom CSS files are loaded before clean-jsdoc-theme.min.css, conflicting styles in clean-jsdoc-theme.min.css override those in a custom CSS file.In my use case I have loaded an octocat svg file to customize my menu link to my GitHub page. In my custom CSS file I use the svg as a
mask-image
with a background-color ofcurrentColor
to accommodate theme toggling, However, the.nav-bar-item:hover
background style from clean-jsdoc-theme.min.css overrides my custom hover style. I managed a work around my using!important,
but this is admittedly clumsy.Here is a portion of my jsdocConfig.json:
And here is my custom CSS:
In my second use case I would like to add a tooltip to my menu items to mirror the right-menu-items by including the following Javascript:
However, since my custom JavaScript is loaded before tippy.js it can't access it. I haven't yet figured out a workaround for this yet.
I think that loading custom CSS and JavaScript files at the end of the
<head>
section would be an easy solution. Anyone competent enough to create custom CSS and JavaScript for their docs should be able to prevent the unintended consequences of reusing variables, functions, and selectors from the index.html file, etc. (perhaps a disclaimer in your documentation).The text was updated successfully, but these errors were encountered: