Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
いい感じな改行を実現するSCSS mixin。
@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