1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
// Mixins to support specific CSS Text Level 3 elements
@import "compass/support";
// The the user threshold for hyphens support.
// Defaults to `$graceful-usage-threshold`.
$hyphens-support-threshold: $graceful-usage-threshold !default;
// Mixin for word-break properties
// http://www.w3.org/css3-text/#word-break
// * legal values for $type : normal, keep-all, break-all
//
// Example:
// p.wordBreak {@include word-break(break-all);}
//
// Which generates:
// p.wordBreak {
// word-break: break-all;
// word-break: break-word;}
//
@mixin word-break($value: normal){
word-break: $value;
@if $value == break-all {
//Webkit handles break-all differently... as break-word
@include with-prefix(-webkit) {
word-break: break-word;
}
}
}
// Mixin for the hyphens property
//
// W3C specification: http://www.w3.org/TR/css3-text/#hyphens
// * legal values for $type : auto, manual, none
//
// Example:
// p {
// @include hyphens(auto);}
// Which generates:
// p {
// -moz-hyphens: auto;
// -webkit-hyphens: auto;
// hyphens: auto;}
//
@mixin hyphens($value: auto){
@include prefixed-properties(css-hyphens, $hyphens-support-threshold, (
hyphens: $value
));
}
// Mixin for x-browser hyphenation based on @auchenberg's post:
// Removes the need for the <wbr/> HTML tag
// http://blog.kenneth.io/blog/2012/03/04/word-wrapping-hypernation-using-css/
//
// Example:
// div {@include hyphenation;}
//
// Which generates:
// div {
// -ms-word-break: break-all;
// word-break: break-all;
// word-break: break-word;
// -moz-hyphens: auto;
// -webkit-hyphens: auto;
// hyphens: auto;}
//
@mixin hyphenation {
@include word-break(break-all);
@include hyphens;
}
|