themes
themes copied to clipboard
TextField align right, (on rtl direction) result in no padding.
Use-case
In some use-case, it's a good idea to align number in text field to right, so it would be easy to compared with other fields.
Actual Result
Using text-align: right
Result in no padding.
Using direction: ltr
It does display number with padding but the cursor behavior is incorrect, cursor will goes right when pressing left arrow.
Desire result
Without changing the direction, it would be nice to have a way to properly align text right.
Cause
Since radix using text-indent
for the padding. It only works with the direction of the text.
Fix ??
Changing text-indent
to padding-left
and padding-right
seems to solve the problems.
There’s a couple good reasons for why we use text-indent, but I agree that there should be a first-class way to do right-aligned input fields; center-aligned too. We'll look into it at some point.
For now feel free to use inline style overrides to achieve that.
Another issue pops up when the text gets really long – there's no padding on the right side.
Another issue pops up when the text gets really long – there's no padding on the right side.
Pretty sure that one is intentional @vladmoroz right?
Another issue pops up when the text gets really long – there's no padding on the right side.
That's intentional – what the problem here?
Oh sorry, I always thought there should be padding on both sides.
I get that having padding on both sides looks nicer, but maybe the lack of padding could serve as a visual clue that the text is overflowing, right?