@superflycss/utilities-layout
Version:
95 lines (79 loc) • 1.73 kB
CSS
/** @define utilities */
@import "@superflycss/variables-dimension";
@media (--sm-viewport) {
/**
* Word breaking
*
* Break strings when their length exceeds the width of their container.
*/
.u-sm-word-break {
word-wrap: break-word ;
}
.u-sm-wb {
word-wrap: break-word ;
}
/**
* Keep the word from breaking
*/
.u-sm-word-whole {
word-wrap: keep-all ;
}
.u-sm-ww {
word-wrap: keep-all ;
}
/**
* Horizontal text alignment
*/
.u-sm-text-center {
text-align: center ;
}
.u-sm-tc {
text-align: center ;
}
.u-sm-text-left {
text-align: left ;
}
.u-sm-tl {
text-align: left ;
}
.u-sm-text-right {
text-align: right ;
}
.u-sm-tr {
text-align: right ;
}
/**
* Prevent whitespace wrapping
*/
.u-sm-text-no-wrap {
white-space: nowrap ;
}
.u-sm-tnw {
white-space: nowrap ;
}
/**
* Text truncation
*
* Prevent text from wrapping onto multiple lines, and truncate with an
* ellipsis.
*
* 1. Ensure that the node has a maximum width after which truncation can
* occur.
* 2. Fix for IE 8/9 if `word-wrap: break-word` is in effect on ancestor
* nodes.
*/
.u-sm-text-truncate {
max-width: 100% ; /* 1 */
overflow: hidden ;
text-overflow: ellipsis ;
white-space: nowrap ;
word-wrap: normal ; /* 2 */
}
.u-sm-tt {
max-width: 100% ; /* 1 */
overflow: hidden ;
text-overflow: ellipsis ;
white-space: nowrap ;
word-wrap: normal ; /* 2 */
}
}