Comments (4)
What I meant is that should be a discussion whether word-break: break-all
should be applied when noOfLines
caused the text to clamp.
from chakra-ui.
What I meant is that should be a discussion whether
word-break: break-all
should be applied whennoOfLines
caused the text to clamp.
Thank you for clarifying! I 100% agree and would love to move forward with that discussion. Seems like it would be a good improvement.
from chakra-ui.
Hey Haley! Thanks for your contribution.
I observed that by default, when using -webkit-line-clamp
, it uses the CSS initial value word-break: normal
, which does not break words when clamping text, the same behaviour seen in the noOfLines={n}
ChakraUI prop.
I think it would be wise to start a discussion about this change, because at the same time it makes more sense to use word-break: break-all
every time noOfLines
is applied, it would overwrite the default CSS value when trying to break lines (which is word-break: normal
).
What do you think of this?
from chakra-ui.
Hey Haley! Thanks for your contribution.
I observed that by default, when using
-webkit-line-clamp
, it uses the CSS initial valueword-break: normal
, which does not break words when clamping text, the same behaviour seen in thenoOfLines={n}
ChakraUI prop.I think it would be wise to start a discussion about this change, because at the same time it makes more sense to use
word-break: break-all
every timenoOfLines
is applied, it would overwrite the default CSS value when trying to break lines (which isword-break: normal
).What do you think of this?
Yeah, I think a discussion would be a good start. Are you saying that you think word-break: break-all
should be applied when noOfLines
is provided no matter the number of lines? If that is the case, we would get something that looks like this:
Which would be an unexpected behavior unless we hyphenate the words.
from chakra-ui.
Related Issues (20)
- Support React Server Components In Next.js !
- "_after" prop didn't work on "Input" component HOT 1
- Image Component width and height attributes HOT 2
- Custom Tag Theme Won't Apply (v2)
- Importing HOT 1
- next js dark mode
- NumberInput content is replaced with -9007199254740991 on blur when content is '-' HOT 1
- Expose `useField` hook from `FormControl` for usage in custom input components HOT 1
- useCheckbox Hook does not provide keyboard accessibility HOT 5
- ColorModeProvider doesn't respect environment
- Divider renders without styles in first time
- Popover component types don't allow `Popover.defaultProps` usage HOT 1
- InputRightElement is outside of input if there are 2+ elements inside HOT 1
- AvatarGroup should also apply `colorScheme` and `variant` to the children HOT 1
- Cursor blinking on every text component <Heading>,<Text> HOT 1
- Custom Checkbox not working for Button
- Can I use theme colors in this way?
- Performance issues with a multiple Menu components in Drawer
- Custom Theme Styles don't work for chakra sub-components (MenuItem) HOT 2
- [CLI] Unable to generate types with files that import `.svg` files HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chakra-ui.