feat: improve word wrap (#4506)

This commit is contained in:
neverland 2019-09-19 16:03:31 +08:00 committed by GitHub
parent 5a84bc8cc5
commit 68da81a51a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 10 additions and 7 deletions

View File

@ -22,7 +22,7 @@ export default {
box-sizing: border-box; box-sizing: border-box;
pre { pre {
word-break: break-all; word-wrap: break-word;
} }
} }
} }

View File

@ -11,7 +11,7 @@ code {
font-family: @van-doc-code-font-family; font-family: @van-doc-code-font-family;
line-height: 24px; line-height: 24px;
white-space: pre-wrap; white-space: pre-wrap;
word-break: break-all; word-wrap: break-word;
} }
pre { pre {

View File

@ -40,7 +40,7 @@
&__title, &__title,
&__desc { &__desc {
word-break: break-all; word-wrap: break-word;
} }
&__title { &__title {

View File

@ -35,6 +35,7 @@
// allow newline charactor // allow newline charactor
white-space: pre-wrap; white-space: pre-wrap;
text-align: center; text-align: center;
word-wrap: break-word;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
&--has-title { &--has-title {

View File

@ -51,7 +51,7 @@
&__text { &__text {
color: @grid-item-text-color; color: @grid-item-text-color;
font-size: @grid-item-text-font-size; font-size: @grid-item-text-font-size;
word-break: break-all; word-wrap: break-word;
} }
&__icon + &__text { &__icon + &__text {

View File

@ -57,6 +57,7 @@
&__content { &__content {
position: relative; position: relative;
white-space: normal; white-space: normal;
word-wrap: break-word;
} }
} }
} }

View File

@ -9,6 +9,7 @@
// allow newline charactor // allow newline charactor
white-space: pre-wrap; white-space: pre-wrap;
text-align: center; text-align: center;
word-wrap: break-word;
&--primary { &--primary {
background-color: @notify-primary-background-color; background-color: @notify-primary-background-color;

View File

@ -8,7 +8,7 @@
color: @sidebar-text-color; color: @sidebar-text-color;
font-size: @sidebar-font-size; font-size: @sidebar-font-size;
line-height: @sidebar-line-height; line-height: @sidebar-line-height;
word-break: break-all; word-wrap: break-word;
background-color: @sidebar-background-color; background-color: @sidebar-background-color;
border-left: 3px solid transparent; border-left: 3px solid transparent;
user-select: none; user-select: none;

View File

@ -75,7 +75,7 @@
font-weight: 500; font-weight: 500;
font-size: 22px; font-size: 22px;
vertical-align: middle; vertical-align: middle;
word-break: break-all; word-wrap: break-word;
} }
&__goods-price { &__goods-price {

View File

@ -22,7 +22,7 @@
// allow newline charactor // allow newline charactor
white-space: pre-wrap; white-space: pre-wrap;
text-align: center; text-align: center;
word-break: break-all; word-wrap: break-word;
background-color: @toast-background-color; background-color: @toast-background-color;
border-radius: @toast-border-radius; border-radius: @toast-border-radius;
transform: translate3d(-50%, -50%, 0); transform: translate3d(-50%, -50%, 0);