Socket
Socket
Sign inDemoInstall

@ky-is/vue-cli-plugin-tailwind

Package Overview
Dependencies
0
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @ky-is/vue-cli-plugin-tailwind

Everything you need to write utility-first CSS with modern standards in your Vue app.


Version published
Weekly downloads
215
decreased by-33.85%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

vue-cli-plugin-tailwind

Tailwind CSS's utility classes are minned by Purgecss to ensure a minimal CSS footprint.

postcss-preset-env enables you to write CSS from upcoming standards, polyfilled based on your browserslist configuration.

postcss-import allows importing Tailwind with the standard @import syntax.

Install

vue add @ky-is/tailwind

When the plugin is updated, you can upgrade your tailwind configuration to take advantages of the latest fixes and improvements with:

vue invoke @ky-is/tailwind

(Requires node 6 or later.)

Usage

In addition to inline classes, shadowLookup is supported to @apply mixins directly in .vue modules. For example, in src/components/HelloWorld.vue of the auto-generated cli app:

<style lang="postcss" scoped>
h1 {
  @apply text-purple flex;
}
</style>

Applies a purple text color with scoped, browser-prefixed CSS, while PurgeCSS strips all other unused colors (and classes) from the Tailwind default configuration.

Configuration

postcss.config.js Plugins

  • postcss-preset-env: Configured to stage 2 by default, as these draft proposals are considered reasonably stable. If you want to enable more experimental features like nested classes (a { &hover: {...} }), change to stage: 0.

  • @fullhuman/postcss-purgecss: Purgecss removes all CSS classes that it can't find reference to. By default, all Vue and style files in the src folder are included. Adjust content array if you have CSS classes in other files.

FAQs

Last updated on 17 Aug 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc