firebug / pixel-perfect

Other
55 stars 15 forks source link

Add option for toggling between absolute and fixed positioning #19

Open SebastianZ opened 9 years ago

SebastianZ commented 9 years ago

Currently all layers have fixed positioning. This makes it impossible to style layouts, which don't completely fit into the viewport.

So there should be an option to switch between absolute and fixed positioning. This should probably be a global option, i.e. affect all layers.

Positioning should be absolute by default. (issue #18)

Sebastian

janodvarko commented 9 years ago

Please provide a test case that shows the difference/issues.

Honza

SebastianZ commented 9 years ago

Test case, for which absolute positioning is preferred:

  1. Open Pixel Perfect on https://www.mozilla.org/en-US/
  2. Scroll down to the bottom of the page where it says 'Add-ons' 'Careers' 'Need Help?'
  3. Add a layer and position it to overlay them
  4. Scroll up

=> The layer scrolls up with the page instead of staying at the part of the page it should overlay.

I.e. what you see is Mozilla homepage with incorrectly fixed positioned overlay

Test case for fixed positioning:

  1. Open Pixel Perfect on https://www.mozilla.org/en-US/
  2. Add a layer and position it to overlay the tiles, so that they are inclosed by it
  3. Scroll down

=> The layer should scroll down with the page, so that you can see whether all tiles line up well.

I.e. what you see is Mozilla homepage with intended fixed positioned overlay

The latter may be a contrived example. I assume people will more likely only use absolute positioned layers. That's why the default should be absolute positioning as described in #18.

Sebastian

mbuckley commented 9 years ago

Agreed that absolute would be what most people expect vs fixed.

janodvarko commented 9 years ago

Agreed that absolute would be what most people expect vs fixed.

Yes agree (it was rather a bug, since we were already using 'absolute'). @ibuck: I don't even think an extra option is actually needed here. What do you think?

Honza