This mixin will wrap URLs and long lines of text to prevent text from breaking layouts.
This file can be imported using:
@import "compass/typography/text/force-wrap"
=force-wrap white-space: pre // CSS 2.0 white-space: pre-wrap // CSS 2.1 white-space: pre-line // CSS 3.0 white-space: -pre-wrap // Opera 4-6 white-space: -o-pre-wrap // Opera 7 white-space: -moz-pre-wrap // Mozilla white-space: -hp-pre-wrap // HP Printers word-wrap: break-word // IE 5+
@mixin force-wrap { white-space: pre; // CSS 2.0 white-space: pre-wrap; // CSS 2.1 white-space: pre-line; // CSS 3.0 white-space: -pre-wrap; // Opera 4-6 white-space: -o-pre-wrap; // Opera 7 white-space: -moz-pre-wrap; // Mozilla white-space: -hp-pre-wrap; // HP Printers word-wrap: break-word; // IE 5+ }
Prevent long urls and text from breaking layouts originally from perishablepress.com