nib icon indicating copy to clipboard operation
nib copied to clipboard

Inline-block with conditional IE support

Open zsitro opened this issue 10 years ago • 4 comments

A snippet that I miss in every project where I use nib. If opacity has place here, then inline-block also should be there

/*
 * Inline-block with conditional IE support.
 */
display(mode, args...)
  if mode == 'inline-block'
    display inline-block args
    if support-for-ie
      zoom 1
      *display inline args
  else
    display mode args

zsitro avatar Feb 09 '14 09:02 zsitro

@visionmedia does it look good?

zsitro avatar Mar 04 '14 12:03 zsitro

looks like a good idea, except it needs additional tests.

notslang avatar Mar 07 '14 00:03 notslang

What do you mean @slang800 ? What use-cases are not covered in current test?

zsitro avatar Apr 12 '14 17:04 zsitro

Unless I'm totally misunderstanding this PR; We are adding a new mixin that adds properties when we enable support for IE & have display: inline-block. So, there should be a test that makes sure that those properties actually get added.

btw, couldn't the code be refactored into something like this:

display(mode, args...)
  display mode args
  if mode == 'inline-block' && support-for-ie
    // target IE w/ star hack: http://www.ejeliot.com/blog/63
    *zoom 1
    *display inline args

...and should we be putting an * before zoom: 1 too so it only targets IE?

notslang avatar Apr 12 '14 20:04 notslang