Add PostCSS wrap utilities
Renamed a bunch of these, totally up for discussing alternative naming still.
This commit is contained in:
parent
989c68a01b
commit
4c562522d0
5 changed files with 170 additions and 13 deletions
150
dist/tailwind.css
vendored
150
dist/tailwind.css
vendored
|
|
@ -299,6 +299,36 @@ body {
|
|||
text-align: justify;
|
||||
}
|
||||
|
||||
.wrap-normal {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.wrap-none {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.wrap-pre {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.wrap-pre-line {
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
.wrap-pre-wrap {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.wrap-force {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.wrap-truncate {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.text-em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
|
@ -1519,6 +1549,36 @@ body {
|
|||
text-align: justify;
|
||||
}
|
||||
|
||||
.sm\:wrap-normal {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.sm\:wrap-none {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.sm\:wrap-pre {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.sm\:wrap-pre-line {
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
.sm\:wrap-pre-wrap {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.sm\:wrap-force {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.sm\:wrap-truncate {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.sm\:text-em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
|
@ -2740,6 +2800,36 @@ body {
|
|||
text-align: justify;
|
||||
}
|
||||
|
||||
.md\:wrap-normal {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.md\:wrap-none {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.md\:wrap-pre {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.md\:wrap-pre-line {
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
.md\:wrap-pre-wrap {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.md\:wrap-force {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.md\:wrap-truncate {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.md\:text-em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
|
@ -3961,6 +4051,36 @@ body {
|
|||
text-align: justify;
|
||||
}
|
||||
|
||||
.lg\:wrap-normal {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.lg\:wrap-none {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.lg\:wrap-pre {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.lg\:wrap-pre-line {
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
.lg\:wrap-pre-wrap {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.lg\:wrap-force {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.lg\:wrap-truncate {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.lg\:text-em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
|
@ -5182,6 +5302,36 @@ body {
|
|||
text-align: justify;
|
||||
}
|
||||
|
||||
.xl\:wrap-normal {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.xl\:wrap-none {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.xl\:wrap-pre {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.xl\:wrap-pre-line {
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
.xl\:wrap-pre-wrap {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.xl\:wrap-force {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.xl\:wrap-truncate {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.xl\:text-em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
|
|
|||
2
dist/tailwind.css.map
vendored
2
dist/tailwind.css.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -3,18 +3,6 @@
|
|||
|
||||
.define-text-hover-colors(@text-colors; @screens);
|
||||
|
||||
// Styles
|
||||
.text-break { white-space: pre-line; }
|
||||
.text-no-wrap { white-space: nowrap; }
|
||||
.text-force-wrap { word-wrap: break-word; }
|
||||
.text-smooth { -webkit-font-smoothing: antialiased; }
|
||||
.text-shadow-solid { text-shadow: 0 2px 0 rgba(0,0,0,0.15); }
|
||||
.text-ellipsis {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.responsive({
|
||||
&sans { .sans; }
|
||||
&serif { .serif; }
|
||||
|
|
|
|||
17
src/generators/textWrap.js
Normal file
17
src/generators/textWrap.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import defineClasses from '../util/defineClasses'
|
||||
|
||||
export default function() {
|
||||
return defineClasses({
|
||||
'wrap-normal': { 'white-space': 'normal' },
|
||||
'wrap-none': { 'white-space': 'nowrap' },
|
||||
'wrap-pre': { 'white-space': 'pre' },
|
||||
'wrap-pre-line': { 'white-space': 'pre-line' },
|
||||
'wrap-pre-wrap': { 'white-space': 'pre-wrap' },
|
||||
'wrap-force': { 'word-wrap': 'break-word' },
|
||||
'wrap-truncate': {
|
||||
'overflow': 'hidden',
|
||||
'text-overflow': 'ellipsis',
|
||||
'white-space': 'nowrap',
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@ import textColors from '../generators/textColors'
|
|||
import textLeading from '../generators/textLeading'
|
||||
import textTracking from '../generators/textTracking'
|
||||
import textAlign from '../generators/textAlign'
|
||||
import textWrap from '../generators/textWrap'
|
||||
import textStyle from '../generators/textStyle'
|
||||
import verticalAlign from '../generators/verticalAlign'
|
||||
import backgroundColors from '../generators/backgroundColors'
|
||||
|
|
@ -34,6 +35,7 @@ export default function(options) {
|
|||
textLeading(options),
|
||||
textTracking(options),
|
||||
textAlign(options),
|
||||
textWrap(options),
|
||||
textStyle(options),
|
||||
verticalAlign(options),
|
||||
backgroundColors(options),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue