summaryrefslogtreecommitdiff
path: root/node_modules/doiuse/data/features/css-case-insensitive.js
blob: 72c361078620c507157511be6362dbb60741c79b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/**
 * Including an `i` before the `]` in a CSS attribute selector causes the attribute value to be matched in an ASCII-case-insensitive manner. For example, `[b="xyz" i]` would match both `<a b="xyz">` and `<a b="XYZ">`.
 *
 * See: https://caniuse.com/css-case-insensitive
 */

/**
 * @type {import('../features').Feature}
 */
export default (rule) => {
  if (rule.type !== 'rule') { return false; }
  if (/\[.*i]/.test(rule.selector)) { return true; }
  return false;
};