diff options
Diffstat (limited to 'node_modules/stylehacks/src/isMixin.js')
| -rw-r--r-- | node_modules/stylehacks/src/isMixin.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/node_modules/stylehacks/src/isMixin.js b/node_modules/stylehacks/src/isMixin.js new file mode 100644 index 00000000..5a08c409 --- /dev/null +++ b/node_modules/stylehacks/src/isMixin.js @@ -0,0 +1,15 @@ +'use strict'; +/** + * @param {import('postcss').Rule} node + * @return {boolean} + */ +module.exports = function isMixin(node) { + const { selector } = node; + + // If the selector ends with a ':' it is likely a part of a custom mixin. + if (!selector || selector[selector.length - 1] === ':') { + return true; + } + + return false; +}; |
