1.1.4 • Published 3 years ago

@hurtigruten/tailwind-preset v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Hurtigruten Tailwind CSS preset

Read more how configurations are merged.

Setup

npm i @hurtigruten/tailwind-preset --save

Then add it to the tailwind config file

{
  presets: [require('@hurtigruten/tailwind-preset')],
}

Overwriting predefined styles

When adding the preset it comes with predefined component stylings like alerts, pills, etc. Overwriting these rules are simple as adding the same classes to the local CSS file.

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer components {
  .alert {
    @apply py-5 text-sm flex justify-center items-center relative;

    .alert-btn {
      @apply absolute right-5;
    }
  }
}