bourbon icon indicating copy to clipboard operation
bourbon copied to clipboard

Chrome display issues while mixing units using @include position

Open jtulk opened this issue 12 years ago • 2 comments

A sidebar menu that was affixed to the right side of the screen using @include position(fixed, 50% 0px null null) would scroll along with the page in Chrome (but worked fine in Safari). Breaking out the CSS into {position: fixed; top: 50%; right; 0px;} solved the issue.

Not sure if you're allowed to mix units here or not, but it looks like the documentation doesn't specifically forbid it. http://bourbon.io/docs/#position

jtulk avatar Oct 31 '14 22:10 jtulk

Hi, @jtulk!

I’m unable to reproduce this. What version of Sass and Bourbon? It’s odd your seeing it react differently in browsers. Can you confirm via Inspector that the output CSS is the same in both Chrome and Safari?

When I use the mixin as you do above, my CSS output is this (which is exactly the way it should work):

.box {
  position: fixed;
  top: 50%;
  right: 0px;
}

tysongach avatar Nov 05 '14 21:11 tysongach

I'm unable to reproduce this in Chrome on other machines as well, but I was able to reproduce the bug in the broken version of Chrome without using Bourbon or Sass. As such, I think it's unrelated to Bourbon/Sass, and has to do with something wrong in this particular install (though reinstalling Chrome hasn't fixed it). I probably should've assumed from the beginning that if the CSS output was workable in Safari then it was a Chrome specific bug.

Thanks @tysongach for checking in on this. Sorry I didn't run this test before logging it.

jtulk avatar Nov 05 '14 23:11 jtulk