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

Fix rounded links buttons on iOS 15.5 #1216

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

Arkkimaagi
Copy link
Contributor

Description

Fix iOS 15.5 (and hopefully 15.8) rounded link buttons.

Related Issue

I do not have an issue yet, but I do have an slack message with a thread: https://helsinkicity.slack.com/archives/CHCV3KTHA/p1705669479076289

Motivation and Context

It seems that at least iOS 15.5 and 15.8 render links in a weird way if -webkit-appearance: button; is set. They ignore border-radius and padding properties from css if it is set. More current iOS versions do not have this problem.

This problem comes probably from the original mindset of .hds-button only applying to <button> elements when the normalize.css code was being merged with the button code. Now that .hds-button is also used for <a href="...-elements, the assumption fails.

By modifying the button.css code we can get the original intent of normalize.css to work better in this case and exclude link buttons from the -webkit-appearance: button issue.

How Has This Been Tested?

On an iOS simulator for iOS 15.5

Screenshots (if appropriate):

Screenshot of a modified hds documentation page with <button> and two <a href links with similar styles but different rendering on iOS 15.5.

image
image

Screenshot of originating source for normalize.css
image

Add to changelog

  • Added needed line to changelog

Copy link
Contributor

@mrTuomoK mrTuomoK left a comment

Choose a reason for hiding this comment

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

Ok, good fix 👍

Copy link
Contributor

@laurakarhu laurakarhu 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 to me! Thanks!

@mrTuomoK mrTuomoK merged commit d0af37a into City-of-Helsinki:development Mar 6, 2024
6 checks passed
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.

3 participants