From 03b436ee609ce8898b68f2cdbb6a8f3cd441dee1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 17 Jan 2018 01:40:28 +0100 Subject: [PATCH] css: ability to align text vertically in a table cell. --- css/m-components.css | 9 +++++++++ doc/css/typography.rst | 7 ++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/css/m-components.css b/css/m-components.css index 76f605af..f4318af2 100644 --- a/css/m-components.css +++ b/css/m-components.css @@ -584,6 +584,15 @@ div.m-scroll { .m-text-right, .m-text-right.m-noindent, table.m-table th.m-text-right, .m-text-right p { text-align: right; } +.m-text-top, table.m-table th.m-text-top, table.m-table td.m-text-top { + vertical-align: top; +} +.m-text-middle, table.m-table th.m-text-middle, table.m-table td.m-text-middle { + vertical-align: middle; +} +.m-text-bottom, table.m-table th.m-text-bottom, table.m-table td.m-text-bottom { + vertical-align: bottom; +} .m-text.m-small { font-size: 85.4%; } diff --git a/doc/css/typography.rst b/doc/css/typography.rst index 091f741c..6b847db5 100644 --- a/doc/css/typography.rst +++ b/doc/css/typography.rst @@ -373,9 +373,10 @@ will have negative margin to make its contents aligned with surrounding text. ================= Use :css:`.m-text-left`, :css:`.m-text-right` or :css:`.m-text-center` to -align text inside its parent element. See -`Floating around <{filename}/css/grid.rst#floating-around>`_ in the grid system -for aligning and floating blocks in a similar way. +align text inside its parent element. Use :css:`.m-text-top`, +:css:`.m-text-middle` and :css:`.m-text-bottom` to align text vertically for +example in a table cell. See `Floating around <{filename}/css/grid.rst#floating-around>`_ +in the grid system for aligning and floating blocks in a similar way. `Padding`_ ========== -- 2.30.2