Skip to content

Commit

Permalink
feat: Add mwfc. (#114)
Browse files Browse the repository at this point in the history
* feat: Add mwfc.

* Codegen.

* Fix abbreviation.
  • Loading branch information
stephenh committed Aug 16, 2023
1 parent 9c1389e commit 49c90de
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
24 changes: 24 additions & 0 deletions packages/template-tachyons/src/Css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2339,6 +2339,18 @@ class CssBuilder<T extends Properties> {
get mw100() {
return this.add("minWidth", "100%");
}
/** Sets `minWidth: "fit-content"`. */
get mwfc() {
return this.add("minWidth", "fit-content");
}
/** Sets `minWidth: "min-content"`. */
get mwminc() {
return this.add("minWidth", "min-content");
}
/** Sets `minWidth: "max-content"`. */
get mwmaxc() {
return this.add("minWidth", "max-content");
}
/** Sets `minWidth: value`. */
mw(value: Properties["minWidth"]) {
return this.add("minWidth", value);
Expand Down Expand Up @@ -2367,6 +2379,18 @@ class CssBuilder<T extends Properties> {
get maxw100() {
return this.add("maxWidth", "100%");
}
/** Sets `maxWidth: "fit-content"`. */
get maxwfc() {
return this.add("maxWidth", "fit-content");
}
/** Sets `maxWidth: "min-content"`. */
get maxwminc() {
return this.add("maxWidth", "min-content");
}
/** Sets `maxWidth: "max-content"`. */
get maxwmaxc() {
return this.add("maxWidth", "max-content");
}
/** Sets `maxWidth: value`. */
maxw(value: Properties["maxWidth"]) {
return this.add("maxWidth", value);
Expand Down
24 changes: 24 additions & 0 deletions packages/testing-tachyons/src/Css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2045,6 +2045,18 @@ class CssBuilder<T extends Properties> {
get mw100() {
return this.add("minWidth", "100%");
}
/** Sets `minWidth: "fit-content"`. */
get mwfc() {
return this.add("minWidth", "fit-content");
}
/** Sets `minWidth: "min-content"`. */
get mwminc() {
return this.add("minWidth", "min-content");
}
/** Sets `minWidth: "max-content"`. */
get mwmaxc() {
return this.add("minWidth", "max-content");
}
/** Sets `minWidth: value`. */
mw(value: Properties["minWidth"]) {
return this.add("minWidth", value);
Expand Down Expand Up @@ -2073,6 +2085,18 @@ class CssBuilder<T extends Properties> {
get maxw100() {
return this.add("maxWidth", "100%");
}
/** Sets `maxWidth: "fit-content"`. */
get maxwfc() {
return this.add("maxWidth", "fit-content");
}
/** Sets `maxWidth: "min-content"`. */
get maxwminc() {
return this.add("maxWidth", "min-content");
}
/** Sets `maxWidth: "max-content"`. */
get maxwmaxc() {
return this.add("maxWidth", "max-content");
}
/** Sets `maxWidth: value`. */
maxw(value: Properties["maxWidth"]) {
return this.add("maxWidth", value);
Expand Down
6 changes: 6 additions & 0 deletions packages/truss/src/sections/tachyons/widths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export const width: CreateMethodsFn = (config) => [
mw50: "50%",
mw75: "75%",
mw100: "100%",
mwfc: "fit-content",
mwminc: "min-content",
mwmaxc: "max-content",
},
"mw",
true,
Expand All @@ -38,6 +41,9 @@ export const width: CreateMethodsFn = (config) => [
maxw50: "50%",
maxw75: "75%",
maxw100: "100%",
maxwfc: "fit-content",
maxwminc: "min-content",
maxwmaxc: "max-content",
},
"maxw",
true,
Expand Down

0 comments on commit 49c90de

Please sign in to comment.