JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 713
  • Score
    100M100P100Q107536F
  • License MIT

🏔️ Add support for browser specific variants in Tailwind.css

Package Exports

  • @igorkowalczyk/is-browser
  • @igorkowalczyk/is-browser/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@igorkowalczyk/is-browser) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Tailwindcss

Tailwind is :browser

🏔️ Add support for browser specific variants in Tailwind.css



📥 Installation

Tailwind.css v3 or newer is required.

npm install @igorkowalczyk/is-browser
yarn add @igorkowalczyk/is-browser
pnpm add @igorkowalczyk/is-browser

📦 Usage

Add to plugins in your tailwind.config.js:

module.exports = {
 // ...
 plugins: [
  require("@igorkowalczyk/is-browser"),
  // ...other plugins.
 ],
};

Style your components using {browser_name}:{class}, e.g. firefox:bg-red-100, firefox:bg-blue-100, etc.

<div className="firefox:bg-red-100 bg-blue-100">
 <p>On firefox background should be red, on other browsers it should be blue</p>
</div>

🔐 Supported browsers

Browser Browser Version(s) Variant CSS Property
Firefox All (Gecko) firefox: @-moz-document url-prefix()

⁉️ Issues

If you have any issues with the page please create new issue here

📥 Pull Requests

When submitting a pull request:

  • Clone the repo.
  • Create a branch off of master and give it a meaningful name (e.g. my-awesome-new-feature).
  • Open a pull request on GitHub and describe the feature or fix.

📋 License

This project is licensed under the MIT. See the LICENSE file for details