From df5abb2ab552d417ab3f80f663b6350135bf871c Mon Sep 17 00:00:00 2001 From: Rob Levin Date: Sun, 27 Sep 2020 18:26:20 -0700 Subject: [PATCH] Refactors FlexGrid to have separate css files for grid, row, and col. This help Svelte mainly since I do not have access to proper CSS Modules, and I can copy each over into SFC style tags. Had to update the other frameworks as such. --- agnosticui-css/flexboxgrid-col.css | 906 +++++++++++++ agnosticui-css/flexboxgrid-grid.css | 51 + agnosticui-css/flexboxgrid-row.css | 197 +++ agnosticui-css/flexboxgrid.html | 4 +- agnosticui-react/copystyles.js | 9 + .../FlexGrid/FlexBoxGrid2Custom.module.css | 1154 +++++++++++++++++ .../src/stories/FlexGrid/classNames.js | 2 +- agnosticui-svelte/copystyles.js | 21 +- .../src/__snapshots__/Storyshots.test.js.snap | 102 ++ .../src/stories/FlexGrid.stories.js | 9 + .../FlexGrid/FlexBoxGrid2Custom.module.css | 1149 ++++++++++++++++ .../src/stories/FlexGrid/FlexCol.svelte | 972 ++++++++++++++ .../src/stories/FlexGrid/FlexGrid.svelte | 64 + .../src/stories/FlexGrid/FlexRow.svelte | 232 ++++ .../src/stories/FlexGrid/LICENSE.md | 17 + .../src/stories/FlexGridExample.svelte | 65 + agnosticui-vue/copystyles.js | 9 +- .../src/stories/FlexGrid.stories.js | 15 - .../FlexGrid/FlexBoxGrid2Custom.module.css | 377 +++--- .../src/stories/FlexGrid/FlexGrid.vue | 2 - .../src/stories/FlexGrid/FlexRow.vue | 6 - 21 files changed, 5148 insertions(+), 215 deletions(-) create mode 100644 agnosticui-css/flexboxgrid-col.css create mode 100644 agnosticui-css/flexboxgrid-grid.css create mode 100644 agnosticui-css/flexboxgrid-row.css create mode 100644 agnosticui-react/src/stories/FlexGrid/FlexBoxGrid2Custom.module.css create mode 100644 agnosticui-svelte/src/stories/FlexGrid.stories.js create mode 100644 agnosticui-svelte/src/stories/FlexGrid/FlexBoxGrid2Custom.module.css create mode 100644 agnosticui-svelte/src/stories/FlexGrid/FlexCol.svelte create mode 100644 agnosticui-svelte/src/stories/FlexGrid/FlexGrid.svelte create mode 100644 agnosticui-svelte/src/stories/FlexGrid/FlexRow.svelte create mode 100644 agnosticui-svelte/src/stories/FlexGrid/LICENSE.md create mode 100644 agnosticui-svelte/src/stories/FlexGridExample.svelte diff --git a/agnosticui-css/flexboxgrid-col.css b/agnosticui-css/flexboxgrid-col.css new file mode 100644 index 000000000..02d4d0565 --- /dev/null +++ b/agnosticui-css/flexboxgrid-col.css @@ -0,0 +1,906 @@ + +.col-xs, +.col-xs-1, +.col-xs-2, +.col-xs-3, +.col-xs-4, +.col-xs-5, +.col-xs-6, +.col-xs-7, +.col-xs-8, +.col-xs-9, +.col-xs-10, +.col-xs-11, +.col-xs-12, +.col-xs-offset-0, +.col-xs-offset-1, +.col-xs-offset-2, +.col-xs-offset-3, +.col-xs-offset-4, +.col-xs-offset-5, +.col-xs-offset-6, +.col-xs-offset-7, +.col-xs-offset-8, +.col-xs-offset-9, +.col-xs-offset-10, +.col-xs-offset-11, +.col-xs-offset-12, +.col-sm, +.col-sm-1, +.col-sm-2, +.col-sm-3, +.col-sm-4, +.col-sm-5, +.col-sm-6, +.col-sm-7, +.col-sm-8, +.col-sm-9, +.col-sm-10, +.col-sm-11, +.col-sm-12, +.col-sm-offset-0, +.col-sm-offset-1, +.col-sm-offset-2, +.col-sm-offset-3, +.col-sm-offset-4, +.col-sm-offset-5, +.col-sm-offset-6, +.col-sm-offset-7, +.col-sm-offset-8, +.col-sm-offset-9, +.col-sm-offset-10, +.col-sm-offset-11, +.col-sm-offset-12, +.col-md, +.col-md-1, +.col-md-2, +.col-md-3, +.col-md-4, +.col-md-5, +.col-md-6, +.col-md-7, +.col-md-8, +.col-md-9, +.col-md-10, +.col-md-11, +.col-md-12, +.col-md-offset-0, +.col-md-offset-1, +.col-md-offset-2, +.col-md-offset-3, +.col-md-offset-4, +.col-md-offset-5, +.col-md-offset-6, +.col-md-offset-7, +.col-md-offset-8, +.col-md-offset-9, +.col-md-offset-10, +.col-md-offset-11, +.col-md-offset-12, +.col-lg, +.col-lg-1, +.col-lg-2, +.col-lg-3, +.col-lg-4, +.col-lg-5, +.col-lg-6, +.col-lg-7, +.col-lg-8, +.col-lg-9, +.col-lg-10, +.col-lg-11, +.col-lg-12, +.col-lg-offset-0, +.col-lg-offset-1, +.col-lg-offset-2, +.col-lg-offset-3, +.col-lg-offset-4, +.col-lg-offset-5, +.col-lg-offset-6, +.col-lg-offset-7, +.col-lg-offset-8, +.col-lg-offset-9, +.col-lg-offset-10, +.col-lg-offset-11, +.col-lg-offset-12, +.col-xl, +.col-xl-1, +.col-xl-2, +.col-xl-3, +.col-xl-4, +.col-xl-5, +.col-xl-6, +.col-xl-7, +.col-xl-8, +.col-xl-9, +.col-xl-10, +.col-xl-11, +.col-xl-12, +.col-xl-offset-0, +.col-xl-offset-1, +.col-xl-offset-2, +.col-xl-offset-3, +.col-xl-offset-4, +.col-xl-offset-5, +.col-xl-offset-6, +.col-xl-offset-7, +.col-xl-offset-8, +.col-xl-offset-9, +.col-xl-offset-10, +.col-xl-offset-11, +.col-xl-offset-12 { + box-sizing: border-box; + flex: 0 0 auto; + flex-basis: 100%; + padding-right: var(--half-gutter-width); + padding-left: var(--half-gutter-width); + max-width: 100%; +} + +.col-xs { + flex-grow: 1; + flex-basis: 0; + max-width: 100%; +} + +.col-xs-1 { + flex-basis: 8.33333333%; + max-width: 8.33333333%; +} + +.col-xs-2 { + flex-basis: 16.66666667%; + max-width: 16.66666667%; +} + +.col-xs-3 { + flex-basis: 25%; + max-width: 25%; +} + +.col-xs-4 { + flex-basis: 33.33333333%; + max-width: 33.33333333%; +} + +.col-xs-5 { + flex-basis: 41.66666667%; + max-width: 41.66666667%; +} + +.col-xs-6 { + flex-basis: 50%; + max-width: 50%; +} + +.col-xs-7 { + flex-basis: 58.33333333%; + max-width: 58.33333333%; +} + +.col-xs-8 { + flex-basis: 66.66666667%; + max-width: 66.66666667%; +} + +.col-xs-9 { + flex-basis: 75%; + max-width: 75%; +} + +.col-xs-10 { + flex-basis: 83.33333333%; + max-width: 83.33333333%; +} + +.col-xs-11 { + flex-basis: 91.66666667%; + max-width: 91.66666667%; +} + +.col-xs-12 { + flex-basis: 100%; + max-width: 100%; + /* Mobile first stacked get a gutter between blocks */ + margin-bottom: var(--gutter-width); +} + +.col-xs-offset-0 { + margin-left: 0; +} + +.col-xs-offset-1 { + margin-left: 8.33333333%; +} + +.col-xs-offset-2 { + margin-left: 16.66666667%; +} + +.col-xs-offset-3 { + margin-left: 25%; +} + +.col-xs-offset-4 { + margin-left: 33.33333333%; +} + +.col-xs-offset-5 { + margin-left: 41.66666667%; +} + +.col-xs-offset-6 { + margin-left: 50%; +} + +.col-xs-offset-7 { + margin-left: 58.33333333%; +} + +.col-xs-offset-8 { + margin-left: 66.66666667%; +} + +.col-xs-offset-9 { + margin-left: 75%; +} + +.col-xs-offset-10 { + margin-left: 83.33333333%; +} + +.col-xs-offset-11 { + margin-left: 91.66666667%; +} + +.first-xs { + order: -1; +} + +.last-xs { + order: 1; +} + +.initial-order-xs { + order: initial; +} +@media only screen and (min-width: 576px) { + .col-sm { + flex-grow: 1; + flex-basis: 0; + max-width: 100%; + } + + .col-sm-1 { + flex-basis: 8.33333333%; + max-width: 8.33333333%; + } + + .col-sm-2 { + flex-basis: 16.66666667%; + max-width: 16.66666667%; + } + + .col-sm-3 { + flex-basis: 25%; + max-width: 25%; + } + + .col-sm-4 { + flex-basis: 33.33333333%; + max-width: 33.33333333%; + } + + .col-sm-5 { + flex-basis: 41.66666667%; + max-width: 41.66666667%; + } + + .col-sm-6 { + flex-basis: 50%; + max-width: 50%; + } + + .col-sm-7 { + flex-basis: 58.33333333%; + max-width: 58.33333333%; + } + + .col-sm-8 { + flex-basis: 66.66666667%; + max-width: 66.66666667%; + } + + .col-sm-9 { + flex-basis: 75%; + max-width: 75%; + } + + .col-sm-10 { + flex-basis: 83.33333333%; + max-width: 83.33333333%; + } + + .col-sm-11 { + flex-basis: 91.66666667%; + max-width: 91.66666667%; + } + + .col-sm-12 { + flex-basis: 100%; + max-width: 100%; + /* Phablet first stacked get a gutter between blocks */ + margin-bottom: var(--gutter-width); + } + + .col-sm-offset-0 { + margin-left: 0; + } + + .col-sm-offset-1 { + margin-left: 8.33333333%; + } + + .col-sm-offset-2 { + margin-left: 16.66666667%; + } + + .col-sm-offset-3 { + margin-left: 25%; + } + + .col-sm-offset-4 { + margin-left: 33.33333333%; + } + + .col-sm-offset-5 { + margin-left: 41.66666667%; + } + + .col-sm-offset-6 { + margin-left: 50%; + } + + .col-sm-offset-7 { + margin-left: 58.33333333%; + } + + .col-sm-offset-8 { + margin-left: 66.66666667%; + } + + .col-sm-offset-9 { + margin-left: 75%; + } + + .col-sm-offset-10 { + margin-left: 83.33333333%; + } + + .col-sm-offset-11 { + margin-left: 91.66666667%; + } + + .first-sm { + order: -1; + } + + .last-sm { + order: 1; + } + + .initial-order-sm { + order: initial; + } +} + +@media only screen and (min-width: 768px) { + .col-md, + .col-md-1, + .col-md-2, + .col-md-3, + .col-md-4, + .col-md-5, + .col-md-6, + .col-md-7, + .col-md-8, + .col-md-9, + .col-md-10, + .col-md-11, + .col-md-12, + .col-md-offset-0, + .col-md-offset-1, + .col-md-offset-2, + .col-md-offset-3, + .col-md-offset-4, + .col-md-offset-5, + .col-md-offset-6, + .col-md-offset-7, + .col-md-offset-8, + .col-md-offset-9, + .col-md-offset-10, + .col-md-offset-11, + .col-md-offset-12 { + box-sizing: border-box; + flex: 0 0 auto; + padding-right: var(--half-gutter-width); + padding-left: var(--half-gutter-width); + } + + .col-md { + flex-grow: 1; + flex-basis: 0; + max-width: 100%; + } + + .col-md-1 { + flex-basis: 8.33333333%; + max-width: 8.33333333%; + } + + .col-md-2 { + flex-basis: 16.66666667%; + max-width: 16.66666667%; + } + + .col-md-3 { + flex-basis: 25%; + max-width: 25%; + } + + .col-md-4 { + flex-basis: 33.33333333%; + max-width: 33.33333333%; + } + + .col-md-5 { + flex-basis: 41.66666667%; + max-width: 41.66666667%; + } + + .col-md-6 { + flex-basis: 50%; + max-width: 50%; + } + + .col-md-7 { + flex-basis: 58.33333333%; + max-width: 58.33333333%; + } + + .col-md-8 { + flex-basis: 66.66666667%; + max-width: 66.66666667%; + } + + .col-md-9 { + flex-basis: 75%; + max-width: 75%; + } + + .col-md-10 { + flex-basis: 83.33333333%; + max-width: 83.33333333%; + } + + .col-md-11 { + flex-basis: 91.66666667%; + max-width: 91.66666667%; + } + + .col-md-12 { + flex-basis: 100%; + max-width: 100%; + /* Note at 768px breakpoint we stop adding gutters between stacked blocks */ + } + + .col-md-offset-0 { + margin-left: 0; + } + + .col-md-offset-1 { + margin-left: 8.33333333%; + } + + .col-md-offset-2 { + margin-left: 16.66666667%; + } + + .col-md-offset-3 { + margin-left: 25%; + } + + .col-md-offset-4 { + margin-left: 33.33333333%; + } + + .col-md-offset-5 { + margin-left: 41.66666667%; + } + + .col-md-offset-6 { + margin-left: 50%; + } + + .col-md-offset-7 { + margin-left: 58.33333333%; + } + + .col-md-offset-8 { + margin-left: 66.66666667%; + } + + .col-md-offset-9 { + margin-left: 75%; + } + + .col-md-offset-10 { + margin-left: 83.33333333%; + } + + .col-md-offset-11 { + margin-left: 91.66666667%; + } + + .first-md { + order: -1; + } + + .last-md { + order: 1; + } + + .initial-order-md { + order: initial; + } +} + +@media only screen and (min-width: 992px) { + .col-lg, + .col-lg-1, + .col-lg-2, + .col-lg-3, + .col-lg-4, + .col-lg-5, + .col-lg-6, + .col-lg-7, + .col-lg-8, + .col-lg-9, + .col-lg-10, + .col-lg-11, + .col-lg-12, + .col-lg-offset-0, + .col-lg-offset-1, + .col-lg-offset-2, + .col-lg-offset-3, + .col-lg-offset-4, + .col-lg-offset-5, + .col-lg-offset-6, + .col-lg-offset-7, + .col-lg-offset-8, + .col-lg-offset-9, + .col-lg-offset-10, + .col-lg-offset-11, + .col-lg-offset-12 { + box-sizing: border-box; + flex: 0 0 auto; + padding-right: var(--half-gutter-width); + padding-left: var(--half-gutter-width); + } + + .col-lg { + flex-grow: 1; + flex-basis: 0; + max-width: 100%; + } + + .col-lg-1 { + flex-basis: 8.33333333%; + max-width: 8.33333333%; + } + + .col-lg-2 { + flex-basis: 16.66666667%; + max-width: 16.66666667%; + } + + .col-lg-3 { + flex-basis: 25%; + max-width: 25%; + } + + .col-lg-4 { + flex-basis: 33.33333333%; + max-width: 33.33333333%; + } + + .col-lg-5 { + flex-basis: 41.66666667%; + max-width: 41.66666667%; + } + + .col-lg-6 { + flex-basis: 50%; + max-width: 50%; + } + + .col-lg-7 { + flex-basis: 58.33333333%; + max-width: 58.33333333%; + } + + .col-lg-8 { + flex-basis: 66.66666667%; + max-width: 66.66666667%; + } + + .col-lg-9 { + flex-basis: 75%; + max-width: 75%; + } + + .col-lg-10 { + flex-basis: 83.33333333%; + max-width: 83.33333333%; + } + + .col-lg-11 { + flex-basis: 91.66666667%; + max-width: 91.66666667%; + } + + .col-lg-12 { + flex-basis: 100%; + max-width: 100%; + } + + .col-lg-offset-0 { + margin-left: 0; + } + + .col-lg-offset-1 { + margin-left: 8.33333333%; + } + + .col-lg-offset-2 { + margin-left: 16.66666667%; + } + + .col-lg-offset-3 { + margin-left: 25%; + } + + .col-lg-offset-4 { + margin-left: 33.33333333%; + } + + .col-lg-offset-5 { + margin-left: 41.66666667%; + } + + .col-lg-offset-6 { + margin-left: 50%; + } + + .col-lg-offset-7 { + margin-left: 58.33333333%; + } + + .col-lg-offset-8 { + margin-left: 66.66666667%; + } + + .col-lg-offset-9 { + margin-left: 75%; + } + + .col-lg-offset-10 { + margin-left: 83.33333333%; + } + + .col-lg-offset-11 { + margin-left: 91.66666667%; + } + + .first-lg { + order: -1; + } + + .last-lg { + order: 1; + } + + .initial-order-lg { + order: initial; + } +} + +@media only screen and (min-width: 1200px) { + .col-xl, + .col-xl-1, + .col-xl-2, + .col-xl-3, + .col-xl-4, + .col-xl-5, + .col-xl-6, + .col-xl-7, + .col-xl-8, + .col-xl-9, + .col-xl-10, + .col-xl-11, + .col-xl-12, + .col-xl-offset-0, + .col-xl-offset-1, + .col-xl-offset-2, + .col-xl-offset-3, + .col-xl-offset-4, + .col-xl-offset-5, + .col-xl-offset-6, + .col-xl-offset-7, + .col-xl-offset-8, + .col-xl-offset-9, + .col-xl-offset-10, + .col-xl-offset-11, + .col-xl-offset-12 { + box-sizing: border-box; + flex: 0 0 auto; + padding-right: var(--half-gutter-width); + padding-left: var(--half-gutter-width); + } + + .col-xl { + flex-grow: 1; + flex-basis: 0; + max-width: 100%; + } + + .col-xl-1 { + flex-basis: 8.33333333%; + max-width: 8.33333333%; + } + + .col-xl-2 { + flex-basis: 16.66666667%; + max-width: 16.66666667%; + } + + .col-xl-3 { + flex-basis: 25%; + max-width: 25%; + } + + .col-xl-4 { + flex-basis: 33.33333333%; + max-width: 33.33333333%; + } + + .col-xl-5 { + flex-basis: 41.66666667%; + max-width: 41.66666667%; + } + + .col-xl-6 { + flex-basis: 50%; + max-width: 50%; + } + + .col-xl-7 { + flex-basis: 58.33333333%; + max-width: 58.33333333%; + } + + .col-xl-8 { + flex-basis: 66.66666667%; + max-width: 66.66666667%; + } + + .col-xl-9 { + flex-basis: 75%; + max-width: 75%; + } + + .col-xl-10 { + flex-basis: 83.33333333%; + max-width: 83.33333333%; + } + + .col-xl-11 { + flex-basis: 91.66666667%; + max-width: 91.66666667%; + } + + .col-xl-12 { + flex-basis: 100%; + max-width: 100%; + } + + .col-xl-offset-0 { + margin-left: 0; + } + + .col-xl-offset-1 { + margin-left: 8.33333333%; + } + + .col-xl-offset-2 { + margin-left: 16.66666667%; + } + + .col-xl-offset-3 { + margin-left: 25%; + } + + .col-xl-offset-4 { + margin-left: 33.33333333%; + } + + .col-xl-offset-5 { + margin-left: 41.66666667%; + } + + .col-xl-offset-6 { + margin-left: 50%; + } + + .col-xl-offset-7 { + margin-left: 58.33333333%; + } + + .col-xl-offset-8 { + margin-left: 66.66666667%; + } + + .col-xl-offset-9 { + margin-left: 75%; + } + + .col-xl-offset-10 { + margin-left: 83.33333333%; + } + + .col-xl-offset-11 { + margin-left: 91.66666667%; + } + + .first-xl { + order: -1; + } + + .last-xl { + order: 1; + } + + .initial-order-xl { + order: initial; + } +} + +@media only screen and (max-width: 576px) { + .hidden-xs { + display: none; + } +} + +@media only screen and (min-width: 576px) and (max-width: 768px) { + .hidden-sm { + display: none; + } +} + +@media only screen and (min-width: 768px) and (max-width: 992px) { + .hidden-md { + display: none; + } +} + +@media only screen and (min-width: 992px) and (max-width: 1200px) { + .hidden-lg { + display: none; + } +} + +@media only screen and (min-width: 1200px) { + .hidden-xl { + display: none; + } +} \ No newline at end of file diff --git a/agnosticui-css/flexboxgrid-grid.css b/agnosticui-css/flexboxgrid-grid.css new file mode 100644 index 000000000..aee189e4e --- /dev/null +++ b/agnosticui-css/flexboxgrid-grid.css @@ -0,0 +1,51 @@ +:root { + /** + * Redefine this with --agnosticui-gutter-width: at the :root {} level in your + * styles to opt-in and customize the grid gutters. + */ + --agnosticui-default-gutter-width: 0; /* note: no gutters by default */ + --gutter-width: var( + --agnosticui-gutter-width, + var(--agnosticui-default-gutter-width) + ); + --gutter-compensation: calc((var(--gutter-width) * 0.5) * -1); + --half-gutter-width: calc((var(--gutter-width) * 0.5)); + --agnosticui-default-sm-min: 576px; + --agnosticui-default-md-min: 768px; + --agnosticui-default-lg-min: 992px; + --agnosticui-default-xl-min: 1200px; +} + +.flexgrid-container { + box-sizing: border-box; + margin-left: auto; + margin-right: auto; +} + +@media only screen and (min-width: 576px) { + .flexgrid-container { + width: var(--agnosticui-sm-min, var(--agnosticui-default-sm-min)); + max-width: 100%; + } +} + +@media only screen and (min-width: 768px) { + .flexgrid-container { + width: var(--agnosticui-md-min, var(--agnosticui-default-md-min)); + max-width: 100%; + } +} + +@media only screen and (min-width: 992px) { + .flexgrid-container { + width: var(--agnosticui-lg-min, var(--agnosticui-default-lg-min)); + max-width: 100%; + } +} + +@media only screen and (min-width: 1200px) { + .flexgrid-container { + width: var(--agnosticui-xl-min, var(--agnosticui-default-xl-min)); + max-width: 100%; + } +} \ No newline at end of file diff --git a/agnosticui-css/flexboxgrid-row.css b/agnosticui-css/flexboxgrid-row.css new file mode 100644 index 000000000..20af3012e --- /dev/null +++ b/agnosticui-css/flexboxgrid-row.css @@ -0,0 +1,197 @@ + +.row { + box-sizing: border-box; + display: flex; + flex: 0 1 auto; + flex-direction: row; + flex-wrap: wrap; + margin-right: var(--gutter-compensation); + margin-left: var(--gutter-compensation); +} + +.reverse { + flex-direction: row-reverse; +} + +.start-xs { + justify-content: flex-start; + text-align: start; +} + +.center-xs { + justify-content: center; + text-align: center; +} + +.end-xs { + justify-content: flex-end; + text-align: end; +} + +.top-xs { + align-items: flex-start; +} + +.middle-xs { + align-items: center; +} + +.bottom-xs { + align-items: flex-end; +} + +.around-xs { + justify-content: space-around; +} + +.between-xs { + justify-content: space-between; +} + +@media only screen and (min-width: 576px) { + .start-sm { + justify-content: flex-start; + text-align: start; + } + + .center-sm { + justify-content: center; + text-align: center; + } + + .end-sm { + justify-content: flex-end; + text-align: end; + } + + .top-sm { + align-items: flex-start; + } + + .middle-sm { + align-items: center; + } + + .bottom-sm { + align-items: flex-end; + } + + .around-sm { + justify-content: space-around; + } + + .between-sm { + justify-content: space-between; + } +} + +@media only screen and (min-width: 768px) { + .start-md { + justify-content: flex-start; + text-align: start; + } + + .center-md { + justify-content: center; + text-align: center; + } + + .end-md { + justify-content: flex-end; + text-align: end; + } + + .top-md { + align-items: flex-start; + } + + .middle-md { + align-items: center; + } + + .bottom-md { + align-items: flex-end; + } + + .around-md { + justify-content: space-around; + } + + .between-md { + justify-content: space-between; + } +} + +@media only screen and (min-width: 992px) { + .start-lg { + justify-content: flex-start; + text-align: start; + } + + .center-lg { + justify-content: center; + text-align: center; + } + + .end-lg { + justify-content: flex-end; + text-align: end; + } + + .top-lg { + align-items: flex-start; + } + + .middle-lg { + align-items: center; + } + + .bottom-lg { + align-items: flex-end; + } + + .around-lg { + justify-content: space-around; + } + + .between-lg { + justify-content: space-between; + } +} + +@media only screen and (min-width: 1200px) { + .start-xl { + justify-content: flex-start; + text-align: start; + } + + .center-xl { + justify-content: center; + text-align: center; + } + + .end-xl { + justify-content: flex-end; + text-align: end; + } + + .top-xl { + align-items: flex-start; + } + + .middle-xl { + align-items: center; + } + + .bottom-xl { + align-items: flex-end; + } + + .around-xl { + justify-content: space-around; + } + + .between-xl { + justify-content: space-between; + } +} \ No newline at end of file diff --git a/agnosticui-css/flexboxgrid.html b/agnosticui-css/flexboxgrid.html index d56a9fded..d97d45aa8 100644 --- a/agnosticui-css/flexboxgrid.html +++ b/agnosticui-css/flexboxgrid.html @@ -4,7 +4,9 @@ FlexGrid - + + + `); -fs.writeFileSync('./src/stories/HeaderNavItem.svelte', headerNavItemSynchronized, 'utf8'); \ No newline at end of file +fs.writeFileSync('./src/stories/HeaderNavItem.svelte', headerNavItemSynchronized, 'utf8'); + +/** + * FlexGrid (grid, row, col all copied over. Svelte SFC requires this so that each + * component gets it's own CSS stuff copied over) + */ +css = fs.readFileSync('../agnosticui-css/flexboxgrid-grid.css', 'utf8'); +const gridSvelte = fs.readFileSync('./src/stories/FlexGrid/FlexGrid.svelte', 'utf8'); +const gridSynchronized = gridSvelte.replace(styleRegex, ``); +fs.writeFileSync('./src/stories/FlexGrid/FlexGrid.svelte', gridSynchronized, 'utf8'); + +css = fs.readFileSync('../agnosticui-css/flexboxgrid-row.css', 'utf8'); +const rowSvelte = fs.readFileSync('./src/stories/FlexGrid/FlexRow.svelte', 'utf8'); +const rowSynchronized = rowSvelte.replace(styleRegex, ``); +fs.writeFileSync('./src/stories/FlexGrid/FlexRow.svelte', rowSynchronized, 'utf8'); + +css = fs.readFileSync('../agnosticui-css/flexboxgrid-col.css', 'utf8'); +const colSvelte = fs.readFileSync('./src/stories/FlexGrid/FlexCol.svelte', 'utf8'); +const colSynchronized = colSvelte.replace(styleRegex, ``); +fs.writeFileSync('./src/stories/FlexGrid/FlexCol.svelte', colSynchronized, 'utf8'); diff --git a/agnosticui-svelte/src/__snapshots__/Storyshots.test.js.snap b/agnosticui-svelte/src/__snapshots__/Storyshots.test.js.snap index b843d5822..7e33328e9 100644 --- a/agnosticui-svelte/src/__snapshots__/Storyshots.test.js.snap +++ b/agnosticui-svelte/src/__snapshots__/Storyshots.test.js.snap @@ -744,6 +744,108 @@ exports[`Storyshots Cards Card 1`] = ` `; +exports[`Storyshots FlexGrid Grid 1`] = ` +
+
+
+
+
+

+ xs=12 sm=4 lg=6 xl=4 +

+
+ +
+

+ xs=12 sm=4 lg=6 xl=8 +

+
+
+
+
+ +
+
+
+

+ test +

+
+
+
+ +
+
+
+
+

+ sm="2" +

+
+ +
+

+ sm=2 smOffset=1 +

+
+ +
+

+ sm=2 smOffset=1 +

+
+ +
+

+ sm=2 smOffset=2 +

+
+
+
+
+ +
+

+ Row attributes test. Maybe ignore this ;) +

+ +
+
+
+
+
+`; + exports[`Storyshots Header Example Header Test 1`] = `
({ + Component: FlexGridExample, +}); diff --git a/agnosticui-svelte/src/stories/FlexGrid/FlexBoxGrid2Custom.module.css b/agnosticui-svelte/src/stories/FlexGrid/FlexBoxGrid2Custom.module.css new file mode 100644 index 000000000..2dc9b8003 --- /dev/null +++ b/agnosticui-svelte/src/stories/FlexGrid/FlexBoxGrid2Custom.module.css @@ -0,0 +1,1149 @@ +:root { + /** + * Redefine this with --agnosticui-gutter-width: at the :root {} level in your + * styles to opt-in and customize the grid gutters. + */ + --agnosticui-default-gutter-width: 0; /* note: no gutters by default */ + --gutter-width: var(--agnosticui-gutter-width, var(--agnosticui-default-gutter-width)); + --gutter-compensation: calc((var(--gutter-width) * 0.5) * -1); + --half-gutter-width: calc((var(--gutter-width) * 0.5)); + --agnosticui-default-sm-min: 576px; + --agnosticui-default-md-min: 768px; + --agnosticui-default-lg-min: 992px; + --agnosticui-default-xl-min: 1200px; +} + +.flexgrid-container { + box-sizing: border-box; + margin-left: auto; + margin-right: auto; +} + +@media only screen and (min-width: 576px) { + .flexgrid-container { + width: var(--agnosticui-sm-min, var(--agnosticui-default-sm-min)); + max-width: 100%; + } +} + +@media only screen and (min-width: 768px) { + .flexgrid-container { + width: var(--agnosticui-md-min, var(--agnosticui-default-md-min)); + max-width: 100%; + } +} + +@media only screen and (min-width: 992px) { + .flexgrid-container { + width: var(--agnosticui-lg-min, var(--agnosticui-default-lg-min)); + max-width: 100%; + } +} + +@media only screen and (min-width: 1200px) { + .flexgrid-container { + width: var(--agnosticui-xl-min, var(--agnosticui-default-xl-min)); + max-width: 100%; + } +} + +.row { + box-sizing: border-box; + display: flex; + flex: 0 1 auto; + flex-direction: row; + flex-wrap: wrap; + margin-right: var(--gutter-compensation); + margin-left: var(--gutter-compensation); +} + +.row.reverse { + flex-direction: row-reverse; +} + +.col.reverse { + flex-direction: column-reverse; +} + +.col-xs, +.col-xs-1, +.col-xs-2, +.col-xs-3, +.col-xs-4, +.col-xs-5, +.col-xs-6, +.col-xs-7, +.col-xs-8, +.col-xs-9, +.col-xs-10, +.col-xs-11, +.col-xs-12, +.col-xs-offset-0, +.col-xs-offset-1, +.col-xs-offset-2, +.col-xs-offset-3, +.col-xs-offset-4, +.col-xs-offset-5, +.col-xs-offset-6, +.col-xs-offset-7, +.col-xs-offset-8, +.col-xs-offset-9, +.col-xs-offset-10, +.col-xs-offset-11, +.col-xs-offset-12, +.col-sm, +.col-sm-1, +.col-sm-2, +.col-sm-3, +.col-sm-4, +.col-sm-5, +.col-sm-6, +.col-sm-7, +.col-sm-8, +.col-sm-9, +.col-sm-10, +.col-sm-11, +.col-sm-12, +.col-sm-offset-0, +.col-sm-offset-1, +.col-sm-offset-2, +.col-sm-offset-3, +.col-sm-offset-4, +.col-sm-offset-5, +.col-sm-offset-6, +.col-sm-offset-7, +.col-sm-offset-8, +.col-sm-offset-9, +.col-sm-offset-10, +.col-sm-offset-11, +.col-sm-offset-12, +.col-md, +.col-md-1, +.col-md-2, +.col-md-3, +.col-md-4, +.col-md-5, +.col-md-6, +.col-md-7, +.col-md-8, +.col-md-9, +.col-md-10, +.col-md-11, +.col-md-12, +.col-md-offset-0, +.col-md-offset-1, +.col-md-offset-2, +.col-md-offset-3, +.col-md-offset-4, +.col-md-offset-5, +.col-md-offset-6, +.col-md-offset-7, +.col-md-offset-8, +.col-md-offset-9, +.col-md-offset-10, +.col-md-offset-11, +.col-md-offset-12, +.col-lg, +.col-lg-1, +.col-lg-2, +.col-lg-3, +.col-lg-4, +.col-lg-5, +.col-lg-6, +.col-lg-7, +.col-lg-8, +.col-lg-9, +.col-lg-10, +.col-lg-11, +.col-lg-12, +.col-lg-offset-0, +.col-lg-offset-1, +.col-lg-offset-2, +.col-lg-offset-3, +.col-lg-offset-4, +.col-lg-offset-5, +.col-lg-offset-6, +.col-lg-offset-7, +.col-lg-offset-8, +.col-lg-offset-9, +.col-lg-offset-10, +.col-lg-offset-11, +.col-lg-offset-12, +.col-xl, +.col-xl-1, +.col-xl-2, +.col-xl-3, +.col-xl-4, +.col-xl-5, +.col-xl-6, +.col-xl-7, +.col-xl-8, +.col-xl-9, +.col-xl-10, +.col-xl-11, +.col-xl-12, +.col-xl-offset-0, +.col-xl-offset-1, +.col-xl-offset-2, +.col-xl-offset-3, +.col-xl-offset-4, +.col-xl-offset-5, +.col-xl-offset-6, +.col-xl-offset-7, +.col-xl-offset-8, +.col-xl-offset-9, +.col-xl-offset-10, +.col-xl-offset-11, +.col-xl-offset-12 { + box-sizing: border-box; + flex: 0 0 auto; + flex-basis: 100%; + padding-right: var(--half-gutter-width); + padding-left: var(--half-gutter-width); + max-width: 100%; +} + +.col-xs { + flex-grow: 1; + flex-basis: 0; + max-width: 100%; +} + +.col-xs-1 { + flex-basis: 8.33333333%; + max-width: 8.33333333%; +} + +.col-xs-2 { + flex-basis: 16.66666667%; + max-width: 16.66666667%; +} + +.col-xs-3 { + flex-basis: 25%; + max-width: 25%; +} + +.col-xs-4 { + flex-basis: 33.33333333%; + max-width: 33.33333333%; +} + +.col-xs-5 { + flex-basis: 41.66666667%; + max-width: 41.66666667%; +} + +.col-xs-6 { + flex-basis: 50%; + max-width: 50%; +} + +.col-xs-7 { + flex-basis: 58.33333333%; + max-width: 58.33333333%; +} + +.col-xs-8 { + flex-basis: 66.66666667%; + max-width: 66.66666667%; +} + +.col-xs-9 { + flex-basis: 75%; + max-width: 75%; +} + +.col-xs-10 { + flex-basis: 83.33333333%; + max-width: 83.33333333%; +} + +.col-xs-11 { + flex-basis: 91.66666667%; + max-width: 91.66666667%; +} + +.col-xs-12 { + flex-basis: 100%; + max-width: 100%; + /* Mobile first stacked get a gutter between blocks */ + margin-bottom: var(--gutter-width); +} + +.col-xs-offset-0 { + margin-left: 0; +} + +.col-xs-offset-1 { + margin-left: 8.33333333%; +} + +.col-xs-offset-2 { + margin-left: 16.66666667%; +} + +.col-xs-offset-3 { + margin-left: 25%; +} + +.col-xs-offset-4 { + margin-left: 33.33333333%; +} + +.col-xs-offset-5 { + margin-left: 41.66666667%; +} + +.col-xs-offset-6 { + margin-left: 50%; +} + +.col-xs-offset-7 { + margin-left: 58.33333333%; +} + +.col-xs-offset-8 { + margin-left: 66.66666667%; +} + +.col-xs-offset-9 { + margin-left: 75%; +} + +.col-xs-offset-10 { + margin-left: 83.33333333%; +} + +.col-xs-offset-11 { + margin-left: 91.66666667%; +} + +.start-xs { + justify-content: flex-start; + text-align: start; +} + +.center-xs { + justify-content: center; + text-align: center; +} + +.end-xs { + justify-content: flex-end; + text-align: end; +} + +.top-xs { + align-items: flex-start; +} + +.middle-xs { + align-items: center; +} + +.bottom-xs { + align-items: flex-end; +} + +.around-xs { + justify-content: space-around; +} + +.between-xs { + justify-content: space-between; +} + +.first-xs { + order: -1; +} + +.last-xs { + order: 1; +} + +.initial-order-xs { + order: initial; +} + +@media only screen and (min-width: 576px) { + .col-sm { + flex-grow: 1; + flex-basis: 0; + max-width: 100%; + } + + .col-sm-1 { + flex-basis: 8.33333333%; + max-width: 8.33333333%; + } + + .col-sm-2 { + flex-basis: 16.66666667%; + max-width: 16.66666667%; + } + + .col-sm-3 { + flex-basis: 25%; + max-width: 25%; + } + + .col-sm-4 { + flex-basis: 33.33333333%; + max-width: 33.33333333%; + } + + .col-sm-5 { + flex-basis: 41.66666667%; + max-width: 41.66666667%; + } + + .col-sm-6 { + flex-basis: 50%; + max-width: 50%; + } + + .col-sm-7 { + flex-basis: 58.33333333%; + max-width: 58.33333333%; + } + + .col-sm-8 { + flex-basis: 66.66666667%; + max-width: 66.66666667%; + } + + .col-sm-9 { + flex-basis: 75%; + max-width: 75%; + } + + .col-sm-10 { + flex-basis: 83.33333333%; + max-width: 83.33333333%; + } + + .col-sm-11 { + flex-basis: 91.66666667%; + max-width: 91.66666667%; + } + + .col-sm-12 { + flex-basis: 100%; + max-width: 100%; + /* Phablet first stacked get a gutter between blocks */ + margin-bottom: var(--gutter-width); + } + + .col-sm-offset-0 { + margin-left: 0; + } + + .col-sm-offset-1 { + margin-left: 8.33333333%; + } + + .col-sm-offset-2 { + margin-left: 16.66666667%; + } + + .col-sm-offset-3 { + margin-left: 25%; + } + + .col-sm-offset-4 { + margin-left: 33.33333333%; + } + + .col-sm-offset-5 { + margin-left: 41.66666667%; + } + + .col-sm-offset-6 { + margin-left: 50%; + } + + .col-sm-offset-7 { + margin-left: 58.33333333%; + } + + .col-sm-offset-8 { + margin-left: 66.66666667%; + } + + .col-sm-offset-9 { + margin-left: 75%; + } + + .col-sm-offset-10 { + margin-left: 83.33333333%; + } + + .col-sm-offset-11 { + margin-left: 91.66666667%; + } + + .start-sm { + justify-content: flex-start; + text-align: start; + } + + .center-sm { + justify-content: center; + text-align: center; + } + + .end-sm { + justify-content: flex-end; + text-align: end; + } + + .top-sm { + align-items: flex-start; + } + + .middle-sm { + align-items: center; + } + + .bottom-sm { + align-items: flex-end; + } + + .around-sm { + justify-content: space-around; + } + + .between-sm { + justify-content: space-between; + } + + .first-sm { + order: -1; + } + + .last-sm { + order: 1; + } + + .initial-order-sm { + order: initial; + } +} + +@media only screen and (min-width: 768px) { + .col-md, + .col-md-1, + .col-md-2, + .col-md-3, + .col-md-4, + .col-md-5, + .col-md-6, + .col-md-7, + .col-md-8, + .col-md-9, + .col-md-10, + .col-md-11, + .col-md-12, + .col-md-offset-0, + .col-md-offset-1, + .col-md-offset-2, + .col-md-offset-3, + .col-md-offset-4, + .col-md-offset-5, + .col-md-offset-6, + .col-md-offset-7, + .col-md-offset-8, + .col-md-offset-9, + .col-md-offset-10, + .col-md-offset-11, + .col-md-offset-12 { + box-sizing: border-box; + flex: 0 0 auto; + padding-right: var(--half-gutter-width); + padding-left: var(--half-gutter-width); + } + + .col-md { + flex-grow: 1; + flex-basis: 0; + max-width: 100%; + } + + .col-md-1 { + flex-basis: 8.33333333%; + max-width: 8.33333333%; + } + + .col-md-2 { + flex-basis: 16.66666667%; + max-width: 16.66666667%; + } + + .col-md-3 { + flex-basis: 25%; + max-width: 25%; + } + + .col-md-4 { + flex-basis: 33.33333333%; + max-width: 33.33333333%; + } + + .col-md-5 { + flex-basis: 41.66666667%; + max-width: 41.66666667%; + } + + .col-md-6 { + flex-basis: 50%; + max-width: 50%; + } + + .col-md-7 { + flex-basis: 58.33333333%; + max-width: 58.33333333%; + } + + .col-md-8 { + flex-basis: 66.66666667%; + max-width: 66.66666667%; + } + + .col-md-9 { + flex-basis: 75%; + max-width: 75%; + } + + .col-md-10 { + flex-basis: 83.33333333%; + max-width: 83.33333333%; + } + + .col-md-11 { + flex-basis: 91.66666667%; + max-width: 91.66666667%; + } + + .col-md-12 { + flex-basis: 100%; + max-width: 100%; + /* Note at 768px breakpoint we stop adding gutters between stacked blocks */ + } + + .col-md-offset-0 { + margin-left: 0; + } + + .col-md-offset-1 { + margin-left: 8.33333333%; + } + + .col-md-offset-2 { + margin-left: 16.66666667%; + } + + .col-md-offset-3 { + margin-left: 25%; + } + + .col-md-offset-4 { + margin-left: 33.33333333%; + } + + .col-md-offset-5 { + margin-left: 41.66666667%; + } + + .col-md-offset-6 { + margin-left: 50%; + } + + .col-md-offset-7 { + margin-left: 58.33333333%; + } + + .col-md-offset-8 { + margin-left: 66.66666667%; + } + + .col-md-offset-9 { + margin-left: 75%; + } + + .col-md-offset-10 { + margin-left: 83.33333333%; + } + + .col-md-offset-11 { + margin-left: 91.66666667%; + } + + .start-md { + justify-content: flex-start; + text-align: start; + } + + .center-md { + justify-content: center; + text-align: center; + } + + .end-md { + justify-content: flex-end; + text-align: end; + } + + .top-md { + align-items: flex-start; + } + + .middle-md { + align-items: center; + } + + .bottom-md { + align-items: flex-end; + } + + .around-md { + justify-content: space-around; + } + + .between-md { + justify-content: space-between; + } + + .first-md { + order: -1; + } + + .last-md { + order: 1; + } + + .initial-order-md { + order: initial; + } +} + +@media only screen and (min-width: 992px) { + .col-lg, + .col-lg-1, + .col-lg-2, + .col-lg-3, + .col-lg-4, + .col-lg-5, + .col-lg-6, + .col-lg-7, + .col-lg-8, + .col-lg-9, + .col-lg-10, + .col-lg-11, + .col-lg-12, + .col-lg-offset-0, + .col-lg-offset-1, + .col-lg-offset-2, + .col-lg-offset-3, + .col-lg-offset-4, + .col-lg-offset-5, + .col-lg-offset-6, + .col-lg-offset-7, + .col-lg-offset-8, + .col-lg-offset-9, + .col-lg-offset-10, + .col-lg-offset-11, + .col-lg-offset-12 { + box-sizing: border-box; + flex: 0 0 auto; + padding-right: var(--half-gutter-width); + padding-left: var(--half-gutter-width); + } + + .col-lg { + flex-grow: 1; + flex-basis: 0; + max-width: 100%; + } + + .col-lg-1 { + flex-basis: 8.33333333%; + max-width: 8.33333333%; + } + + .col-lg-2 { + flex-basis: 16.66666667%; + max-width: 16.66666667%; + } + + .col-lg-3 { + flex-basis: 25%; + max-width: 25%; + } + + .col-lg-4 { + flex-basis: 33.33333333%; + max-width: 33.33333333%; + } + + .col-lg-5 { + flex-basis: 41.66666667%; + max-width: 41.66666667%; + } + + .col-lg-6 { + flex-basis: 50%; + max-width: 50%; + } + + .col-lg-7 { + flex-basis: 58.33333333%; + max-width: 58.33333333%; + } + + .col-lg-8 { + flex-basis: 66.66666667%; + max-width: 66.66666667%; + } + + .col-lg-9 { + flex-basis: 75%; + max-width: 75%; + } + + .col-lg-10 { + flex-basis: 83.33333333%; + max-width: 83.33333333%; + } + + .col-lg-11 { + flex-basis: 91.66666667%; + max-width: 91.66666667%; + } + + .col-lg-12 { + flex-basis: 100%; + max-width: 100%; + } + + .col-lg-offset-0 { + margin-left: 0; + } + + .col-lg-offset-1 { + margin-left: 8.33333333%; + } + + .col-lg-offset-2 { + margin-left: 16.66666667%; + } + + .col-lg-offset-3 { + margin-left: 25%; + } + + .col-lg-offset-4 { + margin-left: 33.33333333%; + } + + .col-lg-offset-5 { + margin-left: 41.66666667%; + } + + .col-lg-offset-6 { + margin-left: 50%; + } + + .col-lg-offset-7 { + margin-left: 58.33333333%; + } + + .col-lg-offset-8 { + margin-left: 66.66666667%; + } + + .col-lg-offset-9 { + margin-left: 75%; + } + + .col-lg-offset-10 { + margin-left: 83.33333333%; + } + + .col-lg-offset-11 { + margin-left: 91.66666667%; + } + + .start-lg { + justify-content: flex-start; + text-align: start; + } + + .center-lg { + justify-content: center; + text-align: center; + } + + .end-lg { + justify-content: flex-end; + text-align: end; + } + + .top-lg { + align-items: flex-start; + } + + .middle-lg { + align-items: center; + } + + .bottom-lg { + align-items: flex-end; + } + + .around-lg { + justify-content: space-around; + } + + .between-lg { + justify-content: space-between; + } + + .first-lg { + order: -1; + } + + .last-lg { + order: 1; + } + + .initial-order-lg { + order: initial; + } +} + +@media only screen and (min-width: 1200px) { + .col-xl, + .col-xl-1, + .col-xl-2, + .col-xl-3, + .col-xl-4, + .col-xl-5, + .col-xl-6, + .col-xl-7, + .col-xl-8, + .col-xl-9, + .col-xl-10, + .col-xl-11, + .col-xl-12, + .col-xl-offset-0, + .col-xl-offset-1, + .col-xl-offset-2, + .col-xl-offset-3, + .col-xl-offset-4, + .col-xl-offset-5, + .col-xl-offset-6, + .col-xl-offset-7, + .col-xl-offset-8, + .col-xl-offset-9, + .col-xl-offset-10, + .col-xl-offset-11, + .col-xl-offset-12 { + box-sizing: border-box; + flex: 0 0 auto; + padding-right: var(--half-gutter-width); + padding-left: var(--half-gutter-width); + } + + .col-xl { + flex-grow: 1; + flex-basis: 0; + max-width: 100%; + } + + .col-xl-1 { + flex-basis: 8.33333333%; + max-width: 8.33333333%; + } + + .col-xl-2 { + flex-basis: 16.66666667%; + max-width: 16.66666667%; + } + + .col-xl-3 { + flex-basis: 25%; + max-width: 25%; + } + + .col-xl-4 { + flex-basis: 33.33333333%; + max-width: 33.33333333%; + } + + .col-xl-5 { + flex-basis: 41.66666667%; + max-width: 41.66666667%; + } + + .col-xl-6 { + flex-basis: 50%; + max-width: 50%; + } + + .col-xl-7 { + flex-basis: 58.33333333%; + max-width: 58.33333333%; + } + + .col-xl-8 { + flex-basis: 66.66666667%; + max-width: 66.66666667%; + } + + .col-xl-9 { + flex-basis: 75%; + max-width: 75%; + } + + .col-xl-10 { + flex-basis: 83.33333333%; + max-width: 83.33333333%; + } + + .col-xl-11 { + flex-basis: 91.66666667%; + max-width: 91.66666667%; + } + + .col-xl-12 { + flex-basis: 100%; + max-width: 100%; + } + + .col-xl-offset-0 { + margin-left: 0; + } + + .col-xl-offset-1 { + margin-left: 8.33333333%; + } + + .col-xl-offset-2 { + margin-left: 16.66666667%; + } + + .col-xl-offset-3 { + margin-left: 25%; + } + + .col-xl-offset-4 { + margin-left: 33.33333333%; + } + + .col-xl-offset-5 { + margin-left: 41.66666667%; + } + + .col-xl-offset-6 { + margin-left: 50%; + } + + .col-xl-offset-7 { + margin-left: 58.33333333%; + } + + .col-xl-offset-8 { + margin-left: 66.66666667%; + } + + .col-xl-offset-9 { + margin-left: 75%; + } + + .col-xl-offset-10 { + margin-left: 83.33333333%; + } + + .col-xl-offset-11 { + margin-left: 91.66666667%; + } + + .start-xl { + justify-content: flex-start; + text-align: start; + } + + .center-xl { + justify-content: center; + text-align: center; + } + + .end-xl { + justify-content: flex-end; + text-align: end; + } + + .top-xl { + align-items: flex-start; + } + + .middle-xl { + align-items: center; + } + + .bottom-xl { + align-items: flex-end; + } + + .around-xl { + justify-content: space-around; + } + + .between-xl { + justify-content: space-between; + } + + .first-xl { + order: -1; + } + + .last-xl { + order: 1; + } + + .initial-order-xl { + order: initial; + } + +} + +@media only screen and (max-width: 576px) { + .hidden-xs { + display: none; + } +} + +@media only screen and (min-width: 576px) and (max-width: 768px) { + .hidden-sm { + display: none; + } +} + +@media only screen and (min-width: 768px) and (max-width: 992px) { + .hidden-md { + display: none; + } +} + +@media only screen and (min-width: 992px) and (max-width: 1200px) { + .hidden-lg { + display: none; + } +} + +@media only screen and (min-width: 1200px) { + .hidden-xl { + display: none; + } +} diff --git a/agnosticui-svelte/src/stories/FlexGrid/FlexCol.svelte b/agnosticui-svelte/src/stories/FlexGrid/FlexCol.svelte new file mode 100644 index 000000000..5d7496863 --- /dev/null +++ b/agnosticui-svelte/src/stories/FlexGrid/FlexCol.svelte @@ -0,0 +1,972 @@ + + + + +
+ +
diff --git a/agnosticui-svelte/src/stories/FlexGrid/FlexGrid.svelte b/agnosticui-svelte/src/stories/FlexGrid/FlexGrid.svelte new file mode 100644 index 000000000..c010f63d0 --- /dev/null +++ b/agnosticui-svelte/src/stories/FlexGrid/FlexGrid.svelte @@ -0,0 +1,64 @@ + + + + +
+ +
diff --git a/agnosticui-svelte/src/stories/FlexGrid/FlexRow.svelte b/agnosticui-svelte/src/stories/FlexGrid/FlexRow.svelte new file mode 100644 index 000000000..f18242f47 --- /dev/null +++ b/agnosticui-svelte/src/stories/FlexGrid/FlexRow.svelte @@ -0,0 +1,232 @@ + + + + +
+ +
diff --git a/agnosticui-svelte/src/stories/FlexGrid/LICENSE.md b/agnosticui-svelte/src/stories/FlexGrid/LICENSE.md new file mode 100644 index 000000000..524e28413 --- /dev/null +++ b/agnosticui-svelte/src/stories/FlexGrid/LICENSE.md @@ -0,0 +1,17 @@ +MIT License + +Copyright 2018 Roy Lee + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +Here's a link to the original author's GitHub for this software: + +https://github.com/roylee0704/react-flexbox-grid/blob/master/package.json#L88 + +Note that we looked for a License file in the react-flexbox-grid GitHub repository, but there was none that we could find but it was clearly listed as MIT in the README.md and package.json. Given that, I've added the MIT License above explicitly crediting the original author, Roy Lee. diff --git a/agnosticui-svelte/src/stories/FlexGridExample.svelte b/agnosticui-svelte/src/stories/FlexGridExample.svelte new file mode 100644 index 000000000..3a7c20f6a --- /dev/null +++ b/agnosticui-svelte/src/stories/FlexGridExample.svelte @@ -0,0 +1,65 @@ + + + + +
+ + + +

xs=12 sm=4 lg=6 xl=4

+
+ +

xs=12 sm=4 lg=6 xl=8

+
+
+
+
+
+ + +

test

+
+
+
+
+ + + +

sm="2"

+
+ +

sm={2} smOffset={1}

+
+ +

sm={2} smOffset={1}

+
+ +

sm={2} smOffset={2}

+
+
+
+
+
+

Row attributes test. Maybe ignore this ;)

+ + + + +
diff --git a/agnosticui-vue/copystyles.js b/agnosticui-vue/copystyles.js index fad0a72ab..6c44b4815 100644 --- a/agnosticui-vue/copystyles.js +++ b/agnosticui-vue/copystyles.js @@ -60,7 +60,10 @@ const headerNavItemSynchronized = headerNavItemVue.replace(styleRegex, `