flex-direction: column; を指定すると、text-overflow が効かないケースがある
A Pen by nakashima akira on CodePen.
flex-direction: column; を指定すると、text-overflow が効かないケースがある
A Pen by nakashima akira on CodePen.
| .container | |
| .text あかさたなあかさたなあかさたなあかさたな | |
| .text あかさたなあかさたなあかさたなあかさたな | |
| .container.container--column | |
| .text あかさたなあかさたなあかさたなあかさたな | |
| .text あかさたなあかさたなあかさたなあかさたな | |
| .container.container--row | |
| .text あかさたなあかさたなあかさたなあかさたな | |
| .text あかさたなあかさたなあかさたなあかさたな |
| @import "compass/css3"; | |
| .container { | |
| display: flex; | |
| align-items: center; | |
| justfy-content: center; | |
| width: 200px; | |
| padding: 50px; | |
| border: 1px solid #000; | |
| &--column { | |
| flex-direction: column; | |
| } | |
| &--row { | |
| flex-direction: row; | |
| } | |
| } | |
| .text { | |
| text-overflow: ellipsis; | |
| white-space: nowrap; | |
| overflow: hidden; | |
| } |