-
-
Notifications
You must be signed in to change notification settings - Fork 403
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: Product name truncated #7502 #9618
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9618 +/- ##
=======================================
Coverage 49.28% 49.28%
=======================================
Files 66 66
Lines 20546 20546
Branches 4946 4946
=======================================
Hits 10126 10126
Misses 9132 9132
Partials 1288 1288 ☔ View full report in Codecov by Sentry. |
// Force the height and use line-clamp of the product name so that | ||
// icons below are vertically aligned with other cards on the same line | ||
display: -webkit-box; | ||
-webkit-box-orient: vertical; |
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.
This seems to be related to the (old?) standard display: box
, but box-orient
is apparently deprecated according to https://developer.mozilla.org/en-US/docs/Web/CSS/box-orient#browser_compatibility? Or is that related to the W3C draft?
@alexgarel in fact it depends on the screen width, there is a .v-space-tiny class that gets from 3.5 pixels to 10.5 pixels as the screen grows, but it has no sense here as we put in more columns when the screen grows.. I'll try replacing it with a fixed size instead. |
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.
Thank you so much for this change @TCatinaud , it's perfect. :)
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
What
The product name is truncated due to a fixed height defined in the product link. This allows you to have a list of products with a unified height.
Several solutions are possible (such as using grids), I preferred:
-webkit-line-clamp
property to display 3 points if the text is longer. The latter is still in WD but supported by 97% of browsers and offers gracefull degradation if not supported.The full product name remains accessible by screen readers and when hovering over the map (via the title attribute of the link).
I also added the line-clamp when JS is activated with the alternative in the link title.
Screenshot
Related issue(s) and discussion