diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:10:59 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:41:44 +0800 |
| commit | fc87c009806dcc98867f6b58efe29b042aa01dee (patch) | |
| tree | 8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/autoprefixer/lib/hacks/display-flex.js | |
| parent | 3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff) | |
node: updatemain
Diffstat (limited to 'node_modules/autoprefixer/lib/hacks/display-flex.js')
| -rw-r--r-- | node_modules/autoprefixer/lib/hacks/display-flex.js | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/node_modules/autoprefixer/lib/hacks/display-flex.js b/node_modules/autoprefixer/lib/hacks/display-flex.js deleted file mode 100644 index 8a5473e5..00000000 --- a/node_modules/autoprefixer/lib/hacks/display-flex.js +++ /dev/null @@ -1,65 +0,0 @@ -let flexSpec = require('./flex-spec') -let OldValue = require('../old-value') -let Value = require('../value') - -class DisplayFlex extends Value { - constructor(name, prefixes) { - super(name, prefixes) - if (name === 'display-flex') { - this.name = 'flex' - } - } - - /** - * Faster check for flex value - */ - check(decl) { - return decl.prop === 'display' && decl.value === this.name - } - - /** - * Change value for old specs - */ - old(prefix) { - let prefixed = this.prefixed(prefix) - if (!prefixed) return undefined - return new OldValue(this.name, prefixed) - } - - /** - * Return value by spec - */ - prefixed(prefix) { - let spec, value - ;[spec, prefix] = flexSpec(prefix) - - if (spec === 2009) { - if (this.name === 'flex') { - value = 'box' - } else { - value = 'inline-box' - } - } else if (spec === 2012) { - if (this.name === 'flex') { - value = 'flexbox' - } else { - value = 'inline-flexbox' - } - } else if (spec === 'final') { - value = this.name - } - - return prefix + value - } - - /** - * Add prefix to value depend on flebox spec version - */ - replace(string, prefix) { - return this.prefixed(prefix) - } -} - -DisplayFlex.names = ['display-flex', 'inline-flex'] - -module.exports = DisplayFlex |
