Created
August 10, 2015 08:26
-
-
Save craigbutcher/0f02a1fa253cd7ab796c to your computer and use it in GitHub Desktop.
Truncate String with Ellipsis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Accessibility wise, it may bring up various issues. | |
* | |
* Long file names with similar names, for example: | |
* | |
* + Gauntlet I - In The Beginning - becomes - Gauntlet I | |
* + Gauntlet II - In The Middle - becomes - Gauntlet I... | |
* + Gauntlet III - In The End - becomes - Gauntlet I... | |
* | |
* The only way to overcome this is to either produce shorter titles | |
* or redesign/rethink the presentation layout. | |
* | |
*/ | |
.truncate { | |
width: 250px; | |
white-space: nowrap; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment