Last active
December 23, 2015 23:49
-
-
Save kerotaa/6712946 to your computer and use it in GitHub Desktop.
いい感じな改行を実現するSCSS mixin。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin establish-break($body: true, $pre: true, $inline: true, $table: true) { | |
@if $body { | |
body { | |
word-wrap: break-word; | |
} | |
} | |
@if $pre { | |
pre { | |
overflow: auto; | |
white-space: pre-wrap; | |
word-wrap: break-word; | |
word-break: break-all; | |
} | |
} | |
@if $inline { | |
code, kbd, abbr, var, samp { | |
&::before, | |
&::after { | |
content: "\0020"; | |
font-size: 0; | |
} | |
} | |
} | |
@if table { | |
table { | |
word-break: break-all; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment