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

Set icon alignment in paragraph to text-bottom #5314

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

advl
Copy link
Contributor

@advl advl commented Aug 20, 2024

Done

  • Set icons in paragraph to have a vertical-align set to middle

Fixes #5103
Fixes WD-13630

QA

  • Open demo
  • Verify icons are aligned to the middle. Increase font-size if necessary to test.
  • Review updated documentation:
    • No Changes in documentation

Check if PR is ready for release

If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:

  • PR should have one of the following labels to automatically categorise it in release notes:
    • Feature 🎁, Breaking Change 💣, Bug 🐛, Documentation 📝, Maintenance 🔨.
  • Vanilla version in package.json should be updated relative to the most recent release, following semver convention:
    • if CSS class names are not changed it can be bugfix release (x.x.X)
    • if CSS class names are changed/added/removed it should be minor version (x.X.0)
    • see the wiki for more details
  • Any changes to component class names (new patterns, variants, removed or added features) should be listed on the what's new page.

Screenshots

[if relevant, include a screenshot or screen capture]

@webteam-app

This comment was marked as outdated.

@jmuzina
Copy link
Member

jmuzina commented Aug 20, 2024

Percy build shows that icons inline with paragraphs are now dipping below the baseline, so they're a bit too low.

Possibly they need to be nudged slightly upwards or have their height changed?

Screenshot 2024-08-20 at 12 00 56 PM

@lyubomir-popov
Copy link
Contributor

the issue this fixes specifies middle, not text bottom. May I ask why this pr is setting it to text-bottom?

@advl
Copy link
Contributor Author

advl commented Aug 21, 2024

@jmuzina The behaviour with middle is to align to align it vertically to the center of the parent element. As it shows in the examples on the MDN page, the middle alignment is independent from any font lines. I am unsure in our particular situation what would be the most idiomatic solution.

My past experience solving this kind of issues was to embed svgs into a font (using, for instance glyphter) - which offers more control in the way the icons shows but comes with drawbacks (extra woff file to download + accessibility concerns).

@lyubomir-popov Small typo on my end - it's actually set to middle.

@jmuzina
Copy link
Member

jmuzina commented Aug 23, 2024

Received verbal design +1 from @lyubomir-popov in standup today

scss/_patterns_icons.scss Show resolved Hide resolved
scss/_patterns_icons.scss Show resolved Hide resolved
Copy link
Member

@bartaz bartaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@bartaz bartaz merged commit 9ae2b56 into canonical:main Oct 21, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change icon alignment to middle when next to paragraph text
5 participants