From 0a429b1a25ad0107ffe85d72f8a36c74f5f34ec2 Mon Sep 17 00:00:00 2001 From: jlukic Date: Wed, 17 Dec 2014 17:38:11 -0500 Subject: [PATCH] Add structured table variation, fixes #1293 and #1359 --- src/definitions/collections/table.less | 61 +++++++++++++++++++------- 1 file changed, 45 insertions(+), 16 deletions(-) diff --git a/src/definitions/collections/table.less b/src/definitions/collections/table.less index fa9de2835..e72747807 100755 --- a/src/definitions/collections/table.less +++ b/src/definitions/collections/table.less @@ -70,14 +70,18 @@ border-bottom: @headerBorder; border-left: @headerDivider; } -.ui.table thead th:first-child { - border-radius: @borderRadius 0em 0em 0em; + +.ui.table thead tr > th:first-child { border-left: none; } -.ui.table thead th:last-child { + +.ui.table thead tr:first-child > th:first-child { + border-radius: @borderRadius 0em 0em 0em; +} +.ui.table thead tr:first-child > th:last-child { border-radius: 0em @borderRadius 0em 0em; } -.ui.table thead th:only-child { +.ui.table thead tr:first-child > th:only-child { border-radius: @borderRadius @borderRadius 0em 0em; } @@ -97,13 +101,16 @@ font-weight: @footerFontWeight; text-transform: @footerTextTransform; } -.ui.table tfoot th:first-child { +.ui.table tfoot tr > th:first-child { + border-left: none; +} +.ui.table tfoot tr:first-child > th:first-child { border-radius: 0em 0em 0em @borderRadius; } -.ui.table tfoot th:last-child { +.ui.table tfoot tr:first-child > th:last-child { border-radius: 0em 0em @borderRadius 0em; } -.ui.table tfoot th:only-child { +.ui.table tfoot tr:first-child > th:only-child { border-radius: 0em 0em @borderRadius @borderRadius; } @@ -208,6 +215,31 @@ Types *******************************/ +/*-------------- + Complex +---------------*/ + +.ui.structured.table { + border-collapse: collapse; +} +.ui.structured.table thead th { + border-left: @headerDivider; + border-right: @headerDivider; +} +.ui.structured.sortable.table thead th { + border-left: @sortableBorder; + border-right: @sortableBorder; +} +.ui.structured.basic.table th { + border-left: @basicTableHeaderDivider; + border-right: @basicTableHeaderDivider; +} +.ui.structured.celled.table tr th, +.ui.structured.celled.table tr td { + border-left: @cellBorder; + border-right: @cellBorder; +} + /*-------------- Definition ---------------*/ @@ -780,6 +812,7 @@ } .ui.inverted.sortable.table thead th { border-left-color: @sortableInvertedBorderColor; + border-right-color: @sortableInvertedBorderColor; } @@ -871,24 +904,20 @@ .ui[class*="very basic"].table:not(.sortable):not(.striped) td:last-child { padding-right: 0em; } - -.ui[class*="very basic"].table:not(.sortable):not(.striped) thead th { +.ui[class*="very basic"].table:not(.sortable):not(.striped) thead tr:first-child th { padding-top: 0em; } -.ui[class*="very basic"].table:not(.sortable):not(.striped) tbody tr:last-child td { - padding-bottom: 0em; -} /*-------------- Celled ---------------*/ -.ui.celled.table th, -.ui.celled.table td { +.ui.celled.table tr th, +.ui.celled.table tr td { border-left: @cellBorder; } -.ui.celled.table th:first-child, -.ui.celled.table td:first-child { +.ui.celled.table tr th:first-child, +.ui.celled.table tr td:first-child { border-left: none; }