Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last list anchors broken on mobile / tablet viewport #123

Closed
Nooshu opened this issue Nov 23, 2017 · 3 comments · Fixed by alphagov/tech-docs-gem#74
Closed

Last list anchors broken on mobile / tablet viewport #123

Nooshu opened this issue Nov 23, 2017 · 3 comments · Fixed by alphagov/tech-docs-gem#74

Comments

@Nooshu
Copy link

Nooshu commented Nov 23, 2017

Note: Copied this issue from the GDS Way.

To reproduce:

margin-issue

Issue caused here

h3, h4, h5, h6 {
    @include heading-offset($gutter);
  }

Proposed fix:

  1. Either remove usage of the mixin in this case and add specific styling manually (less padding, no negative margin)
  2. Continue to use the mixin but add an override after it's usage

Option 1 seems like the cleanest to me with minimal impact.

selfthinker added a commit to alphagov/tech-docs-gem that referenced this issue Jan 9, 2019
We don't need the 'sticky TOC offset' when there is no TOC.
This removes that when there is no sidebar and therefore no TOC.

This fixes that the Menu isn't clickable on mobile
when the TOC is not there.
It also fixes links above headings not being clickable,
[alphagov/tech-docs-template#123],
but only in the case when there is no sidebar.
selfthinker added a commit to alphagov/tech-docs-gem that referenced this issue Jan 17, 2019
We don't need the 'sticky TOC offset' when there is no TOC.
This removes that when there is no sidebar and therefore no TOC.

This fixes that the Menu isn't clickable on mobile
when the TOC is not there.
It also fixes links above headings not being clickable,
[alphagov/tech-docs-template#123],
but only in the case when there is no sidebar.
selfthinker added a commit to alphagov/tech-docs-gem that referenced this issue Jan 17, 2019
We don't need the 'sticky TOC offset' when there is no TOC.
This removes that when there is no sidebar and therefore no TOC.

This fixes that the Menu isn't clickable on mobile
when the TOC is not there.
It also fixes links above headings not being clickable,
[alphagov/tech-docs-template#123],
but only in the case when there is no sidebar.
@selfthinker
Copy link

I have used a crude hack in my current project because otherwise people would not be able to get to an important page. I just used a <br /> before that heading to increase the space on
https://raw.githubusercontent.com/alphagov/accessibility-personas/master/source/setup/index.html.md

@richardTowers
Copy link
Contributor

selfthinker added a commit to alphagov/tech-docs-gem that referenced this issue Feb 8, 2019
Bug: When links are in the last line above a heading,
they are currently not clickable.

Feature: Following a link to an anchor on mobile currently
appears underneath the sticky table of contents.

But that feature also causes the unclickable links bug,
which is why this removes that feature again.

Therefore this intentionally re-introduces the lesser evil
that headings will appear underneath the TOC on mobile.

This fixes alphagov/tech-docs-template#123.
selfthinker added a commit to alphagov/tech-docs-gem that referenced this issue Feb 8, 2019
Bug: When links are in the last line above a heading,
they are currently not clickable.

Feature: Following a link to an anchor on mobile currently
appears below the sticky table of contents.

But that feature also causes the unclickable links bug,
which is why this removes that feature again.

Therefore this intentionally re-introduces the lesser evil
that headings will be hidden underneath the TOC on mobile
to fix alphagov/tech-docs-template#123.
selfthinker added a commit to alphagov/tech-docs-gem that referenced this issue Feb 8, 2019
Bug: When links are in the last line above a heading,
they are currently not clickable.

Feature: Following a link to an anchor on mobile currently
appears below the sticky table of contents.

But that feature also causes the unclickable links bug,
which is why this removes that feature again.

Therefore this intentionally re-introduces the lesser evil
that headings will be hidden underneath the TOC on mobile
to fix alphagov/tech-docs-template#123.
@selfthinker
Copy link

This has now been fixed in alphagov/tech-docs-gem#74.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants