This package has been deprecated

Author message:

unmaintained

alternate-stylesheets
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

alternate-stylesheets.js

Actions Status: test npm version Try alternate-stylesheets on RunKit Renovate enabled

switch Alternate Style Sheets

Installation

npm

$ npm install alternate-stylesheets

yarn

$ yarn add alternate-stylesheets

Usage

ES Modules

import * as alternateStylesheets from 'alternate-stylesheets';

CommonJS

const alternateStylesheets = require('alternate-stylesheets');

browser

<script src="alternate-stylesheets.min.js"></script>

Example

// <link rel="stylesheet" title="cafe" href="cafe.css">
// <link rel="alternate stylesheet" title="orange" href="orange.css">
// <link rel="alternate stylesheet" title="chocolate" href="chocolate.css">

// get alternate stylesheets
const stylesheets = alternateStyleSheets.getAlternateStylesheets();

// enable orange stylesheet
alternateStyleSheets.setAlternateStylesheet('orange');

// enable chocolate stylesheet
alternateStyleSheets.setAlternateStylesheet('chocolate');

Functions

see documents

License

The MIT License.

Readme

Keywords

none

Package Sidebar

Install

npm i alternate-stylesheets

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

16.7 kB

Total Files

12

Last publish

Collaborators

  • sasaplus1