question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[@thumbtack/thumbprint-react]: Link uses inline-block

See original GitHub issue

Issue

Looks like the inline-block is being applied by: https://github.com/thumbtack/thumbprint/blob/171bd7d8ce1f9b86a190d256addeb39f987d4f54/packages/thumbprint-react/components/UIAction/plain.module.scss#L4

This means that <Link to="#">I am a link</Link> will wrap as a block and not at the word level.

I assume it was added to handle the case of an icon next to text. https://thumbprint.design/components/link/react/#example-link-with-an-icon

Expected

It should respond an an inline element so it mimics the a tag behavior.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
tomgenonicommented, May 1, 2019

I’m guessing since links are usually one or two words that the block wrapping was not apparent.

I think 1 is probably the right way to go. That is the expected behavior out of the box. I can do the migration, it doesn’t look too bad.

0reactions
webbowercommented, Dec 10, 2019

Without knowing all the edge cases, I would go with making the component display: inline by default and display: inline-block when an icon is present. Not sure how display: inline would break tab titles.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Link - (React) - Thumbprint Design System
The Link component can be used to render plain text links. Learn more about Thumbtack on Facebook. <React.Fragment> Learn more about <Link to="https://www....
Read more >
Tidying the backlog · GitHub
Thumbprint is the design system at Thumbtack. Contribute to thumbtack/thumbprint development by creating an account on GitHub.
Read more >
React-Router Link entire (inline-)block instead of just text?
Should be simple enough to fix with CSS by adding display: block to the CSS of the <a> . Edit: The padding on...
Read more >
Functional CSS in Practice • Tom Genoni • Frontend Designer
At Thumbtack, frontend developers use a hierarchy of technologies. They first check to see if a React component exists, either in Thumbprint ......
Read more >
web-components-font-awesome - CodePen
Insecure Resource. The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found