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
I am currently designing a custom sphinx theme that will end up being heavily used with MyST-NB.
The theme inherits from base and takes a very different styling approach, which results in quite a few "conflicts" when mystnb.css is loaded.
But I don't know what the best solution would be to solve these issues.
I would rather not create CSS rules that "overwrite" the mystnb.css configuration by appending !important, especially since I would still like users to provide custom CSS files that do not require !important.
The "issue" is that the theme CSS is loaded before possible extensions (which makes sense in most cases).
So one approach I was thinking about was to try to reduce the priority of mystnb.css to ensure that it is loaded before the theme.
But I am not sure how to accomplish this on a theme level, as a potential theme user wouldn't have to load MyST-NB.
I definitely plan on looking into this in more detail on my own, but maybe someone from the community has some experience with Sphinx theming and knows exactly what I am looking for :)
It definitely feels backward trying to "overwrite" the behavior of the extension.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all. :)
I am currently designing a custom sphinx theme that will end up being heavily used with MyST-NB.
The theme inherits from
base
and takes a very different styling approach, which results in quite a few "conflicts" whenmystnb.css
is loaded.But I don't know what the best solution would be to solve these issues.
I would rather not create CSS rules that "overwrite" the
mystnb.css
configuration by appending!important
, especially since I would still like users to provide custom CSS files that do not require!important
.The "issue" is that the theme CSS is loaded before possible extensions (which makes sense in most cases).
So one approach I was thinking about was to try to reduce the priority of
mystnb.css
to ensure that it is loaded before the theme.But I am not sure how to accomplish this on a theme level, as a potential theme user wouldn't have to load MyST-NB.
I definitely plan on looking into this in more detail on my own, but maybe someone from the community has some experience with Sphinx theming and knows exactly what I am looking for :)
It definitely feels backward trying to "overwrite" the behavior of the extension.
PS: Loving the work on MyST-NB. ❤️
Beta Was this translation helpful? Give feedback.
All reactions