Box: Using "start" as a value for textAlign doesn't add text alignmentSee original GitHub issue
🐛 Bug report
"start" as a value for
textAlign prop doesn’t add any text alignment. This means it is impossible to left align content that is nested under a component with a different text alignment.
Steps to reproduce the bug
You can see a reproduction of this issue in this Sandbox https://codesandbox.io/s/ancient-wave-dr52s?file=/src/App.js:205-266. I
You should be able to left align content, no matter what the parent styles are.
Currently, the textAlign property defaults to “start”, which ends up being a no-op: https://github.com/Doist/reactist/blob/02bd83ee481b2d91e6047c30f09d9706a03a7e0a/src/new-components/box/box.tsx#L151-L153
I think it would make sense for
textAlign to not have a default value, and then make
"start" behave the same way as the other values like
- Browser: Chrome
- Created 2 years ago
- Comments:5 (5 by maintainers)