Implement partial override at specific size #4915
-
Hello, I'm curious if it is possible to use a partial to override a part of the theme at certain sizes. For example, to use a custom header at desktop sizes, but revert to the nav system provided by the Material theme at smaller viewports. Thanks for the time. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes, that's possible. I suggest that you look at our navigation tabs implementation that is only mounted on screens above Specifically here: mkdocs-material/src/partials/tabs.html Lines 26 to 39 in 99eed0e ... and here: mkdocs-material/src/assets/stylesheets/main/components/_tabs.scss Lines 44 to 47 in 99eed0e Note that |
Beta Was this translation helpful? Give feedback.
Yes, that's possible. I suggest that you look at our navigation tabs implementation that is only mounted on screens above
1220px
.Specifically here:
mkdocs-material/src/partials/tabs.html
Lines 26 to 39 in 99eed0e
... and here:
mkdocs-material/src/assets/stylesheets/main/components/_tabs.scss
Lines 44 to 47 in 99eed0e