From c7ca177cd834147a4682f4fb5b7de999aef3e0cf Mon Sep 17 00:00:00 2001 From: matt Date: Sun, 6 Feb 2022 23:21:37 +0000 Subject: [PATCH] Added mixins to show and hide columns in a table --- src/stylesheets/abstracts/_mixins.scss | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/stylesheets/abstracts/_mixins.scss b/src/stylesheets/abstracts/_mixins.scss index 2082ce4..29b0429 100644 --- a/src/stylesheets/abstracts/_mixins.scss +++ b/src/stylesheets/abstracts/_mixins.scss @@ -29,3 +29,19 @@ + 'Please make sure it is defined in `$breakpoints` map.'; } } + +@mixin hide-column($colNum) { + th, td { + &:nth-child(#{$colNum}) { + display: none; + } + } +} + +@mixin show-column($colNum) { + th, td { + &:nth-child(#{$colNum}) { + display: table-cell; + } + } +}