-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
use direction-responsive margin, apply black hover text color to all child text (fixes contrast ratio on dark mode hovering)
✅ Deploy Preview for ethereum-org-fork ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Nice!
Left one comment about using style props if possible.
style={{ | ||
right: "unset", | ||
insetInlineEnd: "var(--eth-sizes-4)", | ||
}} |
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 is a chakra component. Why not use style props?
style={{ | |
right: "unset", | |
insetInlineEnd: "var(--eth-sizes-4)", | |
}} | |
right="unset" | |
insetInlineEnd="4" |
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.
Tried this to start but I'm realizing that the insetInlineEnd
style prop does not seem to be properly recognized by our Chakra components... this has let to a handful of bugs throughout the site where we replaced "left" or "right" with these style props and are not being recognized
For example, https://staging--ethereumorg.netlify.app/ar/roadmap If you go to our current staging branch, this page is set to rtl
but our use of these style props in the hero are not working, which is why the Title box is still on the left.
I have another PR open on the canonical repo to address some of these:
https://github.com/ethereum/ethereum-org-website/pull/11905/files
Not 100% sure why these specific style props don't seem to be recognized... @TylerAPfledderer Any idea on this one?
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.
We may be able to get away with right="unset"
, but the other I've found only works if I nest inside style
.
And small alternative as well if we want to make it a little more Chakra-native, could use const insetInlineEnd = useToken("space", "4")
and then style={{ insetInlineEnd }}
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.
Ah okok, no worries then. Didn't know about that problem 🤔
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.
🚀
Description
ModalCloseButton
styling to force direction-responsive absolute positioning usinginsetInlineEnd
instead of defaultright
... fixes overlapping text on RTL localesml
withms
for code example list positioning on desktopCodeModal
using latest code conventionsRelated Issue
Close button on code example modal (homepage) was overlapping with label for RTL langs:

Contrast ratio was un-readable when hovering code example options in dark mode, and right margin incorrect:

With fixes:
