Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: integrate tailwind-config-viewer #232

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/content/en/examples/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Basic Usage Example
menuTitle: Basic Usage
description: 'Live example of basic usage of Nuxt TailwindCSS on CodeSandbox.'
position: 5
position: 6
category: Examples
csb_link: https://codesandbox.io/embed/nuxt-tailwindcss-o4vn5pvp7q
fullscreen: true
Expand Down
2 changes: 1 addition & 1 deletion docs/content/en/examples/dark-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Dark Mode Example
menuTitle: Dark Mode
description: 'Live example of dark mode with Nuxt TailwindCSS on CodeSandbox.'
position: 6
position: 7
category: Examples
csb_link: https://codesandbox.io/embed/nuxt-dark-tailwindcss-17g2j
fullscreen: true
Expand Down
2 changes: 1 addition & 1 deletion docs/content/en/examples/tailwindui.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Tailwind UI Example
menuTitle: Tailwind UI
description: 'Live example of Tailwind UI plugin with Nuxt on CodeSandbox.'
position: 7
position: 8
category: Examples
csb_link: https://codesandbox.io/embed/nuxt-tailwindui-xy1jk
fullscreen: true
Expand Down
22 changes: 15 additions & 7 deletions docs/content/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,20 @@ categoryPosition: 1

Add [Tailwind CSS](https://tailwindcss.com) to your [Nuxt](https://nuxtjs.org) application in seconds.

<alert type="info">

This module default to Tailwind v1, please look at [these instructions](/setup#tailwind-2) to upgrade to Tailwind v2.

</alert>

## Features

- 👌&nbsp; Zero configuration to start
- ⚡️&nbsp; PurgeCSS included for minimal CSS ⚡️
- 🪄&nbsp; Use latest CSS features *([Stage 1](https://cssdb.org/#stage-1))*
- 🎨&nbsp; Discover your Tailwind Colors *([see video](/#tailwind-colors))*
- ⚙️&nbsp; Reference your Tailwind config in your app
- 🎨&nbsp; Discover your Tailwind configuration *([see video](/#tailwind-colors))*
- 📦&nbsp; Extendable by [Nuxt modules](https://modules.nuxtjs.org/)
- ⚙️&nbsp; Reference your Tailwind config in your app

<p class="flex items-center">Enjoy a documentation with light and dark mode:&nbsp;<app-color-switcher class="flex"></app-color-switcher></p>

Expand All @@ -32,10 +38,12 @@ Add [Tailwind CSS](https://tailwindcss.com) to your [Nuxt](https://nuxtjs.org) a
<source src="https://res.cloudinary.com/nuxt/video/upload/q_auto/v1596625297/nuxt-tailwindcss_ipv0ta.ogv" type="video/ogg" />
</video>

### Tailwind Colors
### Tailwind Viewer

<video poster="https://res.cloudinary.com/nuxt/video/upload/v1606994332/nuxt-tailwind-colors_qlio2t.jpg" loop playsinline controls>
<source src="https://res.cloudinary.com/nuxt/video/upload/q_auto/v1606994332/nuxt-tailwind-colors_qlio2t.webm" type="video/webm" />
<source src="https://res.cloudinary.com/nuxt/video/upload/q_auto/v1606994332/nuxt-tailwind-colors_qlio2t.mp4" type="video/mp4" />
<source src="https://res.cloudinary.com/nuxt/video/upload/q_auto/v1606994332/nuxt-tailwind-colors_qlio2t.ogv" type="video/ogg" />
<video poster="https://res.cloudinary.com/nuxt/video/upload/v1608225750/nuxt-tailwind-viewer_ktowjm.jpg" loop playsinline controls>
<source src="https://res.cloudinary.com/nuxt/video/upload/q_auto/v1608225750/nuxt-tailwind-viewer_ktowjm.webm" type="video/webm" />
<source src="https://res.cloudinary.com/nuxt/video/upload/q_auto/v1608225750/nuxt-tailwind-viewer_ktowjm.mp4" type="video/mp4" />
<source src="https://res.cloudinary.com/nuxt/video/upload/q_auto/v1608225750/nuxt-tailwind-viewer_ktowjm.ogv" type="video/ogg" />
</video>

Learn more about the [Tailwind viewer](/tailwind-viewer).
25 changes: 24 additions & 1 deletion docs/content/en/options.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Options
description: 'You can configure the module easily with the tailwindcss property.'
position: 4
position: 5
category: Guide
categoryPosition: 2
---
Expand Down Expand Up @@ -101,3 +101,26 @@ export default {
```

Learn more about overwriting Tailwind config [here](/tailwind-config).

## `viewer`

- Default: `true` in development
- Version: <badge>v3.4+</badge>

<alert type="info">

The [Tailwind viewer](/tailwind-viewer) is only available in development with `nuxt dev`.

</alert>

The module internally use [tailwind-config-viewer](https://github.com/rogden/tailwind-config-viewer) to setup the `/_tailwind/` route.

To disable the viewer in development, set it to `false`:

```js{}[nuxt.config.js]
export default {
tailwindcss: {
viewer: false
}
}
```
1 change: 0 additions & 1 deletion docs/content/en/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ We have seen an issue with NPM regarding the packages resolution (see [comment](

</alert>


### Tailwind 1

When a new version of Tailwind CSS is released, you don't need to wait for this module to upgrade, you can directly upgrade your dependencies.
Expand Down
23 changes: 23 additions & 0 deletions docs/content/en/tailwind-viewer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Tailwind Viewer
description: 'Visualize your Tailwind configuration with the viewer.'
position: 4
category: Guide
categoryPosition: 2
---

Nuxt Tailwind will expose a `/_tailwind/` route in development so you can quickly visualize your tailwind configuration with easy copy pasting, thanks to the awesome [tailwind-config-viewer](https://github.com/rogden/tailwind-config-viewer) package ✨

The viewer is available from the `v3.4.0` of `@nuxtjs/tailwindcss`.

<video poster="https://res.cloudinary.com/nuxt/video/upload/v1608225750/nuxt-tailwind-viewer_ktowjm.jpg" loop playsinline controls>
<source src="https://res.cloudinary.com/nuxt/video/upload/q_auto/v1608225750/nuxt-tailwind-viewer_ktowjm.webm" type="video/webm" />
<source src="https://res.cloudinary.com/nuxt/video/upload/q_auto/v1608225750/nuxt-tailwind-viewer_ktowjm.mp4" type="video/mp4" />
<source src="https://res.cloudinary.com/nuxt/video/upload/q_auto/v1608225750/nuxt-tailwind-viewer_ktowjm.ogv" type="video/ogg" />
</video>

When enabled, you will see the Tailwind viewer url in your terminal:

<img src="/tailwind-viewer.png" width="530" height="246" style="margin: 0;" />

Checkout the [viewer option](/options#viewer) to disable the viewer in development.
Binary file added docs/static/tailwind-viewer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading