fix(css): width for ellipsis
This commit is contained in:
@ -15,6 +15,7 @@ If the text is longer than one line, it will be truncated and end with an ellips
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
width: 200px;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -43,6 +44,7 @@ If the text is longer than one line, it will be truncated and end with an ellips
|
|||||||
2. `white-space: nowrap` prevents the text from exceeding one line in height.
|
2. `white-space: nowrap` prevents the text from exceeding one line in height.
|
||||||
3. `text-overflow: ellipsis` makes it so that if the text exceeds its dimensions, it
|
3. `text-overflow: ellipsis` makes it so that if the text exceeds its dimensions, it
|
||||||
will end with an ellipsis.
|
will end with an ellipsis.
|
||||||
|
4. `width: 200px;` ensures the element has a dimension, to know when to get ellipsis
|
||||||
|
|
||||||
#### Browser support
|
#### Browser support
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user