Comments (4)
(Btw, we're just asking this because this would be handy to use in the Bootstrap docs, totally fine if you decide not to implement this)
If it's useful to Bootstrap docs, I'm sure someone else will have similar needs so it's worth investing time into implementing this feature
from jekyll-anchor-headings.
Maybe sketch a bit why we need this. We have a fixed header on our documentation pages (http://getbootstrap.com/docs/4.1/getting-started/introduction/#quick-start). With the inner wrapping div we set a title offset so that the title doesn't go below the navigation.
from jekyll-anchor-headings.
So what's currently being generated is this:
<h1>
My Heading
<a href="#heading">#</a>
</h1>
Which of these options are you talking about being generated?
<h1>
My Heading
<div>
<a href="#heading">#</a>
</div>
</h1>
<h1>
<div>
My Heading
<a href="#heading">#</a>
</div>
</h1>
Should be simple enough to add, but couldn't this be solved with a ::before
to the headings?
from jekyll-anchor-headings.
Last option.
We use a ::before
at the moment, but because of that, we overlap some content before the title. To make sure the content before the title is still interact-able (eg clicking links), we set pointer-events: none
to the titles. Then we add pointer-events: auto
to the wrapping <div>
to make links in the title clickable.
Ow, I also think it's better to use a <span>
instead of a <div>
, a <div>
is not valid (something we've also just changed in Bootstrap twbs/bootstrap#27695).
And it would be nice if we can also add a class to the wrapper.
(Btw, we're just asking this because this would be handy to use in the Bootstrap docs, totally fine if you decide not to implement this)
from jekyll-anchor-headings.
Related Issues (15)
- Don't generate anchor if there's no ID HOT 2
- Thank you! HOT 1
- Aria, or other attribute support HOT 2
- Raw text outside tags causes broken HTML to be rendered HOT 7
- Restrict heading range
- Headings inside header elements cause broken HTML with missing text to be rendered HOT 2
- ">" should be added? HOT 2
- Strip HTML in %heading% for anchorTitle HOT 1
- Links do not have a discernible name HOT 4
- Does not process content before first heading HOT 3
- Accessibility issue: [aria-hidden="true"] elements contain focusable descendants HOT 1
- Exclude specific HTML headings with specific class
- Excluding/limiting by class HOT 2
- Messes with horizontal rules HOT 1
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 jekyll-anchor-headings.