From f08bfa6ba4e3018968dab1116404debcdab00243 Mon Sep 17 00:00:00 2001 From: Jen Downs Date: Thu, 5 Dec 2019 11:02:19 -0600 Subject: [PATCH 1/4] fix(data-table): update position of th cells to preserve border --- .../src/components/data-table/_data-table-core.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/components/src/components/data-table/_data-table-core.scss b/packages/components/src/components/data-table/_data-table-core.scss index 76e3bfa17216..bded4b448b40 100644 --- a/packages/components/src/components/data-table/_data-table-core.scss +++ b/packages/components/src/components/data-table/_data-table-core.scss @@ -103,7 +103,7 @@ } .#{$prefix}--data-table th:last-of-type { - position: relative; + position: static; // Required to preserve border. width: auto; } @@ -250,7 +250,7 @@ } .#{$prefix}--data-table th.#{$prefix}--table-column-checkbox { - position: relative; + position: static; // Required to preserve border. background: $ui-03; padding: rem(12px) $spacing-03 0 $spacing-05; width: rem( From a16955a419029d302cee6f0486347a09bff1481a Mon Sep 17 00:00:00 2001 From: Jen Downs Date: Fri, 6 Dec 2019 09:14:44 -0600 Subject: [PATCH 2/4] docs(data-table): format comment in styles Co-Authored-By: Josh Black --- .../components/src/components/data-table/_data-table-core.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/components/src/components/data-table/_data-table-core.scss b/packages/components/src/components/data-table/_data-table-core.scss index bded4b448b40..aef48a022af8 100644 --- a/packages/components/src/components/data-table/_data-table-core.scss +++ b/packages/components/src/components/data-table/_data-table-core.scss @@ -103,7 +103,8 @@ } .#{$prefix}--data-table th:last-of-type { - position: static; // Required to preserve border. + // Required to preserve border + position: static; width: auto; } From 9c118063ec9501b5bb22267b012b1ce2a31231ee Mon Sep 17 00:00:00 2001 From: Jen Downs Date: Fri, 6 Dec 2019 09:16:47 -0600 Subject: [PATCH 3/4] docs(data-table): format comment in styles --- .../components/src/components/data-table/_data-table-core.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/components/src/components/data-table/_data-table-core.scss b/packages/components/src/components/data-table/_data-table-core.scss index aef48a022af8..2b4daaeee96c 100644 --- a/packages/components/src/components/data-table/_data-table-core.scss +++ b/packages/components/src/components/data-table/_data-table-core.scss @@ -251,7 +251,8 @@ } .#{$prefix}--data-table th.#{$prefix}--table-column-checkbox { - position: static; // Required to preserve border. + // Required to preserve border + position: static; background: $ui-03; padding: rem(12px) $spacing-03 0 $spacing-05; width: rem( From 02305ce30de0b5547e377f2eff3e4a275c3df640 Mon Sep 17 00:00:00 2001 From: Jen Downs Date: Fri, 6 Dec 2019 13:06:54 -0600 Subject: [PATCH 4/4] docs(data-table): update comments about position style of table elements --- .../src/components/data-table/_data-table-core.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/components/src/components/data-table/_data-table-core.scss b/packages/components/src/components/data-table/_data-table-core.scss index 2b4daaeee96c..9ea488eeb3a1 100644 --- a/packages/components/src/components/data-table/_data-table-core.scss +++ b/packages/components/src/components/data-table/_data-table-core.scss @@ -103,7 +103,7 @@ } .#{$prefix}--data-table th:last-of-type { - // Required to preserve border + // Do not use `position: relative`, as its behavior is undefined for many table elements: https://www.w3.org/TR/CSS21/visuren.html#propdef-position position: static; width: auto; } @@ -251,7 +251,7 @@ } .#{$prefix}--data-table th.#{$prefix}--table-column-checkbox { - // Required to preserve border + // Do not use `position: relative`, as its behavior is undefined for many table elements: https://www.w3.org/TR/CSS21/visuren.html#propdef-position position: static; background: $ui-03; padding: rem(12px) $spacing-03 0 $spacing-05;