-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Fix max-w on tags in the sidebar #5256
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -78,7 +78,7 @@ const TagsSection = observer((props: Props) => { | |||||
| onClick={() => handleTagClick(tag)} | ||||||
| > | ||||||
| <HashIcon className="w-4 h-auto shrink-0" /> | ||||||
| <div className="inline-flex flex-nowrap ml-0.5 gap-0.5 max-w-[calc(100%-16px)]"> | ||||||
| <div className="inline-flex flex-nowrap ml-0.5 gap-0.5 max-w-[calc(100%-1em)]"> | ||||||
|
||||||
| <div className="inline-flex flex-nowrap ml-0.5 gap-0.5 max-w-[calc(100%-1em)]"> | |
| <div className="inline-flex flex-nowrap ml-0.5 gap-0.5 max-w-[calc(100%-1em-0.125rem)]"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The calculation
calc(100%-1em)accounts for the HashIcon withw-4class, which in Tailwind CSS is 1rem (not 1em). Consider using1reminstead of1emfor consistency with Tailwind's spacing system, asw-4equals1rem(16px at default font size). While both may work similarly in many cases,remis based on the root font size whileemis based on the current element's font size, which could lead to subtle layout differences.