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

Calculate line-height to control total flag height #2365

Merged
merged 4 commits into from
Jun 27, 2022

Conversation

jkaltoft
Copy link
Collaborator

@jkaltoft jkaltoft commented Jun 22, 2022

Fixes #1904

Which issue does this PR close?

This PR closes # (insert issue number here)

What is the new behavior?

The intrinsic height of a Flag (or any element) is defined by its font-size, vertical padding, border width and line height. By calculating the line-height we can control the total height of a Flag and make it match a defined target height.

Does this PR introduce a breaking change?

  • Yes
  • No

Are there any additional context?

The difference is subtle but here it is:

Before

image

After

image

Checklist:

The following tasks should be carried out in sequence in order to follow the process of contributing correctly.

Reminders

  • Make sure you have implemented tests following the guidelines in: "The good: Test".
  • Make sure you have updated the cookbook with examples and showcases (for bug fixes, enhancements & new components).

Review

  • Do a self-review.
  • Request that the changes are code-reviewed
  • Request that the changes are UX reviewed (only necessary if your PR introduces visual changes)

When the pull request has been approved it will be merged to develop by Team Kirby.

@github-actions github-actions bot temporarily deployed to pr-1904-flag-wrong-heights June 22, 2022 14:19 Inactive
@RasmusKjeldgaard RasmusKjeldgaard merged commit 06fbe01 into develop Jun 27, 2022
@RasmusKjeldgaard RasmusKjeldgaard deleted the bug/1904-flag-wrong-heights branch June 27, 2022 07:29
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.

[BUG] Wrong height of Flag in sizes SM & MD
2 participants