Skip to content

Provide a more flexible vertical positioning #529

@teo1978

Description

@teo1978

It appears that the only parameter to adjust the vertical position of the box is:

positionFromTop The distance from top of viewport that the Lightbox container will appear, in pixels.

This is a very poor positioning scheme. I understand its simplicity of implementation but it is too limited. There should at the very least be

  • the possibility to set a percentage (relative to the height of the viewport)
  • the possibility to center the image vertically (and set a minimum top/bottom margin in px) rather than having a fixed top margin.

There might be richer and more elaborate models (or perhaps simpler but more powerful ones), these are just out of the top of my head.

When the screen is much bigger than the image, a small value of positionFromTop is ugly. On the other hand, on small screens (e.g. mobile devices) a large value wastes a lot of space and keeps the image unnecessarily small. So, a fixed top value is clearly an insufficient scheme.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions