Skip to content

Commit 819ae7e

Browse files
authored
Merge pull request #68 from afemartin/feat/gap-styles
feat: add gap styles to flexbox module
2 parents 6745957 + ea9eb75 commit 819ae7e

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@utilitycss/utility",
3-
"version": "1.2.11",
3+
"version": "1.2.12",
44
"description": "Generator for Utility CSS frameworks",
55
"author": "Andrea Moretti (@axyz) <axyzxp@gmail.com>",
66
"repository": "utilitycss/utility",

src/modules/flexbox.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ export type FlexBoxModuleType = Module<ConfigVariables>;
1111
export interface ConfigVariables {
1212
flexBasisValues?: GenericObject | string[];
1313
orderValues?: GenericObject | string[];
14+
gapValues?: GenericObject | string[];
15+
rowGapValues?: GenericObject | string[];
16+
columnGapValues?: GenericObject | string[];
1417
}
1518

1619
const defaultNames = {
@@ -54,6 +57,9 @@ const defaultNames = {
5457
"ac:sb": "acsb",
5558
"ac:se": "acse",
5659
ord: "ord",
60+
gap: "gap",
61+
rgap: "rgap",
62+
cgap: "cgap",
5763
};
5864

5965
const getRules: GetRules<ConfigVariables> = (names, cfg) => ({
@@ -133,6 +139,9 @@ const getRules: GetRules<ConfigVariables> = (names, cfg) => ({
133139
value: "space-evenly",
134140
},
135141
ord: { name: names["ord"], key: "order", value: cfg.orderValues },
142+
gap: { name: names["gap"], key: "gap", value: cfg.gapValues },
143+
rgap: { name: names["rgap"], key: "row-gap", value: cfg.rowGapValues },
144+
cgap: { name: names["cgap"], key: "column-gap", value: cfg.columnGapValues },
136145
});
137146

138147
const meta: Meta = {

0 commit comments

Comments
 (0)