kevin-vance
4/30/2013 - 10:38 PM

A mixin to use for opting-in to css-text ellipsis as needed in .scss files

A mixin to use for opting-in to css-text ellipsis as needed in .scss files

@mixin css-text-ellipsis {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

//NOTE: The element this is applied to would 
//need to have a width specified for this to 
//work correctly, or be within a container 
//that has an explicit width

/*
Usage: 

.selector {
    @include css-text-ellipsis;
}
*/