-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
[Bug Report] Word Wrapping in Card Title breaks words before wrapping the line. #9130
Comments
Yes, think it is a bug as well. affected Components:
temporary solution:
|
It was intended, introduced here 81af19d Any feedback is appreciated, it was the best option for all browsers. There were a few better options but they were trashed on IE11. |
Was IE11 the only browser holding back a better solution? |
I understand the goal to be compliant with all browers. However, it is now quite hugly and hard to read by default. Maybe a new VCard prop could ease this configuration. |
I agree, this is highly reprehensible behavior, so in my view this is probably not a good tradeoff for IE 11 support. I agree with the idea of a special prop also. |
I also agree that this is an ugly default option.. the css workaround should be for those having problems on ie11 |
I am not shure how sass/scss and/or building tools are able to handle CSS-Hacks but maybe we can separate this "special problem" via CSS-Hack? indeed it will not be the best solution. eg: or IE 9-11 IE11 only SCSS
this one taken from: saadeghi/browser-hack-sass-mixins |
Looking at the roadmap, the 2.3 release with preconfigurable components seems like a good place to add a parameter for this issue |
It's also worth noting that Microsoft won't be installing IE by default on Windows anymore. |
Thanks for the comments, I thought I was missing something with all my card-titles breaking mid-word. It makes my app look ugly and hard to read. I also vote against the word break by default. |
@dnl13 thanks a bunch. |
Agree with using a prop in v-card to change the word-breaking property, specially because IE is less and less used every day that passes. |
I think that modern browsers should be supported first and foremost before we try to make special accomodations for IE. There are plenty of ways for doing CSS that is exclusive to IE and CSS that is ignored by IE. This word break behavior is glaring. Its distracting for users. Users who encounter it have to make extra effort to understand the contents of the card title by putting the fragmented words together. This does not make a pleasing experience. Some people, users, can get very worked up over stuff like this. So if support for IE is a serious concern, then there are harder but better paths to solving this. Personally, I think that browsers should use their default text wrapping behavior for something like this. |
workaorund for vuetifyjs/vuetify#9130
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Thanks, you're a time saver 👍 :) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The workaround from @dnl13 is working fine for me. |
This comment has been minimized.
This comment has been minimized.
fixed in c44edc1 If you have any questions, please reach out to us in our Discord community. |
I'm using Vue 3 and classes changed. This worked for me: .v-card-text, .v-card-title { |
Currently the best solution for vuetify 2.6
|
Actually, there is an appropriate variable: |
Environment
Vuetify Version: 2.0.19
Vue Version: 2.6.10
Browsers: Chrome 77.0.3865.90
OS: Mac OS 10.14.6
Steps to reproduce
Create a card and restrict it's width. Put in a long string into the title component of the card. Observe how the words are broken instead of the line.
Expected Behavior
When the card title component is too narrow to contain it's text, it should line wrap first, then word break if a word is on its own line and is going to overflow.
Actual Behavior
The card title breaks the word before it wraps the line.
Reproduction Link
https://codepen.io/MatthewAry/pen/WNeWmPp
Other comments
A solution is provided in the codepen in the form of a css class.
Also see: https://drafts.csswg.org/css-text-3/#word-break-property and note that this solution might not be appropriate for some languages.
The text was updated successfully, but these errors were encountered: