Skip to content
This repository has been archived by the owner on May 16, 2022. It is now read-only.

Commit

Permalink
feat(馃拝): support w-auto and h-auto (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyyoung committed Jan 5, 2021
1 parent 907078b commit d33c98d
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@

| Name | Style(s) |
| ------ | ----------------------- |
| h-auto | `{ height: "auto" }` |
| h-0 | `{ height: 0 }` |
| h-1 | `{ height: rem(0.25) }` |
| h-10 | `{ height: rem(2.5) }` |
Expand Down Expand Up @@ -258,6 +259,7 @@

| Name | Style(s) |
| ------- | ------------------------- |
| w-auto | `{ width: "auto" }` |
| w-0 | `{ width: 0 }` |
| w-1 | `{ width: rem(0.25) }` |
| w-1/12 | `{ width: "8.333333%" }` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1911,6 +1911,9 @@ Object {
"h-8": Object {
"height": 64,
},
"h-auto": Object {
"height": "auto",
},
"h-full": Object {
"height": "100%",
},
Expand Down Expand Up @@ -4832,6 +4835,9 @@ Object {
"w-9/12": Object {
"width": "75%",
},
"w-auto": Object {
"width": "auto",
},
"w-full": Object {
"width": "100%",
},
Expand Down
6 changes: 6 additions & 0 deletions src/lib/style/__tests__/__snapshots__/style.test.ts.snap.ios
Original file line number Diff line number Diff line change
Expand Up @@ -1911,6 +1911,9 @@ Object {
"h-8": Object {
"height": 64,
},
"h-auto": Object {
"height": "auto",
},
"h-full": Object {
"height": "100%",
},
Expand Down Expand Up @@ -4832,6 +4835,9 @@ Object {
"w-9/12": Object {
"width": "75%",
},
"w-auto": Object {
"width": "auto",
},
"w-full": Object {
"width": "100%",
},
Expand Down
6 changes: 6 additions & 0 deletions src/lib/style/__tests__/__snapshots__/style.test.ts.snap.node
Original file line number Diff line number Diff line change
Expand Up @@ -1911,6 +1911,9 @@ Object {
"h-8": Object {
"height": "2rem",
},
"h-auto": Object {
"height": "auto",
},
"h-full": Object {
"height": "100%",
},
Expand Down Expand Up @@ -4832,6 +4835,9 @@ Object {
"w-9/12": Object {
"width": "75%",
},
"w-auto": Object {
"width": "auto",
},
"w-full": Object {
"width": "100%",
},
Expand Down
6 changes: 6 additions & 0 deletions src/lib/style/__tests__/__snapshots__/style.test.ts.snap.web
Original file line number Diff line number Diff line change
Expand Up @@ -1911,6 +1911,9 @@ Object {
"h-8": Object {
"height": "2rem",
},
"h-auto": Object {
"height": "auto",
},
"h-full": Object {
"height": "100%",
},
Expand Down Expand Up @@ -4832,6 +4835,9 @@ Object {
"w-9/12": Object {
"width": "75%",
},
"w-auto": Object {
"width": "auto",
},
"w-full": Object {
"width": "100%",
},
Expand Down
2 changes: 2 additions & 0 deletions src/lib/theme/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ export const baseTheme = {
height: {
...spacing,
full: '100%',
auto: 'auto',
},
letterSpacing: {
tighter: rem(-0.05),
Expand Down Expand Up @@ -267,6 +268,7 @@ export const baseTheme = {
textColor: colors,
width: {
...spacing,
'auto': 'auto',
'1/2': '50%',
'1/3': '33.333333%',
'2/3': '66.666667%',
Expand Down

0 comments on commit d33c98d

Please sign in to comment.