internet explorer - parenthesis breaks line in IE -
have similar question here non-breaking parentheses? white-space: nowrap; makes whole thing in 1 line not ideal. e.g. group of elephant(s) ... in ie, (s) in separate line. there way disable in ie?
it's unfortunate internet explorer , microsoft edge behave differently other browsers in regard. engineer on microsoft edge team, , file interop bug investigate matter further team.
for time being, wrap each of these instances in span element, preventing white-space wrapping on contents therein. understand content coming user-input; such, identify portions of user-input need wrapped, , replace them element. simple example, here 1 approach:
var tweets = [].slice.call( document.queryselectorall( ".tweet" ) ); tweets.foreach(function ( tweet ) { tweet.innerhtml = tweet.innerhtml.replace(/\w+\(\w+\)/g, function ( match ) { return "<span class='nobreak'>" + match + "</span>"; }) }); .nobreak { color: white; background: green; white-space: nowrap; } .tweet { border: 1px solid #000; animation: rescale 20s linear infinite alternate; } @keyframes rescale { { width: 100% } { width: 25% } } <p class="tweet">@ericlaw i've been thinking feature, , security risk(s). fact they're experimenting, wonder @ cost.</p>
Comments
Post a Comment