mirror of
https://github.com/thangisme/notes.git
synced 2025-09-25 10:54:17 -04:00
Initial commit
This commit is contained in:
23
node_modules/stylelint/lib/utils/isStandardSyntaxMediaFeature.js
generated
vendored
Normal file
23
node_modules/stylelint/lib/utils/isStandardSyntaxMediaFeature.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
/* @flow */
|
||||
"use strict"
|
||||
|
||||
const hasInterpolation = require("../utils/hasInterpolation")
|
||||
/**
|
||||
* Check whether a media feature is standard
|
||||
*/
|
||||
module.exports = function (mediaFeature/*: string*/)/*: boolean*/ {
|
||||
// Remove outside parens
|
||||
mediaFeature = mediaFeature.slice(1, -1)
|
||||
|
||||
// Parentheticals used for non-standard operations e.g. ($var - 10)
|
||||
if (mediaFeature.indexOf("(") !== -1) {
|
||||
return false
|
||||
}
|
||||
|
||||
// SCSS or Less interpolation
|
||||
if (hasInterpolation(mediaFeature)) {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
Reference in New Issue
Block a user