diff --git a/README.md b/README.md index 3f17bef..bef2197 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,17 @@ You can enable tab completion (recommended) by opening - [Top / Right / Bottom / Left](#top--right--bottom--left) - [Visibility](#visibility) - [Z-Index](#z-index) + - [Tailwind FlexBox](#tailwind-flexbox) + - [Flex Direction](#flex-direction) + - [Flex Wrap](#flex-wrap) + - [Align Items](#align-items) + - [Align Content](#align-content) + - [Align Self](#align-self) + - [Justify Content](#justify-content) + - [Flex](#flex) + - [Flex Grow](#flex-grow) + - [Flex Shrink](#flex-shrink) + - [Flex Order](#flex-order) - [1 line layouts](#1-line-layouts) - [Extra Guides](#extra-guides) - [Snippets generation from Selected line/lines](#snippets-generation-from-selected-linelines) @@ -258,6 +269,108 @@ You can enable tab completion (recommended) by opening | `z-50` | z-index: 50; | | `z-auto` | z-index: auto; | +### [Tailwind](https://tailwindcss.com/) FlexBox + +#### [Flex Direction](https://tailwindcss.com/docs/flex-direction) + +| Snippet | Purpose | +| ------------------ | ------------------------------- | +| `flex-row` | flex-direction: row; | +| `flex-row-reverse` | flex-direction: row-reverse; | +| `flex-col` | flex-direction: column; | +| `flex-col-reverse` | flex-direction: column-reverse; | + +#### [Flex Wrap](https://tailwindcss.com/docs/flex-wrap) + +| Snippet | Purpose | +| ------------------- | ------------------------ | +| `flex-no-wrap` | flex-wrap: nowrap; | +| `flex-wrap` | flex-wrap: wrap; | +| `flex-wrap-reverse` | flex-wrap: wrap-reverse; | + +#### [Align Items](https://tailwindcss.com/docs/align-items) + +| Snippet | Purpose | +| ---------------- | ------------------------ | +| `items-stretch` | align-items: stretch; | +| `items-start` | align-items: flex-start; | +| `items-center` | align-items: center; | +| `items-end` | align-items: flex-end; | +| `items-baseline` | align-items: baseline; | + +#### [Align Content](https://tailwindcss.com/docs/align-content) + +| Snippet | Purpose | +| ----------------- | ----------------------------- | +| `content-start` | align-content: flex-start; | +| `content-center` | align-content: center; | +| `content-end` | align-content: flex-end; | +| `content-between` | align-content: space-between; | +| `content-around` | align-content: space-around; | + +#### [Align Self](https://tailwindcss.com/docs/align-self) + +| Snippet | Purpose | +| -------------- | ----------------------- | +| `self-auto` | align-self: auto; | +| `self-start` | align-self: flex-start; | +| `self-center` | align-self: center; | +| `self-end` | align-self: flex-end; | +| `self-stretch` | align-self: stretch; | + +#### [Justify Content](https://tailwindcss.com/docs/justify-content) + +| Snippet | Purpose | +| ----------------- | ------------------------------- | +| `justify-start` | justify-content: flex-start; | +| `justify-center` | justify-content: center; | +| `justify-end` | justify-content: flex-end; | +| `justify-between` | justify-content: space-between; | +| `justify-around` | justify-content: space-around; | + +#### [Flex](https://tailwindcss.com/docs/flex) + +| Snippet | Purpose | +| -------------- | --------------- | +| `flex-initial` | flex: 0 1 auto; | +| `flex-1` | flex: 1 1 0%; | +| `flex-auto` | flex: 1 1 auto; | +| `flex-none` | flex: none; | + +#### [Flex Grow](https://tailwindcss.com/docs/flex-grow) + +| Snippet | Purpose | +| ------------- | ------------- | +| `flex-grow` | flex-grow: 1; | +| `flex-grow-0` | flex-grow: 0; | + +#### [Flex Shrink](https://tailwindcss.com/docs/flex-shrink) + +| Snippet | Purpose | +| --------------- | --------------- | +| `flex-shrink` | flex-shrink: 1; | +| `flex-shrink-0` | flex-shrink: 0; | + +#### [Flex Order](https://tailwindcss.com/docs/order) + +| Snippet | Purpose | +| ------------- | ------------- | +| `order-first` | order: -9999; | +| `order-last` | order: 9999; | +| `order-none` | order: 0; | +| `order-1` | order: 1; | +| `order-2` | order: 2; | +| `order-3` | order: 3; | +| `order-4` | order: 4; | +| `order-5` | order: 5; | +| `order-6` | order: 6; | +| `order-7` | order: 7; | +| `order-8` | order: 8; | +| `order-9` | order: 9; | +| `order-10` | order: 10; | +| `order-11` | order: 11; | +| `order-12` | order: 12; | + ### [1 line layouts](https://1linelayouts.glitch.me/) **[Learn 1linelayouts in detail from Web Dev →](https://web.dev/one-line-layouts/)** diff --git a/lerna.json b/lerna.json index 6a9bcde..fcf623a 100644 --- a/lerna.json +++ b/lerna.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/", "command": { "version": { - "message": "chore(release): publish %s", + "message": "chore(release): 🚀 publish %s", "conventionalCommits": true } } diff --git a/package.json b/package.json index 6c33387..fc52c15 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,10 @@ "language": "css", "path": "./snippets/tailwind/layout.json" }, + { + "language": "css", + "path": "./snippets/tailwind/flexbox.json" + }, { "language": "css", "path": "./snippets/1linelayouts/snippets.json" diff --git a/snippets/tailwind/flexbox.json b/snippets/tailwind/flexbox.json new file mode 100644 index 0000000..747e7f0 --- /dev/null +++ b/snippets/tailwind/flexbox.json @@ -0,0 +1,252 @@ +{ + "order-12": { + "prefix": "order-12", + "body": ["order: 12;", ""], + "description": "order-12" + }, + "order-11": { + "prefix": "order-11", + "body": ["order: 11;", ""], + "description": "order-11" + }, + "order-10": { + "prefix": "order-10", + "body": ["order: 10;", ""], + "description": "order-10" + }, + "order-9": { + "prefix": "order-9", + "body": ["order: 9;", ""], + "description": "order-9" + }, + "order-8": { + "prefix": "order-8", + "body": ["order: 8;", ""], + "description": "order-8" + }, + "order-7": { + "prefix": "order-7", + "body": ["order: 7;", ""], + "description": "order-7" + }, + "order-6": { + "prefix": "order-6", + "body": ["order: 6;", ""], + "description": "order-6" + }, + "order-5": { + "prefix": "order-5", + "body": ["order: 5;", ""], + "description": "order-5" + }, + "order-4": { + "prefix": "order-4", + "body": ["order: 4;", ""], + "description": "order-4" + }, + "order-3": { + "prefix": "order-3", + "body": ["order: 3;", ""], + "description": "order-3" + }, + "order-2": { + "prefix": "order-2", + "body": ["order: 2;", ""], + "description": "order-2" + }, + "order-1": { + "prefix": "order-1", + "body": ["order: 1;", ""], + "description": "order-1" + }, + "order-last": { + "prefix": "order-last", + "body": ["order: 9999;", ""], + "description": "order-last" + }, + "order-first": { + "prefix": "order-first", + "body": ["order: -9999;", ""], + "description": "order-first" + }, + "order-none": { + "prefix": "order-none", + "body": ["order: 0;", ""], + "description": "order-none" + }, + "flex-shrink-0": { + "prefix": "flex-shrink-0", + "body": ["flex-shrink: 0;", ""], + "description": "flex-shrink-0" + }, + "flex-shrink": { + "prefix": "flex-shrink", + "body": ["flex-shrink: 1;", ""], + "description": "flex-shrink" + }, + "flex-grow-0": { + "prefix": "flex-grow-0", + "body": ["flex-grow: 0;", ""], + "description": "flex-grow-0" + }, + "flex-grow": { + "prefix": "flex-grow", + "body": ["flex-grow: 1;", ""], + "description": "flex-grow" + }, + "flex-none": { + "prefix": "flex-none", + "body": ["flex: none;", ""], + "description": "flex-none" + }, + "flex-1": { + "prefix": "flex-1", + "body": ["flex: 1 1 0%;", ""], + "description": "flex-1" + }, + "flex-initial": { + "prefix": "flex-initial", + "body": ["flex: 0 1 auto;", ""], + "description": "flex-initial" + }, + "flex-auto": { + "prefix": "flex-auto", + "body": ["flex: 1 1 auto;", ""], + "description": "flex-auto" + }, + "justify-around": { + "prefix": "justify-around", + "body": ["justify-content: space-around;", ""], + "description": "justify-around" + }, + "justify-between": { + "prefix": "justify-between", + "body": ["justify-content: space-between;", ""], + "description": "justify-between" + }, + "justify-end": { + "prefix": "justify-end", + "body": ["justify-content: flex-end;", ""], + "description": "justify-end" + }, + "justify-start": { + "prefix": "justify-start", + "body": ["justify-content: flex-start;", ""], + "description": "justify-start" + }, + "justify-center": { + "prefix": "justify-center", + "body": ["justify-content: center;", ""], + "description": "justify-center" + }, + "content-around": { + "prefix": "content-around", + "body": ["align-content: space-around;", ""], + "description": "content-around" + }, + "content-between": { + "prefix": "content-between", + "body": ["align-content: space-between;", ""], + "description": "content-between" + }, + "content-end": { + "prefix": "content-end", + "body": ["align-content: flex-end;", ""], + "description": "content-end" + }, + "content-start": { + "prefix": "content-start", + "body": ["align-content: flex-start;", ""], + "description": "content-start" + }, + "content-center": { + "prefix": "content-center", + "body": ["align-content: center;", ""], + "description": "content-center" + }, + "self-end": { + "prefix": "self-end", + "body": ["align-self: flex-end;", ""], + "description": "self-end" + }, + "self-start": { + "prefix": "self-start", + "body": ["align-self: flex-start;", ""], + "description": "self-start" + }, + "self-center": { + "prefix": "self-center", + "body": ["align-self: center;", ""], + "description": "self-center" + }, + "self-auto": { + "prefix": "self-auto", + "body": ["align-self: auto;", ""], + "description": "self-auto" + }, + "self-stretch": { + "prefix": "self-stretch", + "body": ["align-self: stretch;", ""], + "description": "self-stretch" + }, + "items-end": { + "prefix": "items-end", + "body": ["align-items: flex-end;", ""], + "description": "items-end" + }, + "items-start": { + "prefix": "items-start", + "body": ["align-items: flex-start;", ""], + "description": "items-start" + }, + "items-center": { + "prefix": "items-center", + "body": ["align-items: center;", ""], + "description": "items-center" + }, + "items-baseline": { + "prefix": "items-baseline", + "body": ["align-items: baseline;", ""], + "description": "items-baseline" + }, + "items-stretch": { + "prefix": "items-stretch", + "body": ["align-items: stretch;", ""], + "description": "items-stretch" + }, + "flex-wrap-reverse": { + "prefix": "flex-wrap-reverse", + "body": ["flex-wrap: wrap-reverse;", ""], + "description": "flex-wrap-reverse" + }, + "flex-no-wrap": { + "prefix": "flex-no-wrap", + "body": ["flex-wrap: nowrap;", ""], + "description": "flex-no-wrap" + }, + "flex-wrap": { + "prefix": "flex-wrap", + "body": ["flex-wrap: wrap;", ""], + "description": "flex-wrap" + }, + "flex-col-reverse": { + "prefix": "flex-col-reverse", + "body": ["flex-direction: column-reverse;", ""], + "description": "flex-col-reverse" + }, + "flex-row-reverse": { + "prefix": "flex-row-reverse", + "body": ["flex-direction: row-reverse;", ""], + "description": "flex-row-reverse" + }, + "flex-col": { + "prefix": "flex-col", + "body": ["flex-direction: column;", ""], + "description": "flex-col" + }, + "flex-row": { + "prefix": "flex-row", + "body": ["flex-direction: row;", ""], + "description": "flex-row" + } +}