Skip to content

Conversation

tylersticka
Copy link
Member

@tylersticka tylersticka commented Jul 25, 2022

Overview

The u-inline-block utility was added for a "rescue orphan" function, but it failed to accomplish this very well within links because it would disrupt text-decoration. This adds a soft default using the :where selector so if anything else is setting text-decoration on the element, it will take precedence, but otherwise it will inherit from the parent. This renames the utility to u-rescue-orphan and adds text-decoration: inherit.

Screenshots

Before After
Screen Shot 2022-07-25 at 2 21 59 PM Screen Shot 2022-07-25 at 2 22 11 PM

Testing

Deploy preview

@changeset-bot
Copy link

changeset-bot bot commented Jul 25, 2022

⚠️ No Changeset found

Latest commit: e92add5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes changesets to release 1 package
Name Type
@cloudfour/patterns Minor

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented Jul 25, 2022

Deploy Preview for cloudfour-patterns ready!

Name Link
🔨 Latest commit e92add5
🔍 Latest deploy log https://app.netlify.com/sites/cloudfour-patterns/deploys/62df0dce64c1c7000927bceb
😎 Deploy Preview https://deploy-preview-1976--cloudfour-patterns.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@tylersticka tylersticka marked this pull request as ready for review July 25, 2022 21:27
@calebeby
Copy link
Member

@tylersticka Can we set text-decoration:inherit (and maybe rename u-inline-block to something more specific to this use case)?

@tylersticka
Copy link
Member Author

@calebeby Any specific suggestions?

@calebeby
Copy link
Member

Maybe u-rescue-orphans?

@tylersticka
Copy link
Member Author

@calebeby I went with singular u-rescue-orphan as I wanted it to be clear that this doesn't apply to a parent element or magically fix all orphans.

@tylersticka tylersticka changed the title Prevent u-inline-block disrupting text-decoration Replace u-inline-block with u-rescue-orphan, include text-decoration inheritance Jul 25, 2022
@tylersticka tylersticka merged commit d5260bb into main Jul 25, 2022
@tylersticka tylersticka deleted the fix/u-inline-block-text-decoration branch July 25, 2022 21:52
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