From b27a527be10260e00ebaff7491ddbaed79fef1ff Mon Sep 17 00:00:00 2001 From: Miloslav Pojman Date: Sat, 28 Jul 2018 17:41:51 +0100 Subject: [PATCH] Styles for image alignment (pypa/warehouse#4023) CSS code inspired on Spinx. Dependes on fixing https://github.com/pypa/readme_renderer/issues/112. --- .../sass/blocks/_project-description.scss | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/warehouse/static/sass/blocks/_project-description.scss b/warehouse/static/sass/blocks/_project-description.scss index d1675267f945..d6c87bf9ab80 100644 --- a/warehouse/static/sass/blocks/_project-description.scss +++ b/warehouse/static/sass/blocks/_project-description.scss @@ -162,6 +162,34 @@ > a { margin-top: $spacing-unit / 2; } + + img.align-left, + .figure.align-left, + object.align-left { + clear: left; + float: left; + margin-top: $spacing-unit / 2; + margin-right: $spacing-unit / 2; + } + + img.align-right, + .figure.align-right, + object.align-right { + clear: right; + float: right; + margin-top: $spacing-unit / 2; + margin-left: $spacing-unit / 2; + } + + img.align-center, + .figure.align-center, + object.align-center { + display: block; + margin-top: $spacing-unit / 2; + margin-left: auto; + margin-right: auto; + } + }