• Resolved Jon Schroeder

    (@jonschr)


    Depending on the section, it sometimes (often) makes sense to add an anchor link to the ab-container instead of to a heading or something inside it. Could we get an option (just like the text box to add a class) to add an id to the block?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Do you mean add a property box for an anchor, CSS ID, or both?

    Thread Starter Jon Schroeder

    (@jonschr)

    I don’t think I understand the distinction you’re making. I’d like for the outermost wrapper of the an container markup for the an container to be able to have an ID, e.g <div class=“ab-whatever” id=“myidsetintheblocksettings”>

    This would allow for the wrapper itself to be used as an anchor, as typically we’re wanting to scroll the user to that section of the page, not to the heading (which might be vertically centered and scroll the user a bit too far to see the top of an image next to it or whatever).

    I guess really I don’t know what the downside would be to having this setting on all AB blocks.

    When you use the word “Anchor”, HTML anchor links spring to mind rather than a CSS ID. I’m wrapping my AB Containers in a Group block to add HTML anchors at the moment, it would be nice to have the property on the AB Container block itself 🙂

    Thread Starter Jon Schroeder

    (@jonschr)

    I hadn’t thought of using the group block for this. That would work but feels a little unnecessary (and also might screw up some css meant to target AB containers directly inside the content wrapper, as I sometimes do in order to enforce consistent padding on mobile).

    Plugin Author atomicblocks

    (@atomicblocks)

    Hey folks, thanks for the request! I’ve added this to our Github issues board as an enhancement. We’ll see about adding this in one of the next few updates!

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Anchor link to section’ is closed to new replies.