Add support for pre.-wrap

This commit is contained in:
Rico Sta. Cruz 2017-10-26 14:10:13 +08:00
parent abd70287d7
commit bc3bb56c46
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
2 changed files with 15 additions and 1 deletions

View File

@ -34,6 +34,10 @@
line-height: $code-line-height;
}
pre.-wrap {
white-space: pre-wrap;
}
pre > code {
color: $base-head;
max-height: auto;

View File

@ -45,8 +45,9 @@ See: [Tables](#tables-1)
### Code
| `-setup` | Gray background |
| `-box-chars` | Less line height<br>_for box drawing chars_ |
| `-setup` | Gray background |
| `-wrap` | Enables line-wrapping |
See: [Code](#code-1)
@ -197,6 +198,15 @@ function createNode(nodeName: string, options: { key: string }) {
Long lines will have scrollbars.
### Line wrapping
```js
<script>(function(d,s){if(window.Promise&&[].includes&&Object.assign&&window.Map)return;var js,sc=d.getElementsByTagName(s)[0];js=d.createElement(s);js.src='https://cdn.polyfill.io/v2/polyfill.min.js';sc.parentNode.insertBefore(js, sc);}(document,'script'))</script>
```
{: .-wrap}
Add `-wrap` to wrap long lines.
## Lists
{: .-three-column}