From: thiggins Date: Mon, 28 Dec 2015 14:55:17 +0000 (+0000) Subject: Add nest variable to allow namespacing for core table scss X-Git-Tag: v6.1.2~112^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7454%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Add nest variable to allow namespacing for core table scss --- 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 {