bootstrap_package icon indicating copy to clipboard operation
bootstrap_package copied to clipboard

[FEATURE] Add image-align-left and image-align-right

Open marble opened this issue 8 years ago • 0 comments

Update 2016-08-11: Submitted as PR https://github.com/benjaminkott/bootstrap_package/pull/367

For text with images and text with media elements we have these four options for image alignment:

014

This is fine as long as the images are large enough to fill the complete column:

015

However, if the images are very small the only option you have at the moment is to display them horizontally centered:

016

This is a problem in real life for existing websites that have some small images and want to have them left aligned with the text for example. To address that problem I've created a patch that I'll send as a pull request.

With that feature you have some more options in the alignment menu:

Namely there are additionally:

  • above-left
  • above-right
  • below-left
  • below-right

017

For above-left (or below-left) you get:

018

And for above-right (or below-right):

019

And this is the real live usage: Display a little image left justified

020

I will send a separate pull request.

The positioning is done with an extra class image-align-leftor image-align-rightin the figure-tag. In doing so the caption can be affected as well if somebody needs that. In less and css we're issuing a left-margin: 0 or right-margin:0 instead of the default auto.

PS:

While investigating I came to the conclusion that it indeed doesn't make sense to have an alignment option in text left or in text right as that would require much more of specification to make sense in the bootstrap context.

marble avatar Aug 08 '16 16:08 marble