diff --git a/.vscode/settings.json b/.vscode/settings.json index d7f8662f2..f34b4f9b6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,6 +2,7 @@ "conventionalCommits.scopes": [ "icons", "deps", + "layout", "type" ] } \ No newline at end of file diff --git a/assets/scss/7-layout/_align-items.scss b/assets/scss/7-layout/_align-items.scss new file mode 100644 index 000000000..080606582 --- /dev/null +++ b/assets/scss/7-layout/_align-items.scss @@ -0,0 +1,13 @@ +// Align items (l-ai-) +// +// Alignment utilities for flex/grid elements. {{isHelper}} +// +// l-ai-center - **align-items: center** Center items vertically (if row). +// +// Markup: Parent: display: flex + .{{className}}
Child
+// +// +// Styleguide 7.0.4 +.l-ai-center { + align-items: center; +} diff --git a/assets/scss/7-layout/_all.scss b/assets/scss/7-layout/_all.scss index 8380a6259..d4f53032d 100644 --- a/assets/scss/7-layout/_all.scss +++ b/assets/scss/7-layout/_all.scss @@ -4,11 +4,14 @@ // // Styleguide 7.0.0 @import 'align'; +@import 'align-items'; @import 'container'; @import 'col-grid'; @import 'content-grid'; @import 'display'; +@import 'flex'; @import 'height'; +@import 'justify-content'; @import 'multicol'; @import 'position'; @import 'width'; \ No newline at end of file diff --git a/assets/scss/7-layout/_flex.scss b/assets/scss/7-layout/_flex.scss new file mode 100644 index 000000000..5fd7de858 --- /dev/null +++ b/assets/scss/7-layout/_flex.scss @@ -0,0 +1,24 @@ +// Flex (l-flex) +// +// Barebones flex helpers. This breaks some convention with other layout classes, but we use flexbox enough to justify it.

💡 See [align-items](/sections/layout/l-ai-position/) and [justify-content](/sections/layout/l-jc-position/) helpers for alignment helpers. {{isHelper}} +// +// .l-flex - **display:flex** Uses flexbox. +// .l-flex-row - **flex-direction: row** Horizontal flexbox. (default) +// .l-flex-column - **flex-direction: column** Vertical flexbox. +// +// Markup: 7-layout/flex.html +// +// +// Styleguide 7.0.4 + +.l-flex { + display: flex; +} + +.l-flex-row { + flex-direction: row; +} + +.l-flex-column { + flex-direction: column; +} diff --git a/assets/scss/7-layout/_justify-content.scss b/assets/scss/7-layout/_justify-content.scss new file mode 100644 index 000000000..6778df798 --- /dev/null +++ b/assets/scss/7-layout/_justify-content.scss @@ -0,0 +1,18 @@ +// Justify content (l-jc-) +// +// Alignment utilities for flex/grid elements. {{isHelper}} +// +// l-jc-center - **align-items: center** Center items horizontally (if row). +// l-jc-space - **justify-content: space-between** Evenly space items horizontally (if row). +// +// Markup: Parent: display: flex + .{{className}}
Child
Child
+// +// +// Styleguide 7.0.4 +.l-jc-center { + justify-content: center; +} + +.l-jc-space { + justify-content: space-between; +} diff --git a/assets/scss/7-layout/flex.html b/assets/scss/7-layout/flex.html new file mode 100644 index 000000000..c47c5db08 --- /dev/null +++ b/assets/scss/7-layout/flex.html @@ -0,0 +1,11 @@ +{% if className == 'l-flex' %} +
+
1
+
2
+
+{% else %} +
+
1
+
2
+
+{% endif %} \ No newline at end of file