chiark / gitweb /
css: ability to align text vertically in a table cell.
authorVladimír Vondruš <mosra@centrum.cz>
Wed, 17 Jan 2018 00:40:28 +0000 (01:40 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Wed, 17 Jan 2018 00:46:32 +0000 (01:46 +0100)
css/m-components.css
doc/css/typography.rst

index 76f605affdbdae6b58911260297a186c13967902..f4318af2475ad8287dd65dd29beb8ea5a66d4c0b 100644 (file)
@@ -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%;
 }
index 091f741c1e144947e7cefad1e1ee7cab657d36f2..6b847db5aabff86ed9f6effab6a6f1d57eb612fc 100644 (file)
@@ -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`_
 ==========