diff --git a/CHANGELOG.md b/CHANGELOG.md index fd88715..f97d9eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,19 +3,47 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. -## [0.1.2](https://github.com/navin-moorthy/vscode-css-snippets/compare/v0.1.1...v0.1.2) (2020-07-19) +# [0.2.0](https://github.com/navin-moorthy/vscode-css-snippets/compare/v0.1.2...v0.2.0) (2020-07-20) + + +### ✨ Features + +* **snippets:** ✨ add 1linelayouts to the snippets list ([#19](https://github.com/navin-moorthy/vscode-css-snippets/issues/19)) ([1bacd02](https://github.com/navin-moorthy/vscode-css-snippets/commit/1bacd0218eb422fc5e03844b1955c278eeed148d)), closes [#18](https://github.com/navin-moorthy/vscode-css-snippets/issues/18) ### 📚 Documentation -* **readme:** ✏️ typo in readme change ([06d34d1](https://github.com/navin-moorthy/vscode-css-snippets/commit/06d34d151858bf40578356fcef397a4cc510ddc3)) +* **readme:** ✏️ add https gif and fix typo in description ([#21](https://github.com/navin-moorthy/vscode-css-snippets/issues/21)) ([bac3b45](https://github.com/navin-moorthy/vscode-css-snippets/commit/bac3b450466b5243e8bfe6cce7a75259d1388805)), closes [#20](https://github.com/navin-moorthy/vscode-css-snippets/issues/20) +* **readme:** ✏️ change highlight to template literals ([#23](https://github.com/navin-moorthy/vscode-css-snippets/issues/23)) ([f44f3d7](https://github.com/navin-moorthy/vscode-css-snippets/commit/f44f3d7c8d076ee1c26c47152eed787a7c8c3b35)), closes [#22](https://github.com/navin-moorthy/vscode-css-snippets/issues/22) +* **readme:** 📝 add attributions with links ([#25](https://github.com/navin-moorthy/vscode-css-snippets/issues/25)) ([ffe0c1e](https://github.com/navin-moorthy/vscode-css-snippets/commit/ffe0c1edd1b3d8a7c2202aae1fe584fff3ec96c6)), closes [#24](https://github.com/navin-moorthy/vscode-css-snippets/issues/24) ### ♻️ Chores -* **changelog:** ✏️ fix changelog generated ([6781919](https://github.com/navin-moorthy/vscode-css-snippets/commit/6781919b97827c6ce7c3c5d0ea66735c5a8bfa6f)) -* **logo:** 🔧 move logo out of media to support vsce publish ([0567f1b](https://github.com/navin-moorthy/vscode-css-snippets/commit/0567f1b600ef78c7e05b56fa616940462641eb61)) -* **typo:** ✏️ issue url typo ([e70a650](https://github.com/navin-moorthy/vscode-css-snippets/commit/e70a650a8b9c4188369eb020dfe4f0111df5d867)) +* **changelog:** ✏️ remove double generated changelog ([a9d3f87](https://github.com/navin-moorthy/vscode-css-snippets/commit/a9d3f87e7b2c53d571df0613245bd578218436d5)) + + + + + +# [0.2.0](https://github.com/navin-moorthy/vscode-css-snippets/compare/v0.1.2...v0.2.0) (2020-07-20) + + +### ✨ Features + +* **snippets:** ✨ add 1linelayouts to the snippets list ([#19](https://github.com/navin-moorthy/vscode-css-snippets/issues/19)) ([1bacd02](https://github.com/navin-moorthy/vscode-css-snippets/commit/1bacd0218eb422fc5e03844b1955c278eeed148d)), closes [#18](https://github.com/navin-moorthy/vscode-css-snippets/issues/18) + + +### 📚 Documentation + +* **readme:** ✏️ add https gif and fix typo in description ([#21](https://github.com/navin-moorthy/vscode-css-snippets/issues/21)) ([bac3b45](https://github.com/navin-moorthy/vscode-css-snippets/commit/bac3b450466b5243e8bfe6cce7a75259d1388805)), closes [#20](https://github.com/navin-moorthy/vscode-css-snippets/issues/20) +* **readme:** ✏️ change highlight to template literals ([#23](https://github.com/navin-moorthy/vscode-css-snippets/issues/23)) ([f44f3d7](https://github.com/navin-moorthy/vscode-css-snippets/commit/f44f3d7c8d076ee1c26c47152eed787a7c8c3b35)), closes [#22](https://github.com/navin-moorthy/vscode-css-snippets/issues/22) +* **readme:** 📝 add attributions with links ([#25](https://github.com/navin-moorthy/vscode-css-snippets/issues/25)) ([ffe0c1e](https://github.com/navin-moorthy/vscode-css-snippets/commit/ffe0c1edd1b3d8a7c2202aae1fe584fff3ec96c6)), closes [#24](https://github.com/navin-moorthy/vscode-css-snippets/issues/24) + + +### ♻️ Chores + +* **changelog:** ✏️ remove double generated changelog ([a9d3f87](https://github.com/navin-moorthy/vscode-css-snippets/commit/a9d3f87e7b2c53d571df0613245bd578218436d5)) @@ -39,6 +67,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline + ## 0.1.1 (2020-07-19) diff --git a/README.md b/README.md index 79d8ad2..7e1b005 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,9 @@ ## Description -Collection of CSS Snippets to make your life easier by auto-completing css rules -based on popular CSS Library - [Tailwind](https://tailwindcss.com/) and +Collection of CSS Snippets to make your life easier by auto-completing +[common](#common) css rules, Tailwind utility classes as css rules - +[Tailwind](#tailwind-layout) and [1 line layouts](https://1linelayouts.glitch.me/) It's not debatable, most of us got used to utility classes from @@ -56,12 +57,14 @@ You can enable tab completion (recommended) by opening - [Top / Right / Bottom / Left](#top--right--bottom--left) - [Visibility](#visibility) - [Z-Index](#z-index) + - [1 line layouts](#1-line-layouts) + - [Extra Guides](#extra-guides) + - [Snippets generation from Selected line/lines](#snippets-generation-from-selected-linelines) - [Contributing](#contributing) + - [Attributions](#attributions) ## Snippets -**[See how to utilize snippets marked with `selected` →](https://raw.githubusercontent.com/navin-moorthy/vscode-css-snippets/master/media/selected-guide.gif)** - ### Common #### CSS Reset @@ -72,35 +75,35 @@ You can enable tab completion (recommended) by opening #### Pseudo Styles -| Snippet | Purpose | -| ----------- | --------------- | -| `hover` | :hover | -| `focus` | :focus | -| `active` | :active | -| `disabled` | :disabled | -| `visited` | :visited | -| `first` | :first-child | -| `last` | :last-child | -| `even` | :nth-child(2n) | -| `odd` | :nth-child(odd) | -| `nth-child` | :nth-child() | +| Snippet | Purpose | +| ----------- | ------------------ | +| `hover` | :hover | +| `focus` | :focus | +| `active` | :active | +| `disabled` | :disabled | +| `visited` | :visited | +| `first` | :first-child | +| `last` | :last-child | +| `even` | :nth-child(2n) | +| `odd` | :nth-child(odd) | +| `nth-child` | :nth-child(`rule`) | #### [Breakpoints](https://tailwindcss.com/docs/breakpoints) -| Snippet | Purpose | -| ------------------ | ----------------------------------------------------------------------------------------- | -| `resp` | Get all tailwind breakpoints - 640px - 768px - 1024px - 1280px | -| `resp-sm` | Get tailwind breakpoint - sm - 640px | -| `resp-md` | Get tailwind breakpoint - md - 768px | -| `resp-lg` | Get tailwind breakpoint - lg - 1024px | -| `resp-xl` | Get tailwind breakpoint - xl - 1280px | -| `resp-selected` | Get all tailwind breakpoints for selected class/classes - 640px - 768px - 1024px - 1280px | -| `resp-sm-selected` | Get tailwind breakpoint for selected class/classes - sm - 640px | -| `resp-md-selected` | Get tailwind breakpoint for selected class/classes - md - 768px | -| `resp-lg-selected` | Get tailwind breakpoint for selected class/classes - lg - 1024px | -| `resp-xl-selected` | Get tailwind breakpoint for selected class/classes - xl - 1280px | - -### Tailwind Layout +| Snippet | Purpose | +| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| `resp` | Get all tailwind breakpoints - 640px - 768px - 1024px - 1280px | +| `resp-sm` | Get tailwind breakpoint - sm - 640px | +| `resp-md` | Get tailwind breakpoint - md - 768px | +| `resp-lg` | Get tailwind breakpoint - lg - 1024px | +| `resp-xl` | Get tailwind breakpoint - xl - 1280px | +| `resp-selected` | Get all tailwind breakpoints for selected class/classes - 640px - 768px - 1024px - 1280px [See how →](#snippets-generation-from-selected-linelines) | +| `resp-sm-selected` | Get tailwind breakpoint for selected class/classes - sm - 640px [See how →](#snippets-generation-from-selected-linelines) | +| `resp-md-selected` | Get tailwind breakpoint for selected class/classes - md - 768px [See how →](#snippets-generation-from-selected-linelines) | +| `resp-lg-selected` | Get tailwind breakpoint for selected class/classes - lg - 1024px [See how →](#snippets-generation-from-selected-linelines) | +| `resp-xl-selected` | Get tailwind breakpoint for selected class/classes - xl - 1280px [See how →](#snippets-generation-from-selected-linelines) | + +### [Tailwind](https://tailwindcss.com/) Layout #### [Container](https://tailwindcss.com/docs/container) @@ -256,6 +259,31 @@ You can enable tab completion (recommended) by opening | `z-50` | z-index: 50; | | `z-auto` | z-index: auto; | +### [1 line layouts](https://1linelayouts.glitch.me/) + +**[Learn 1linelayouts in detail from Web Dev →](https://web.dev/one-line-layouts/)** + +![1 line layout usage](https://github.com/navin-moorthy/vscode-css-snippets/raw/master/media/1linelayouts.gif) + +| Snippet | Purpose | +| --------------------------- | ------------------------------------------------------------- | +| `super-centered` | place-items: center; | +| `deconstructed-pancake` | flex: 0 1 `baseWidth`}; | +| `sidebar-says` | grid-template-columns: minmax(`min`, `max`) `...`}; | +| `pancake-stack` | grid-template-rows: auto 1fr auto; | +| `classic-holy-grail-layout` | grid-template: auto 1fr auto / auto 1fr auto; | +| `12-span-grid` | grid-template-columns: repeat(12, 1fr); | +| `ram` | grid-template-columns: repeat(auto-fit, minmax(`base`, 1fr)); | +| `line-up` | justify-content: space-between; | +| `clamping-my-style` | clamp(`min`, `actual`, `max`); | +| `respect-for-aspect` | aspect-ratio: `width` / `height`}; | + +## Extra Guides + +### Snippets generation from Selected line/lines + +![Guide on how to utilize selected lines in snippets](https://raw.githubusercontent.com/navin-moorthy/vscode-css-snippets/master/media/selected-guide.gif) + ## Contributing This is an Open Source Project with MIT License. @@ -266,3 +294,33 @@ Snippets which you think will help others increase their productivity. See [Contributing Docs →](https://github.com/navin-moorthy/vscode-css-snippets/blob/master/CONTRIBUTING.md) for detailed guidance. + +## Attributions + +**Snippet Ideation:** + +- [Tailwind](https://tailwindcss.com/) by + [Adam Wathan](https://twitter.com/adamwathan) and + [Steve Schoger](https://twitter.com/steveschoger) +- [1linelayouts](https://1linelayouts.glitch.me/) by + [Una Kravets 👩🏻‍💻](https://twitter.com/Una) + +**Snippet Generation:** + +- [Snippet Generator](https://snippet-generator.app/) by + [Paweł Grzybek](https://twitter.com/pawelgrzybek) + +**Docs Inspiration:** + +- [Vue VSCode Snippets](https://github.com/sdras/vue-vscode-snippets/blob/master/README.md) + by [Sarah Drasner](https://twitter.com/sarah_edo) +- [Tailwind Intellisense](https://github.com/tailwindcss/intellisense) by + [Brad Cornes](https://twitter.com/bradlc) + +**Contributing Inspiration:** + +- [Chakra UI](https://github.com/chakra-ui/chakra-ui/blob/master/CONTRIBUTING.md) + by [Segun Adebayo](https://twitter.com/thesegunadebayo) + +**Huge thanks :pray:** to _above wonderful persons_ for creating awesome +projects which helped me build this project. diff --git a/lerna.json b/lerna.json index 56e21e7..3f64a1f 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "packages": ["."], - "version": "0.1.2", + "version": "0.2.0", "changelogPreset": "metahub", "npmClient": "yarn", "registry": "https://registry.npmjs.org/", diff --git a/media/1linelayouts.gif b/media/1linelayouts.gif new file mode 100644 index 0000000..5061d1d Binary files /dev/null and b/media/1linelayouts.gif differ diff --git a/package.json b/package.json index 6f8ab1c..2b2a9ac 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vscode-css-snippets", "displayName": "VSCode CSS Snippets", - "version": "0.1.2", + "version": "0.2.0", "description": "CSS Snippets for fast prototyping", "categories": [ "Snippets" @@ -43,6 +43,10 @@ "language": "css", "path": "./snippets/tailwind/layout.json" }, + { + "language": "css", + "path": "./snippets/1linelayouts/snippets.json" + }, { "language": "css", "path": "./snippets/contributions/snippet.json" diff --git a/snippets/1linelayouts/snippets.json b/snippets/1linelayouts/snippets.json new file mode 100644 index 0000000..981782b --- /dev/null +++ b/snippets/1linelayouts/snippets.json @@ -0,0 +1,58 @@ +{ + "Super Centered": { + "prefix": "super-centered", + "body": ["place-items: center;", ""], + "description": "Super Centered" + }, + "The Deconstructed Pancake": { + "prefix": "deconstructed-pancake", + "body": ["flex: 0 1 ${1:baseWidth};", "${0}"], + "description": "The Deconstructed Pancake" + }, + "Sidebar Says": { + "prefix": "sidebar-says", + "body": [ + "grid-template-columns: minmax(${1:min}, ${2:max}) ${3:...};", + "${0}" + ], + "description": "Sidebar Says" + }, + "Pancake Stack": { + "prefix": "pancake-stack", + "body": ["grid-template-rows: auto 1fr auto;", ""], + "description": "Pancake Stack" + }, + "Classic Holy Grail Layout": { + "prefix": "classic-holy-grail-layout", + "body": ["grid-template: auto 1fr auto / auto 1fr auto;", ""], + "description": "Classic Holy Grail Layout" + }, + "12-Span Grid": { + "prefix": "12-span-grid", + "body": ["grid-template-columns: repeat(12, 1fr);", ""], + "description": "12-Span Grid" + }, + "RAM (Repeat, Auto, Minmax)": { + "prefix": "ram", + "body": [ + "grid-template-columns: repeat(auto-fit, minmax(${1:base}, 1fr));", + "${0}" + ], + "description": "RAM (Repeat, Auto, Minmax)" + }, + "Line Up": { + "prefix": "line-up", + "body": ["justify-content: space-between;", ""], + "description": "Line Up" + }, + "Clamping My Style": { + "prefix": "clamping-my-style", + "body": ["clamp(${1:min}, ${2:actual}, ${3:max});", "${0}"], + "description": "Clamping My Style" + }, + "Respect for Aspect": { + "prefix": "respect-for-aspect", + "body": ["aspect-ratio: ${1:width} / ${2:height};", "${0}"], + "description": "Respect for Aspect" + } +}