5.0.2 • Published 8 months ago

@igorkowalczyk/is-browser v5.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Is browser


📥 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, chrome:bg-blue-100, etc.

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

🔐 Supported browsers

BrowserVariantCSS PropertyExample
Firefoxfirefox:-moz-appearance: nonefirefox:bg-yellow-400
Chromechrome:background: -webkit-named-image(i)chrome:bg-red-400
Safarisafari:-webkit-app-region: inheritsafari:bg-blue-400

⁉️ 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 main 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

5.0.2

8 months ago

5.0.1

9 months ago

5.0.0

10 months ago

3.2.0

1 year ago

4.0.1

12 months ago

4.0.0

12 months ago

4.0.3

12 months ago

4.0.2

12 months ago

3.1.0

1 year ago

2.1.2

1 year ago

2.1.1

1 year ago

3.0.0

1 year ago

2.1.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago