fela-plugin-lvha
Advanced tools
Comparing version 1.0.0-beta.1 to 1.0.0-beta.2
@@ -49,17 +49,16 @@ (function (global, factory) { | ||
function LVHA() { | ||
return function (pluginInterface) { | ||
var style = pluginInterface.style; | ||
function LVHA(style) { | ||
return Object.keys(style).sort(sortPseudoClasses).reduce(function (out, pseudo) { | ||
out[pseudo] = style[pseudo]; | ||
return out; | ||
}, {}); | ||
} | ||
var LVHA$1 = (function () { | ||
return LVHA; | ||
}) | ||
return Object.keys(style).sort(sortPseudoClasses).reduce(function (out, pseudo) { | ||
out[pseudo] = style[pseudo]; | ||
return out; | ||
}, {}); | ||
}; | ||
} | ||
return LVHA$1; | ||
return LVHA; | ||
})); | ||
//# sourceMappingURL=fela-plugin-lvha.js.map |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.FelaPluginLVHA=e()}(this,function(){"use strict";function t(t,e){var n=o[t],r=o[e];return n&&r?r>n?1:-1:0}function e(){return function(e){var n=e.style;return Object.keys(n).sort(t).reduce(function(t,e){return t[e]=n[e],t},{})}}var n={};n["typeof"]="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},n["extends"]=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};var o={":link":4,":visited":3,":hover":2,":focus":1.5,":active":1};return e}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.FelaPluginLVHA=e()}(this,function(){"use strict";function t(t,e){var n=o[t],r=o[e];return n&&r?r>n?1:-1:0}function e(e){return Object.keys(e).sort(t).reduce(function(t,n){return t[n]=e[n],t},{})}var n={};n["typeof"]="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},n["extends"]=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};var o={":link":4,":visited":3,":hover":2,":focus":1.5,":active":1},r=function(){return e};return r}); |
{ | ||
"name": "fela-plugin-lvha", | ||
"version": "1.0.0-beta.1", | ||
"version": "1.0.0-beta.2", | ||
"description": "Fela plugin that sorts pseudo classes according to LVH(F)A", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,4 +0,33 @@ | ||
# LVHA plugin for Fela | ||
# fela-plugin-lvha | ||
Plugin that sorts pseudo classes according to LVH(F)A. | ||
Check out the [Fela repository](https://github.com/rofrischmann/fela) for further information. | ||
LVHA (sometimes known as LVHFA) stands for **L**ink **V**isited **H**over (**F**ocus) **A**ctive which are actually describe pseudo classes. Within CSS their order is relevant which means we always need to sort them correctly. This plugin **does** include the `:focus` pseudo class as well. | ||
```javascript | ||
{ | ||
width: '25px', | ||
':hover': { | ||
color: 'red' | ||
}, | ||
':visited': { | ||
color: 'gray' | ||
} | ||
':link': { | ||
margin: 0 | ||
} | ||
} | ||
``` | ||
would be transformed into: | ||
```javascript | ||
{ | ||
width: '25px', | ||
':link': { | ||
margin: 0 | ||
}, | ||
':visited': { | ||
color: 'gray' | ||
}, | ||
':hover': { | ||
color: 'red' | ||
} | ||
} | ||
``` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6241
34