Giter VIP home page Giter VIP logo

Comments (4)

allejo avatar allejo commented on June 30, 2024 2

(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.

MartijnCuppens avatar MartijnCuppens commented on June 30, 2024

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.

allejo avatar allejo commented on June 30, 2024

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.

MartijnCuppens avatar MartijnCuppens commented on June 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.