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

Add square blue icon share links variant #4292

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

AshGDS
Copy link
Contributor

@AshGDS AshGDS commented Oct 8, 2024

What / Why

  • Adds a square blue icon variant of the share links component
  • Reasoning: https://trello.com/c/LNOqGMgZ/49-build-social-media-links
  • The existing component styles use position: absolute for the icons, which doesn't work nicely when we need them square. This is because the absolutely positioned icons don't affect the width/height of the DOM, so adding square padding just ended up in overlapping and bad overflows.
  • Therefore, I've used display: flex along with inline-block to get the styles we want.
  • I added a min-width at a certain breakpoint to make the reflow look nicer, though this is mainly to make the icons stack a bit nicer on the page we're going to put this variation on as we know which social icons / length of text they will be, so we can kind of control the reflow with the min-width. Of course it will be a bit of a unnecessary CSS rule if this variation was used on other pages.

Visual Changes

New example added, so will need a Percy review.

image

@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4292 October 8, 2024 15:33 Inactive
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4292 October 8, 2024 15:43 Inactive
@AshGDS AshGDS self-assigned this Oct 8, 2024
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 this pull request may close these issues.

2 participants