riptano / docs-ui

The UI and theme for DataStax Docs.
https://riptano.github.io/docs-ui/
Mozilla Public License 2.0
2 stars 0 forks source link

Image lightbox enhancements and fixes #120

Open eric-schneider opened 5 months ago

eric-schneider commented 5 months ago

NOTE: This issue should probably be worked on in conjunction with https://github.com/riptano/docs-ui/issues/83.

We need to make some enhancements to the image lightbox (https://github.com/riptano/docs-ui/issues/68):

  1. The lightbox doesn't currently support images that use the svg:: macro. This is problematic because we use this macro to support embedded SVGs that honor our CSS styles for light and dark mode (example).

  2. We should probably add a background to the lightbox that's the same size as the image. Currently, images with transparent backgrounds look messy when overlaid on top of page content (example). image

  3. We need to be able to selectively turn off the lightbox for certain images (both block and inline images). We could probably handle this with a role similar to the remove-ext-icon role that we use for selectively disabling the external link icon. Currently, the lightbox is enabled for the badge icons on the Connection methods comparison page, which is a little silly: image But more importantly, when we enable the lightbox for the svg:: macro, we'll need to be able to turn off the lightbox for the graphics on the landing page: image