File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,9 @@ html {
11
11
body {
12
12
@mixin typography-body-1;
13
13
@mixin text-smooth;
14
+ @mixin text-wrap;
14
15
15
16
color : var (--color-black );
16
- overflow-wrap : break-word; /* Break long words, while keeping them together if possible (fallback) */
17
- overflow-wrap : anywhere; /* Break long words, while keeping them together if possible */
18
17
-webkit-tap-highlight-color : transparent; /* Do not show a highlight (rectangle around the link) while tapping it */
19
18
}
20
19
Original file line number Diff line number Diff line change 13
13
}
14
14
15
15
/* ==========================================================================
16
- Ellipsis mixin
16
+ Text wrap related mixins
17
17
18
- The container needs to have a width for it to work
18
+ Please note that for text-ellipsis and text-ellipsis-multiline to work,
19
+ they most likely need to be restricted in width
19
20
========================================================================== */
20
21
22
+ @define-mixin text-wrap {
23
+ white-space : normal;
24
+ word-wrap : anywhere;
25
+ word-break : break-word; /* Needed for iOS Safari, since it does not support `word-wrap: anywhere` */
26
+ }
27
+
28
+ @define-mixin text-nowrap {
29
+ white-space : nowrap;
30
+ word-wrap : normal;
31
+ word-break : normal;
32
+ }
33
+
21
34
@define-mixin text-ellipsis {
35
+ @mixin text-nowrap;
22
36
overflow : hidden; /* "overflow" value must be different from "visible" */
23
37
text-overflow : ellipsis;
24
- white-space : nowrap;
25
- overflow-wrap : normal;
26
38
}
27
39
28
40
@define-mixin text-ellipsis-multiline $maxLineCount, $maxHeight {
41
+ @mixin text-wrap;
29
42
max-height: $maxHeight;
30
43
overflow : hidden;
31
44
/* stylelint-disable */
You can’t perform that action at this time.
0 commit comments