Comments (5)
Thanks for suggesting. I hope I understand you correctly, but this feature request does not talk about content tabs, but about collapsible admonitions. I've adjusted the title to reflect that, so others can find this feature request more easily
From our perspective, albeit a valid feature request, it's a rather edgy use case, and I'm not sure if this helps when you're in the middle of an admonition/details block, as you'd need to scroll further down to find the bottom. Thus, we're considering this out of scope, which means we're currently not considering this to be ready for inclusion.
However, you can achieve something that implements almost the same functionality with a few lines of additional CSS:
.md-typeset summary {
position: sticky;
top: 48px;
z-index: 1;
backdrop-filter: blur(10px);
}
Now, when scrolling down, the header of the container will stick to the top, so you can close it at any scroll position:
Ohne.Titel.mp4
from mkdocs-material.
The video somehow does not play on firefox. On edge was ok. I added the css lines to my css and somehow I do not obtain the same effect. I also tried with a clean css stylesheet, just in case I had some conflicting entries, but still not working. But indeed, that would be a solution to my proposal.
from mkdocs-material.
So, I've checked the proposed solution again, and it works for me. I've created a minimal reproduction that you can check out and run and play with: 9.5.19-sticky-details.zip
from mkdocs-material.
You can apply this to specific admonition types like so:
.md-typeset .TYPE>summary {
position: sticky;
top: 48px;
z-index: 1;
backdrop-filter: blur(10px);
}
Or as another class:
.md-typeset .follow > summary {
position: sticky;
top: 48px;
z-index: 1;
backdrop-filter: blur(10px);
}
??? info follow
This admonition's header will now follow you down the page.
from mkdocs-material.
So, I've checked the proposed solution again, and it works for me. I've created a minimal reproduction that you can check out and run and play with: 9.5.19-sticky-details.zip
I confirm it is working. Thank you.
from mkdocs-material.
Related Issues (20)
- Add PlantUML Markdown extension schema HOT 1
- Version switcher lately never succeeds at staying on the same page HOT 15
- FR: Support Variable from Pyproject.toml HOT 1
- "Copy" in code blocks inject double newlines HOT 8
- Custom Icons: size and color info missing in documtation HOT 1
- multi blog instances share the same `post_date_format` date filter HOT 8
- Instant navigation: toc item requires two clicks after navigating away and returning HOT 5
- Default value for search-plugin separator has a typo HOT 1
- Version selector is not displayed correctly after enabling showing version alias HOT 4
- Mermaid Viewer Control box? How can we use it? HOT 5
- Insiders tag plugin conflicts with markdown_extensions.toc HOT 5
- Section display text alias overridden with same .md files HOT 2
- Add tab index to `.md-search__scrollwrap` in the `search` plugin HOT 10
- [change(feature) request] Page Subtitle for Blog Posts HOT 3
- Annotation doesn't work inside markdown tables HOT 2
- Running "mkdocs serve" through Docker results in "Connection reset by peer" HOT 4
- Comment: The comment page must be refreshed to appear. HOT 4
- included in the 'nav' configuration, which is not found in the documentation files. HOT 1
- Blog issue - TypeError: unsupported operand type(s) for |: 'ABCMeta' and 'NoneType' HOT 1
- Cannot use numbers as titles HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mkdocs-material.