typeplate / typeplate.github.io

Official Website for Typeplate: “A Typographic Starter Kit.”
http://typeplate.com
Other
1.35k stars 111 forks source link

CSS Hyphenation exceptions #72

Closed jhogue closed 11 years ago

jhogue commented 11 years ago

Great SCSS mixin for hyphenation, and one that I use already. Consider adding elements that should not be hyphenated, as shown:

@mixin css-hyphenate() { /* -ms-word-break: break-all; AWFUL! Surprise... breaks words arbitrarily, not according to hyphenation tables. Use with extreme caution. IE6-8 */ -webkit-hyphens: auto; -moz-hyphens: auto; -ms-hyphens: auto; -o-hyphens: auto; hyphens: auto;

/* DO NOT break within some elements */    
tt &, var &, code &, kbd &, abbr &, acronym & {
-webkit-hyphens: none;
   -moz-hyphens: none;
    -ms-hyphens: none;
     -o-hyphens: none;
        hyphens: none;
}

}

grayghostvisuals commented 11 years ago

YES!!!! code-02

grayghostvisuals commented 11 years ago

@jhogue

Are these the only selectors that you know of for this rule?

jhogue commented 11 years ago

They are the ones that I recommend, based on this thread: http://meyerweb.com/eric/thoughts/2012/12/17/where-to-avoid-css-hyphenation/

On Mon, Mar 4, 2013 at 1:47 PM, Dennis Gaebel notifications@github.comwrote:

@jhogue https://github.com/jhogue

Are these the only selectors that you know of for this rule?

— Reply to this email directly or view it on GitHubhttps://github.com/typeplate/typeplate.github.com/issues/72#issuecomment-14397336 .

J. Hogue: Design Director at Project Evolution t: 888.456.0467 | c: 401.831.1963

grayghostvisuals commented 11 years ago

NICE! thanks for dropping the breadcrumb trail. I'll put this in today! :metal:

jhogue commented 11 years ago

Cool. I give all the credit to Eric Meyer. Nice project you have here, BTW.

On Mon, Mar 4, 2013 at 1:56 PM, Dennis Gaebel notifications@github.comwrote:

NICE! thanks for dropping the breadcrumb trail. I'll put this in today! [image: :metal:]

— Reply to this email directly or view it on GitHubhttps://github.com/typeplate/typeplate.github.com/issues/72#issuecomment-14397920 .

J. Hogue: Design Director at Project Evolution t: 888.456.0467 | c: 401.831.1963

grayghostvisuals commented 11 years ago

Aww shucks...Thanks. Also an even bigger thanks for leaving feedback. You rock!

grayghostvisuals commented 11 years ago

@jhogue

  1. Do we still need a prefix for Opera based on the current state of affairs?
  2. Do we even need the ampersand after the selector? can't it just be tt, var, code, etc.
jhogue commented 11 years ago

Opera... can't hurt. Big in Europe. And oh yes, my @mixin is wrong! Jeesh.

On Mon, Mar 4, 2013 at 2:22 PM, Dennis Gaebel notifications@github.comwrote:

@ jhogue

  1. Do we still need a prefix for Opera based on the current state of affairs?
  2. Do we even need the ampersand after the selector? can't it just be tt, var, code, etc.

— Reply to this email directly or view it on GitHubhttps://github.com/typeplate/typeplate.github.com/issues/72#issuecomment-14399427 .

J. Hogue: Design Director at Project Evolution t: 888.456.0467 | c: 401.831.1963

grayghostvisuals commented 11 years ago

@jhogue Nice. I thought so. Anyways this is a closed and shut case. Thanks for the help with this :hammer: