An Approach for Defining Custom Events for JS-powered Rules Inside CSS Stylesheets

Описание к видео An Approach for Defining Custom Events for JS-powered Rules Inside CSS Stylesheets

In this example we will supply custom configuration to our JS plugins by defining custom CSS variables containing additional information required to process that rule. Here we define a CSS variable named --js-selector which contains either window, or the CSS selector of the elements that we want to add the event listeners to, and we also define a custom --js-events selector, which looks like an array of strings, each defining one event we wish to listen to. This way we can express our JS-powered rules in CSS

code: https://gist.github.com/tomhodgins/be...

check out qaffeine on npm: https://www.npmjs.com/package/qaffeine

Комментарии

Информация по комментариям в разработке