1.2.2 • Published 3 years ago

@superherocheesecake/adaptive v1.2.2

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

Adaptive

Read the document and provide JS with the same breakpoints that where defined in CSS

NPM installation

npm i --save @superherocheesecake/adaptive

Require the module

import { adaptive } from '@superherocheesecake/adaptive');

Events

isMediaQueryActive(name)

adaptive.addEventListerner("change:mediaquery", [handler]);

Methods

isMediaQueryActive(name)

adaptive.isMediaQueryActive("regular");

CSS setup

Adaptive will look for a string reference in the html before pseudo element. That string needs to start with 'adaptive:'.

@media (max-width: 1024px) {
  html:before {
    position: absolute;
    display: none;
    content: "adaptive:regular";
  }
}
1.2.2

3 years ago

1.2.1-canary.4

3 years ago

1.2.1-canary.3

3 years ago

1.2.1

4 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago