cb

check-browsers

Detect your desktop browser and version(Internet Explorer)

Showing:

Popularity

Downloads/wk

3

GitHub Stars

1

Maintenance

Last Commit

4yrs ago

Contributors

2

Package

Dependencies

0

Size (min+gzip)

0.3KB

License

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Check Browsers

NPM jsdelivr npm npm

It is detect your browser and version(Ineternet Explorer).
It detects only desktop browser not mobile browser.
It helps your page styling for each browser.
It appends class with html root element.

<html class="browser type">

If you known some idea for mobile browser, you could send pull request.

Index

  1. Installation
  2. Usage
    1. In HTML
    2. In module, Webpack, etc.
    3. In CSS
  3. Browser List

Installation

Using CDN:

<script src="//cdn.jsdelivr.net/npm/check-browsers@1.0.8/dist/check-browsers.min.js"></script>

Using npm:

$ npm i -S check-browsers

Using yarn:

$ yarn add check-browsers

Usage

In HTML

<head>
  ...
  <script src="/node_modules/check-browsers/dist/check-browsers.min.js"></script>
  ...
  <link rel="stylesheet" href="..." />
  ...
</head>

You should import it in head element and before stylesheet.
Because importing in head is processed before page rendering.
and importing before stylesheet is processed before styling.
So page styling is more fast.

In module, Webpack, etc.

require statement

require('check-browsers');

import syntax

import 'check-browsers';

In CSS

@charset "utf-8";
/* default style */
#test {
  font-size: 3em
}

/* each browser style */
.ie6 #test {
  color: salmon
}

.ie7 #test {
  color: red
}

.ie8 #test {
  color: blue
}

.ie9 #test {
  color: purple
}

.ie10 #test {
  color: orange
}

.ie11 #test {
  color: green
}

.edge #test {
  color: gray
}

.chrome #test {
  color: navy
}

.firefox #test {
  color: lime
}

.safari #test {
  color: fuchsia
}

.opera #test {
  color: brown
}

Browser List

  • IE6~11: ie6~11
  • MS Edge: edge
  • Google Chrome: chrome
  • Mozilla Firefox: firefox
  • Apple Safari: safari
  • Opera: opera

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100