mirror of
https://github.com/clearleft/clearless.git
synced 2026-01-09 05:37:54 -05:00
Add word-wrap mixin
This commit is contained in:
25
README.md
25
README.md
@@ -494,6 +494,7 @@ Typography
|
||||
* [@base-font-size](#setting-base-font-size)
|
||||
* [.font-size-ems()](#font-size-ems)
|
||||
* [.font-size-rems()](#font-size-rems)
|
||||
* [.word-wrap()](#word-wrap)
|
||||
|
||||
### SETTING: @base-font-size
|
||||
|
||||
@@ -578,6 +579,30 @@ Future versions of this may include workarounds to make this more flexible.
|
||||
}
|
||||
```
|
||||
|
||||
### .word-wrap()
|
||||
|
||||
Implement word-wrapping for text within the element, with hyphenation where supported. See [http://blog.kenneth.io/blog/2012/03/04/word-wrapping-hypernation-using-css/](Kenneth Auchenberg's blog post) for details.
|
||||
|
||||
```css
|
||||
.word-wrap();
|
||||
```
|
||||
|
||||
```css
|
||||
/* Usage: */
|
||||
.example {
|
||||
.word-wrap();
|
||||
}
|
||||
/* Example output: */
|
||||
.example {
|
||||
-ms-word-break: break-all;
|
||||
word-break: break-all;
|
||||
word-break: break-word;
|
||||
-webkit-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Sprites
|
||||
-------
|
||||
|
||||
@@ -37,3 +37,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
.wrap-words() {
|
||||
-ms-word-break: break-all;
|
||||
word-break: break-all;
|
||||
word-break: break-word;
|
||||
-webkit-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
Reference in New Issue
Block a user