From cff3f8dbd48fff3729503d32662cb3b249ee0459 Mon Sep 17 00:00:00 2001 From: thiggins Date: Mon, 28 Dec 2015 14:55:17 +0000 Subject: [PATCH] Add nest variable to allow namespacing for core table scss --- scss/components/_table.scss | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/scss/components/_table.scss b/scss/components/_table.scss index dc2e36904..81a73dd7c 100644 --- a/scss/components/_table.scss +++ b/scss/components/_table.scss @@ -60,12 +60,7 @@ $table-head-font-color: $body-font-color !default; /// @type Boolean $show-header-for-stacked: false !default; -/// Adds the general styles for tables. -/// @param {Keyword} $stripe [$table-stripe] - Uses keywords even, odd, or none to darken rows of the table. The default value is even. -@mixin table($stripe: $table-stripe) { - margin-bottom: $global-margin; - border-radius: $global-radius; - +@mixin -zf-table-children-styles($stripe: $table-stripe) { thead, tbody, tfoot { @@ -124,6 +119,25 @@ $show-header-for-stacked: false !default; } } +/// Adds the general styles for tables. +/// @param {Keyword} $stripe [$table-stripe] - Uses keywords even, odd, or none to darken rows of the table. The default value is even. +@mixin table( + $stripe: $table-stripe, + $nest: false +) { + margin-bottom: $global-margin; + border-radius: $global-radius; + + @if $nest { + @include -zf-table-children-styles($stripe); + } + @else { + @at-root { + @include -zf-table-children-styles($stripe); + } + } +} + /// Adds the ability to horizontally scroll the table when the content overflows horizontally. @mixin table-scroll { display: block; @@ -189,9 +203,9 @@ $show-header-for-stacked: false !default; } } -@mixin foundation-table { +@mixin foundation-table($nest: false) { table { - @include table; + @include table($nest: $nest); } table.stack { -- 2.47.2