update
This commit is contained in:
+21
@@ -1,3 +1,24 @@
|
||||
## 4.2.0 (November 26, 2020)
|
||||
|
||||
- Trim Custom Property values when possible (#393)
|
||||
- Fixed removing unit for zero-length dimentions in `min()`, `max()` and `clamp()` functions (#426)
|
||||
- Fixed crash on bad value in TRBL declaration value (#412)
|
||||
|
||||
## 4.1.1 (November 15, 2020)
|
||||
|
||||
- Fixed build setup to exclude full `mdn/data` that reduced the lib size:
|
||||
* dist/csso.js: 794.5Kb -> 255.2Kb
|
||||
* dist/csso.min.js: 394.4Kb -> 194.2Kb
|
||||
* package size: 237.8 kB -> 156.1 kB
|
||||
* package unpacked size: 1.3 MB -> 586.8 kB
|
||||
|
||||
## 4.1.0 (October 27, 2020)
|
||||
|
||||
- Bumped [CSSTree](https://github.com/csstree/csstree) to `^1.0.0`
|
||||
- Fixed wrongly merging of TRBL values when one of them contains `var()` (#420)
|
||||
- Fixed wrongly merging of pseudo class and element with the same name, e.g. `:-ms-input-placeholder` and `::-ms-input-placeholder` (#383, #416)
|
||||
- Fixed wrongly merging of `overflow` fallback (#415)
|
||||
|
||||
## 4.0.3 (March 24, 2020)
|
||||
|
||||
- Prevented percent sign removal in `flex`/`-ms-flex` (#410)
|
||||
|
||||
+3316
-15483
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+9
@@ -1,5 +1,14 @@
|
||||
var property = require('css-tree').property;
|
||||
|
||||
module.exports = function cleanDeclartion(node, item, list) {
|
||||
if (node.value.children && node.value.children.isEmpty()) {
|
||||
list.remove(item);
|
||||
return;
|
||||
}
|
||||
|
||||
if (property(node.property).custom) {
|
||||
if (/\S/.test(node.value.value)) {
|
||||
node.value.value = node.value.value.trim();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
+7
-1
@@ -1,4 +1,10 @@
|
||||
var packNumber = require('./Number').pack;
|
||||
var MATH_FUNCTIONS = {
|
||||
'calc': true,
|
||||
'min': true,
|
||||
'max': true,
|
||||
'clamp': true
|
||||
};
|
||||
var LENGTH_UNIT = {
|
||||
// absolute length units
|
||||
'px': true,
|
||||
@@ -43,7 +49,7 @@ module.exports = function compressDimension(node, item) {
|
||||
}
|
||||
|
||||
// issue #222: don't remove units inside calc
|
||||
if (this.function && this.function.name === 'calc') {
|
||||
if (this.function && MATH_FUNCTIONS.hasOwnProperty(this.function.name)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ var OMIT_PLUSSIGN = /^(?:\+|(-))?0*(\d*)(?:\.0*|(\.\d*?)0*)?$/;
|
||||
var KEEP_PLUSSIGN = /^([\+\-])?0*(\d*)(?:\.0*|(\.\d*?)0*)?$/;
|
||||
var unsafeToRemovePlusSignAfter = {
|
||||
Dimension: true,
|
||||
HexColor: true,
|
||||
Hash: true,
|
||||
Identifier: true,
|
||||
Number: true,
|
||||
Raw: true,
|
||||
|
||||
+2
-2
@@ -442,7 +442,7 @@ function compressFunction(node, item, list) {
|
||||
}
|
||||
|
||||
item.data = {
|
||||
type: 'HexColor',
|
||||
type: 'Hash',
|
||||
loc: node.loc,
|
||||
value: toHex(args[0]) + toHex(args[1]) + toHex(args[2])
|
||||
};
|
||||
@@ -465,7 +465,7 @@ function compressIdent(node, item) {
|
||||
if (hex.length + 1 <= color.length) {
|
||||
// replace for shorter hex value
|
||||
item.data = {
|
||||
type: 'HexColor',
|
||||
type: 'Hash',
|
||||
loc: node.loc,
|
||||
value: hex
|
||||
};
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ var handlers = {
|
||||
Number: require('./Number'),
|
||||
String: require('./String'),
|
||||
Url: require('./Url'),
|
||||
HexColor: require('./color').compressHex,
|
||||
Hash: require('./color').compressHex,
|
||||
Identifier: require('./color').compressIdent,
|
||||
Function: require('./color').compressFunction
|
||||
};
|
||||
|
||||
+6
-2
@@ -78,7 +78,7 @@ function TRBL(name) {
|
||||
TRBL.prototype.getValueSequence = function(declaration, count) {
|
||||
var values = [];
|
||||
var iehack = '';
|
||||
var hasBadValues = declaration.value.children.some(function(child) {
|
||||
var hasBadValues = declaration.value.type !== 'Value' || declaration.value.children.some(function(child) {
|
||||
var special = false;
|
||||
|
||||
switch (child.type) {
|
||||
@@ -115,12 +115,16 @@ TRBL.prototype.getValueSequence = function(declaration, count) {
|
||||
}
|
||||
break;
|
||||
|
||||
case 'HexColor': // color
|
||||
case 'Hash': // color
|
||||
case 'Number':
|
||||
case 'Percentage':
|
||||
break;
|
||||
|
||||
case 'Function':
|
||||
if (child.name === 'var') {
|
||||
return true;
|
||||
}
|
||||
|
||||
special = child.name;
|
||||
break;
|
||||
|
||||
|
||||
+17
-17
@@ -14,17 +14,21 @@ var DONT_MIX_VALUE = {
|
||||
'text-align': /^(start|end|match-parent|justify-all)$/i
|
||||
};
|
||||
|
||||
var CURSOR_SAFE_VALUE = [
|
||||
'auto', 'crosshair', 'default', 'move', 'text', 'wait', 'help',
|
||||
'n-resize', 'e-resize', 's-resize', 'w-resize',
|
||||
'ne-resize', 'nw-resize', 'se-resize', 'sw-resize',
|
||||
'pointer', 'progress', 'not-allowed', 'no-drop', 'vertical-text', 'all-scroll',
|
||||
'col-resize', 'row-resize'
|
||||
];
|
||||
|
||||
var POSITION_SAFE_VALUE = [
|
||||
'static', 'relative', 'absolute', 'fixed'
|
||||
];
|
||||
var SAFE_VALUES = {
|
||||
cursor: [
|
||||
'auto', 'crosshair', 'default', 'move', 'text', 'wait', 'help',
|
||||
'n-resize', 'e-resize', 's-resize', 'w-resize',
|
||||
'ne-resize', 'nw-resize', 'se-resize', 'sw-resize',
|
||||
'pointer', 'progress', 'not-allowed', 'no-drop', 'vertical-text', 'all-scroll',
|
||||
'col-resize', 'row-resize'
|
||||
],
|
||||
overflow: [
|
||||
'hidden', 'visible', 'scroll', 'auto'
|
||||
],
|
||||
position: [
|
||||
'static', 'relative', 'absolute', 'fixed'
|
||||
]
|
||||
};
|
||||
|
||||
var NEEDLESS_TABLE = {
|
||||
'border-width': ['border'],
|
||||
@@ -105,12 +109,8 @@ function getPropertyFingerprint(propertyName, declaration, fingerprints) {
|
||||
iehack = RegExp.lastMatch;
|
||||
}
|
||||
|
||||
if (realName === 'cursor') {
|
||||
if (CURSOR_SAFE_VALUE.indexOf(name) === -1) {
|
||||
special[name] = true;
|
||||
}
|
||||
} else if (realName === 'position') {
|
||||
if (POSITION_SAFE_VALUE.indexOf(name) === -1) {
|
||||
if (SAFE_VALUES.hasOwnProperty(realName)) {
|
||||
if (SAFE_VALUES[realName].indexOf(name) === -1) {
|
||||
special[name] = true;
|
||||
}
|
||||
} else if (DONT_MIX_VALUE.hasOwnProperty(realName)) {
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@ module.exports = function freeze(node, usageData) {
|
||||
var name = node.name.toLowerCase();
|
||||
|
||||
if (!nonFreezePseudoClasses.hasOwnProperty(name)) {
|
||||
pseudos[name] = true;
|
||||
pseudos[':' + name] = true;
|
||||
hasPseudo = true;
|
||||
}
|
||||
break;
|
||||
@@ -53,7 +53,7 @@ module.exports = function freeze(node, usageData) {
|
||||
var name = node.name.toLowerCase();
|
||||
|
||||
if (!nonFreezePseudoElements.hasOwnProperty(name)) {
|
||||
pseudos[name] = true;
|
||||
pseudos['::' + name] = true;
|
||||
hasPseudo = true;
|
||||
}
|
||||
break;
|
||||
|
||||
+42
@@ -1,3 +1,45 @@
|
||||
## 1.1.3 (March 31, 2021)
|
||||
|
||||
- Fixed matching on CSS wide keywords for at-rule's prelude and descriptors
|
||||
- Added `fit-content` to `width` property patch as browsers are supported it as a keyword (nonstandard), but spec defines it as a function
|
||||
- Fixed parsing a value contains parentheses or brackets and `parseValue` option is set to `false`, in that case `!important` was included into a value but must not (#155)
|
||||
|
||||
## 1.1.2 (November 26, 2020)
|
||||
|
||||
- Rolled back to use spread syntax in object literals since it not supported by nodejs < 8.3 (#145)
|
||||
|
||||
## 1.1.1 (November 18, 2020)
|
||||
|
||||
- Fixed edge cases in mismatch location computation for `SyntaxMatchError`
|
||||
|
||||
## 1.1.0 (November 17, 2020)
|
||||
|
||||
- Bumped `mdn-data` to 2.0.14
|
||||
- Extended `fork()` method to allow append syntax instead of overriding for `types`, `properties` and `atrules`, e.g. `csstree.fork({ types: { color: '| foo | bar' } })`
|
||||
- Extended lexer API for validation
|
||||
- Added `Lexer#checkAtruleName(atruleName)`, `Lexer#checkAtrulePrelude(atruleName, prelude)`, `Lexer#checkAtruleDescriptorName(atruleName, descriptorName)` and `Lexer#checkPropertyName(propertyName)`
|
||||
- Added `Lexer#getAtrule(atruleName, fallbackBasename)` method
|
||||
- Extended `Lexer#getAtrulePrelude()` and `Lexer#getProperty()` methods to take `fallbackBasename` parameter
|
||||
- Improved `SyntaxMatchError` location details
|
||||
- Changed error messages
|
||||
|
||||
## 1.0.1 (November 11, 2020)
|
||||
|
||||
- Fixed edge cases for parsing of custom property value with a single whitespace when `parseCustomProperty:true`
|
||||
|
||||
## 1.0.0 (October 27, 2020)
|
||||
|
||||
- Added `onComment` option to parser config
|
||||
- Added support for `break` and `skip` values in `walk()` to control traversal
|
||||
- Added `List#reduce()` and `List#reduceRight()` methods
|
||||
- Bumped `mdn-data` to 2.0.12
|
||||
- Exposed version of the lib (i.e. `import { version } from 'css-tree'`)
|
||||
- Fixed `Lexer#dump()` to dump atrules syntaxes as well
|
||||
- Fixed matching comma separated `<urange>` list (#135)
|
||||
- Renamed `HexColor` node type into `Hash`
|
||||
- Removed `element()` specific parsing rules
|
||||
- Removed `dist/default-syntax.json` from package
|
||||
|
||||
## 1.0.0-alpha.39 (December 5, 2019)
|
||||
|
||||
- Fixed walker with `visit: "Declaration"` to iterate `DeclarationList` (#114)
|
||||
|
||||
+23
-9
@@ -10,9 +10,9 @@
|
||||
[](https://www.npmjs.com/package/css-tree)
|
||||
[](https://twitter.com/csstree)
|
||||
|
||||
CSSTree is a tool set to work with CSS, including [fast](https://github.com/postcss/benchmark) detailed parser (string->AST), walker (AST traversal), generator (AST->string) and lexer (validation and matching) based on knowledge of spec and browser implementations. The main goal is to be efficient and W3C spec compliant, with focus on CSS analyzing and source-to-source transforming tasks.
|
||||
CSSTree is a tool set for CSS: [fast](https://github.com/postcss/benchmark) detailed parser (CSS → AST), walker (AST traversal), generator (AST → CSS) and lexer (validation and matching) based on specs and browser implementations. The main goal is to be efficient and W3C specs compliant, with focus on CSS analyzing and source-to-source transforming tasks.
|
||||
|
||||
> NOTE: The project is in alpha stage since some parts need further improvements, AST format and API are subjects to change. However it's stable enough and used by packages like [CSSO](https://github.com/css/csso) (CSS minifier) and [SVGO](https://github.com/svg/svgo) (SVG optimizer) in production.
|
||||
> NOTE: The library isn't in final shape and needs further improvements (e.g. AST format and API are subjects to change in next major versions). However it's stable enough and used by projects like [CSSO](https://github.com/css/csso) (CSS minifier) and [SVGO](https://github.com/svg/svgo) (SVG optimizer) in production.
|
||||
|
||||
## Features
|
||||
|
||||
@@ -32,14 +32,29 @@ CSSTree is a tool set to work with CSS, including [fast](https://github.com/post
|
||||
|
||||
The build-in lexer can test CSS against syntaxes defined by W3C. CSSTree uses [mdn/data](https://github.com/mdn/data/) as a basis for lexer's dictionaries and extends it with vendor specific and legacy syntaxes. Lexer can only check the declaration values currently, but this feature will be extended to other parts of the CSS in the future.
|
||||
|
||||
## Docs
|
||||
## Documentation
|
||||
|
||||
- [AST format](docs/ast.md)
|
||||
- [Parsing CSS into AST](docs/parsing.md)
|
||||
- [Generate CSS from AST](docs/generate.md)
|
||||
- [Parsing CSS → AST](docs/parsing.md)
|
||||
- [parse(source[, options])](docs/parsing.md#parsesource-options)
|
||||
- [Serialization AST → CSS](docs/generate.md)
|
||||
- [generate(ast[, options])](docs/generate.md#generateast-options)
|
||||
- [AST traversal](docs/traversal.md)
|
||||
- [walk(ast, options)](docs/traversal.md#walkast-options)
|
||||
- [find(ast, fn)](docs/traversal.md#findast-fn)
|
||||
- [findLast(ast, fn)](docs/traversal.md#findlastast-fn)
|
||||
- [findAll(ast, fn)](docs/traversal.md#findallast-fn)
|
||||
- [Utils for AST](docs/utils.md)
|
||||
- [Working with definition syntax](docs/definition-syntax.md)
|
||||
- [property(name)](docs/utils.md#propertyname)
|
||||
- [keyword(name)](docs/utils.md#keywordname)
|
||||
- [clone(ast)](docs/utils.md#cloneast)
|
||||
- [fromPlainObject(object)](docs/utils.md#fromplainobjectobject)
|
||||
- [toPlainObject(ast)](docs/utils.md#toplainobjectast)
|
||||
- [Value Definition Syntax](docs/definition-syntax.md)
|
||||
- [parse(source)](docs/definition-syntax.md#parsesource)
|
||||
- [walk(node, options, context)](docs/definition-syntax.md#walknode-options-context)
|
||||
- [generate(node, options)](docs/definition-syntax.md#generatenode-options)
|
||||
- [AST format](docs/definition-syntax.md#ast-format)
|
||||
|
||||
## Tools
|
||||
|
||||
@@ -61,7 +76,6 @@ CSSTree is a tool set to work with CSS, including [fast](https://github.com/post
|
||||
|
||||
Install with npm:
|
||||
|
||||
|
||||
```
|
||||
> npm install css-tree
|
||||
```
|
||||
@@ -92,7 +106,7 @@ Syntax matching:
|
||||
// parse CSS to AST as a declaration value
|
||||
var ast = csstree.parse('red 1px solid', { context: 'value' });
|
||||
|
||||
// march to syntax of `border` property
|
||||
// match to syntax of `border` property
|
||||
var matchResult = csstree.lexer.matchProperty('border', ast);
|
||||
|
||||
// check first value node is a <color>
|
||||
@@ -109,7 +123,7 @@ console.log(matchResult.getTrace(ast.children.first()));
|
||||
|
||||
## Top level API
|
||||
|
||||

|
||||

|
||||
|
||||
## License
|
||||
|
||||
|
||||
+62
-19
@@ -1,19 +1,20 @@
|
||||
var mdnAtrules = require('mdn-data/css/at-rules.json');
|
||||
var mdnProperties = require('mdn-data/css/properties.json');
|
||||
var mdnSyntaxes = require('mdn-data/css/syntaxes.json');
|
||||
var patch = require('./patch.json');
|
||||
const mdnAtrules = require('mdn-data/css/at-rules.json');
|
||||
const mdnProperties = require('mdn-data/css/properties.json');
|
||||
const mdnSyntaxes = require('mdn-data/css/syntaxes.json');
|
||||
const patch = require('./patch.json');
|
||||
const extendSyntax = /^\s*\|\s*/;
|
||||
|
||||
function preprocessAtrules(dict) {
|
||||
var result = Object.create(null);
|
||||
const result = Object.create(null);
|
||||
|
||||
for (var atruleName in dict) {
|
||||
var atrule = dict[atruleName];
|
||||
var descriptors = null;
|
||||
for (const atruleName in dict) {
|
||||
const atrule = dict[atruleName];
|
||||
let descriptors = null;
|
||||
|
||||
if (atrule.descriptors) {
|
||||
descriptors = Object.create(null);
|
||||
|
||||
for (var descriptor in atrule.descriptors) {
|
||||
for (const descriptor in atrule.descriptors) {
|
||||
descriptors[descriptor] = atrule.descriptors[descriptor].syntax;
|
||||
}
|
||||
}
|
||||
@@ -27,25 +28,27 @@ function preprocessAtrules(dict) {
|
||||
return result;
|
||||
}
|
||||
|
||||
function buildDictionary(dict, patchDict) {
|
||||
var result = {};
|
||||
function patchDictionary(dict, patchDict) {
|
||||
const result = {};
|
||||
|
||||
// copy all syntaxes for an original dict
|
||||
for (var key in dict) {
|
||||
result[key] = dict[key].syntax;
|
||||
for (const key in dict) {
|
||||
result[key] = dict[key].syntax || dict[key];
|
||||
}
|
||||
|
||||
// apply a patch
|
||||
for (var key in patchDict) {
|
||||
for (const key in patchDict) {
|
||||
if (key in dict) {
|
||||
if (patchDict[key].syntax) {
|
||||
result[key] = patchDict[key].syntax;
|
||||
result[key] = extendSyntax.test(patchDict[key].syntax)
|
||||
? result[key] + ' ' + patchDict[key].syntax.trim()
|
||||
: patchDict[key].syntax;
|
||||
} else {
|
||||
delete result[key];
|
||||
}
|
||||
} else {
|
||||
if (patchDict[key].syntax) {
|
||||
result[key] = patchDict[key].syntax;
|
||||
result[key] = patchDict[key].syntax.replace(extendSyntax, '');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,8 +56,48 @@ function buildDictionary(dict, patchDict) {
|
||||
return result;
|
||||
}
|
||||
|
||||
function unpackSyntaxes(dict) {
|
||||
const result = {};
|
||||
|
||||
for (const key in dict) {
|
||||
result[key] = dict[key].syntax;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function patchAtrules(dict, patchDict) {
|
||||
const result = {};
|
||||
|
||||
// copy all syntaxes for an original dict
|
||||
for (const key in dict) {
|
||||
const patchDescriptors = (patchDict[key] && patchDict[key].descriptors) || null;
|
||||
|
||||
result[key] = {
|
||||
prelude: key in patchDict && 'prelude' in patchDict[key]
|
||||
? patchDict[key].prelude
|
||||
: dict[key].prelude || null,
|
||||
descriptors: dict[key].descriptors
|
||||
? patchDictionary(dict[key].descriptors, patchDescriptors || {})
|
||||
: patchDescriptors && unpackSyntaxes(patchDescriptors)
|
||||
};
|
||||
}
|
||||
|
||||
// apply a patch
|
||||
for (const key in patchDict) {
|
||||
if (!hasOwnProperty.call(dict, key)) {
|
||||
result[key] = {
|
||||
prelude: patchDict[key].prelude || null,
|
||||
descriptors: patchDict[key].descriptors && unpackSyntaxes(patchDict[key].descriptors)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
types: buildDictionary(mdnSyntaxes, patch.syntaxes),
|
||||
atrules: preprocessAtrules(mdnAtrules),
|
||||
properties: buildDictionary(mdnProperties, patch.properties)
|
||||
types: patchDictionary(mdnSyntaxes, patch.syntaxes),
|
||||
atrules: patchAtrules(preprocessAtrules(mdnAtrules), patch.atrules),
|
||||
properties: patchDictionary(mdnProperties, patch.properties)
|
||||
};
|
||||
|
||||
+718
-706
File diff suppressed because it is too large
Load Diff
+1510
-1113
File diff suppressed because it is too large
Load Diff
+1
-1
File diff suppressed because one or more lines are too long
+48
@@ -187,6 +187,54 @@ List.prototype.eachRight = function(fn, context) {
|
||||
|
||||
List.prototype.forEachRight = List.prototype.eachRight;
|
||||
|
||||
List.prototype.reduce = function(fn, initialValue, context) {
|
||||
var item;
|
||||
|
||||
if (context === undefined) {
|
||||
context = this;
|
||||
}
|
||||
|
||||
// push cursor
|
||||
var cursor = allocateCursor(this, null, this.head);
|
||||
var acc = initialValue;
|
||||
|
||||
while (cursor.next !== null) {
|
||||
item = cursor.next;
|
||||
cursor.next = item.next;
|
||||
|
||||
acc = fn.call(context, acc, item.data, item, this);
|
||||
}
|
||||
|
||||
// pop cursor
|
||||
releaseCursor(this);
|
||||
|
||||
return acc;
|
||||
};
|
||||
|
||||
List.prototype.reduceRight = function(fn, initialValue, context) {
|
||||
var item;
|
||||
|
||||
if (context === undefined) {
|
||||
context = this;
|
||||
}
|
||||
|
||||
// push cursor
|
||||
var cursor = allocateCursor(this, this.tail, null);
|
||||
var acc = initialValue;
|
||||
|
||||
while (cursor.prev !== null) {
|
||||
item = cursor.prev;
|
||||
cursor.prev = item.prev;
|
||||
|
||||
acc = fn.call(context, acc, item.data, item, this);
|
||||
}
|
||||
|
||||
// pop cursor
|
||||
releaseCursor(this);
|
||||
|
||||
return acc;
|
||||
};
|
||||
|
||||
List.prototype.nextUntil = function(start, fn, context) {
|
||||
if (start === null) {
|
||||
return;
|
||||
|
||||
+21
-11
@@ -102,12 +102,12 @@ TokenStream.prototype = {
|
||||
break loop;
|
||||
|
||||
default:
|
||||
offset = this.offsetAndType[cursor] & OFFSET_MASK;
|
||||
|
||||
// fast forward to the end of balanced block
|
||||
if (this.balance[balanceEnd] === cursor) {
|
||||
cursor = balanceEnd;
|
||||
}
|
||||
|
||||
offset = this.offsetAndType[cursor] & OFFSET_MASK;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,22 +187,32 @@ TokenStream.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
dump: function() {
|
||||
var offset = this.firstCharOffset;
|
||||
|
||||
return Array.prototype.slice.call(this.offsetAndType, 0, this.tokenCount).map(function(item, idx) {
|
||||
forEachToken(fn) {
|
||||
for (var i = 0, offset = this.firstCharOffset; i < this.tokenCount; i++) {
|
||||
var start = offset;
|
||||
var item = this.offsetAndType[i];
|
||||
var end = item & OFFSET_MASK;
|
||||
var type = item >> TYPE_SHIFT;
|
||||
|
||||
offset = end;
|
||||
|
||||
return {
|
||||
idx: idx,
|
||||
type: NAME[item >> TYPE_SHIFT],
|
||||
fn(type, start, end, i);
|
||||
}
|
||||
},
|
||||
|
||||
dump() {
|
||||
var tokens = new Array(this.tokenCount);
|
||||
|
||||
this.forEachToken((type, start, end, index) => {
|
||||
tokens[index] = {
|
||||
idx: index,
|
||||
type: NAME[type],
|
||||
chunk: this.source.substring(start, end),
|
||||
balance: this.balance[idx]
|
||||
balance: this.balance[index]
|
||||
};
|
||||
}, this);
|
||||
});
|
||||
|
||||
return tokens;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+127
-52
@@ -1,5 +1,5 @@
|
||||
var SyntaxReferenceError = require('./error').SyntaxReferenceError;
|
||||
var MatchError = require('./error').MatchError;
|
||||
var SyntaxMatchError = require('./error').SyntaxMatchError;
|
||||
var names = require('../utils/names');
|
||||
var generic = require('./generic');
|
||||
var parse = require('../definition-syntax/parse');
|
||||
@@ -28,6 +28,23 @@ function dumpMapSyntax(map, compact, syntaxAsAst) {
|
||||
return result;
|
||||
}
|
||||
|
||||
function dumpAtruleMapSyntax(map, compact, syntaxAsAst) {
|
||||
const result = {};
|
||||
|
||||
for (const [name, atrule] of Object.entries(map)) {
|
||||
result[name] = {
|
||||
prelude: atrule.prelude && (
|
||||
syntaxAsAst
|
||||
? atrule.prelude.syntax
|
||||
: generate(atrule.prelude.syntax, { compact })
|
||||
),
|
||||
descriptors: atrule.descriptors && dumpMapSyntax(atrule.descriptors, compact, syntaxAsAst)
|
||||
};
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function valueHasVar(tokens) {
|
||||
for (var i = 0; i < tokens.length; i++) {
|
||||
if (tokens[i].value.toLowerCase() === 'var(') {
|
||||
@@ -67,7 +84,7 @@ function matchSyntax(lexer, syntax, value, useCommon) {
|
||||
if (!result.match) {
|
||||
return buildMatchResult(
|
||||
null,
|
||||
new MatchError(result.reason, syntax.syntax, value, result),
|
||||
new SyntaxMatchError(result.reason, syntax.syntax, value, result),
|
||||
result.iterations
|
||||
);
|
||||
}
|
||||
@@ -137,7 +154,7 @@ Lexer.prototype = {
|
||||
return warns.length ? warns : false;
|
||||
},
|
||||
|
||||
createDescriptor: function(syntax, type, name) {
|
||||
createDescriptor: function(syntax, type, name, parent = null) {
|
||||
var ref = {
|
||||
type: type,
|
||||
name: name
|
||||
@@ -145,6 +162,7 @@ Lexer.prototype = {
|
||||
var descriptor = {
|
||||
type: type,
|
||||
name: name,
|
||||
parent: parent,
|
||||
syntax: null,
|
||||
match: null
|
||||
};
|
||||
@@ -182,20 +200,34 @@ Lexer.prototype = {
|
||||
return descriptor;
|
||||
},
|
||||
addAtrule_: function(name, syntax) {
|
||||
if (!syntax) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.atrules[name] = {
|
||||
type: 'Atrule',
|
||||
name: name,
|
||||
prelude: syntax.prelude ? this.createDescriptor(syntax.prelude, 'AtrulePrelude', name) : null,
|
||||
descriptors: syntax.descriptors
|
||||
? Object.keys(syntax.descriptors).reduce((res, name) => {
|
||||
res[name] = this.createDescriptor(syntax.descriptors[name], 'AtruleDescriptor', name);
|
||||
? Object.keys(syntax.descriptors).reduce((res, descName) => {
|
||||
res[descName] = this.createDescriptor(syntax.descriptors[descName], 'AtruleDescriptor', descName, name);
|
||||
return res;
|
||||
}, {})
|
||||
: null
|
||||
};
|
||||
},
|
||||
addProperty_: function(name, syntax) {
|
||||
if (!syntax) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.properties[name] = this.createDescriptor(syntax, 'Property', name);
|
||||
},
|
||||
addType_: function(name, syntax) {
|
||||
if (!syntax) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.types[name] = this.createDescriptor(syntax, 'Type', name);
|
||||
|
||||
if (syntax === generic['-ms-legacy-expression']) {
|
||||
@@ -203,48 +235,84 @@ Lexer.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
matchAtrulePrelude: function(atruleName, prelude) {
|
||||
var atrule = names.keyword(atruleName);
|
||||
checkAtruleName: function(atruleName) {
|
||||
if (!this.getAtrule(atruleName)) {
|
||||
return new SyntaxReferenceError('Unknown at-rule', '@' + atruleName);
|
||||
}
|
||||
},
|
||||
checkAtrulePrelude: function(atruleName, prelude) {
|
||||
let error = this.checkAtruleName(atruleName);
|
||||
|
||||
var atrulePreludeSyntax = atrule.vendor
|
||||
? this.getAtrulePrelude(atrule.name) || this.getAtrulePrelude(atrule.basename)
|
||||
: this.getAtrulePrelude(atrule.name);
|
||||
|
||||
if (!atrulePreludeSyntax) {
|
||||
if (atrule.basename in this.atrules) {
|
||||
return buildMatchResult(null, new Error('At-rule `' + atruleName + '` should not contain a prelude'));
|
||||
}
|
||||
|
||||
return buildMatchResult(null, new SyntaxReferenceError('Unknown at-rule', atruleName));
|
||||
if (error) {
|
||||
return error;
|
||||
}
|
||||
|
||||
return matchSyntax(this, atrulePreludeSyntax, prelude, true);
|
||||
var atrule = this.getAtrule(atruleName);
|
||||
|
||||
if (!atrule.prelude && prelude) {
|
||||
return new SyntaxError('At-rule `@' + atruleName + '` should not contain a prelude');
|
||||
}
|
||||
|
||||
if (atrule.prelude && !prelude) {
|
||||
return new SyntaxError('At-rule `@' + atruleName + '` should contain a prelude');
|
||||
}
|
||||
},
|
||||
matchAtruleDescriptor: function(atruleName, descriptorName, value) {
|
||||
var atrule = names.keyword(atruleName);
|
||||
checkAtruleDescriptorName: function(atruleName, descriptorName) {
|
||||
let error = this.checkAtruleName(atruleName);
|
||||
|
||||
if (error) {
|
||||
return error;
|
||||
}
|
||||
|
||||
var atrule = this.getAtrule(atruleName);
|
||||
var descriptor = names.keyword(descriptorName);
|
||||
|
||||
var atruleEntry = atrule.vendor
|
||||
? this.atrules[atrule.name] || this.atrules[atrule.basename]
|
||||
: this.atrules[atrule.name];
|
||||
|
||||
if (!atruleEntry) {
|
||||
return buildMatchResult(null, new SyntaxReferenceError('Unknown at-rule', atruleName));
|
||||
if (!atrule.descriptors) {
|
||||
return new SyntaxError('At-rule `@' + atruleName + '` has no known descriptors');
|
||||
}
|
||||
|
||||
if (!atruleEntry.descriptors) {
|
||||
return buildMatchResult(null, new Error('At-rule `' + atruleName + '` has no known descriptors'));
|
||||
if (!atrule.descriptors[descriptor.name] &&
|
||||
!atrule.descriptors[descriptor.basename]) {
|
||||
return new SyntaxReferenceError('Unknown at-rule descriptor', descriptorName);
|
||||
}
|
||||
},
|
||||
checkPropertyName: function(propertyName) {
|
||||
var property = names.property(propertyName);
|
||||
|
||||
// don't match syntax for a custom property
|
||||
if (property.custom) {
|
||||
return new Error('Lexer matching doesn\'t applicable for custom properties');
|
||||
}
|
||||
|
||||
var atruleDescriptorSyntax = descriptor.vendor
|
||||
? atruleEntry.descriptors[descriptor.name] || atruleEntry.descriptors[descriptor.basename]
|
||||
: atruleEntry.descriptors[descriptor.name];
|
||||
if (!this.getProperty(propertyName)) {
|
||||
return new SyntaxReferenceError('Unknown property', propertyName);
|
||||
}
|
||||
},
|
||||
|
||||
if (!atruleDescriptorSyntax) {
|
||||
return buildMatchResult(null, new SyntaxReferenceError('Unknown at-rule descriptor', descriptorName));
|
||||
matchAtrulePrelude: function(atruleName, prelude) {
|
||||
var error = this.checkAtrulePrelude(atruleName, prelude);
|
||||
|
||||
if (error) {
|
||||
return buildMatchResult(null, error);
|
||||
}
|
||||
|
||||
return matchSyntax(this, atruleDescriptorSyntax, value, true);
|
||||
if (!prelude) {
|
||||
return buildMatchResult(null, null);
|
||||
}
|
||||
|
||||
return matchSyntax(this, this.getAtrule(atruleName).prelude, prelude, false);
|
||||
},
|
||||
matchAtruleDescriptor: function(atruleName, descriptorName, value) {
|
||||
var error = this.checkAtruleDescriptorName(atruleName, descriptorName);
|
||||
|
||||
if (error) {
|
||||
return buildMatchResult(null, error);
|
||||
}
|
||||
|
||||
var atrule = this.getAtrule(atruleName);
|
||||
var descriptor = names.keyword(descriptorName);
|
||||
|
||||
return matchSyntax(this, atrule.descriptors[descriptor.name] || atrule.descriptors[descriptor.basename], value, false);
|
||||
},
|
||||
matchDeclaration: function(node) {
|
||||
if (node.type !== 'Declaration') {
|
||||
@@ -254,22 +322,13 @@ Lexer.prototype = {
|
||||
return this.matchProperty(node.property, node.value);
|
||||
},
|
||||
matchProperty: function(propertyName, value) {
|
||||
var property = names.property(propertyName);
|
||||
var error = this.checkPropertyName(propertyName);
|
||||
|
||||
// don't match syntax for a custom property
|
||||
if (property.custom) {
|
||||
return buildMatchResult(null, new Error('Lexer matching doesn\'t applicable for custom properties'));
|
||||
if (error) {
|
||||
return buildMatchResult(null, error);
|
||||
}
|
||||
|
||||
var propertySyntax = property.vendor
|
||||
? this.getProperty(property.name) || this.getProperty(property.basename)
|
||||
: this.getProperty(property.name);
|
||||
|
||||
if (!propertySyntax) {
|
||||
return buildMatchResult(null, new SyntaxReferenceError('Unknown property', propertyName));
|
||||
}
|
||||
|
||||
return matchSyntax(this, propertySyntax, value, true);
|
||||
return matchSyntax(this, this.getProperty(propertyName), value, true);
|
||||
},
|
||||
matchType: function(typeName, value) {
|
||||
var typeSyntax = this.getType(typeName);
|
||||
@@ -311,16 +370,31 @@ Lexer.prototype = {
|
||||
return result;
|
||||
},
|
||||
|
||||
getAtrulePrelude: function(atruleName) {
|
||||
return this.atrules.hasOwnProperty(atruleName) ? this.atrules[atruleName].prelude : null;
|
||||
getAtrule: function(atruleName, fallbackBasename = true) {
|
||||
var atrule = names.keyword(atruleName);
|
||||
var atruleEntry = atrule.vendor && fallbackBasename
|
||||
? this.atrules[atrule.name] || this.atrules[atrule.basename]
|
||||
: this.atrules[atrule.name];
|
||||
|
||||
return atruleEntry || null;
|
||||
},
|
||||
getAtrulePrelude: function(atruleName, fallbackBasename = true) {
|
||||
const atrule = this.getAtrule(atruleName, fallbackBasename);
|
||||
|
||||
return atrule && atrule.prelude || null;
|
||||
},
|
||||
getAtruleDescriptor: function(atruleName, name) {
|
||||
return this.atrules.hasOwnProperty(atruleName) && this.atrules.declarators
|
||||
? this.atrules[atruleName].declarators[name] || null
|
||||
: null;
|
||||
},
|
||||
getProperty: function(name) {
|
||||
return this.properties.hasOwnProperty(name) ? this.properties[name] : null;
|
||||
getProperty: function(propertyName, fallbackBasename = true) {
|
||||
var property = names.property(propertyName);
|
||||
var propertyEntry = property.vendor && fallbackBasename
|
||||
? this.properties[property.name] || this.properties[property.basename]
|
||||
: this.properties[property.name];
|
||||
|
||||
return propertyEntry || null;
|
||||
},
|
||||
getType: function(name) {
|
||||
return this.types.hasOwnProperty(name) ? this.types[name] : null;
|
||||
@@ -380,7 +454,8 @@ Lexer.prototype = {
|
||||
return {
|
||||
generic: this.generic,
|
||||
types: dumpMapSyntax(this.types, !pretty, syntaxAsAst),
|
||||
properties: dumpMapSyntax(this.properties, !pretty, syntaxAsAst)
|
||||
properties: dumpMapSyntax(this.properties, !pretty, syntaxAsAst),
|
||||
atrules: dumpAtruleMapSyntax(this.atrules, !pretty, syntaxAsAst)
|
||||
};
|
||||
},
|
||||
toString: function() {
|
||||
|
||||
+79
-45
@@ -1,20 +1,28 @@
|
||||
var createCustomError = require('../utils/createCustomError');
|
||||
var generate = require('../definition-syntax/generate');
|
||||
const createCustomError = require('../utils/createCustomError');
|
||||
const generate = require('../definition-syntax/generate');
|
||||
const defaultLoc = { offset: 0, line: 1, column: 1 };
|
||||
|
||||
function fromMatchResult(matchResult) {
|
||||
var tokens = matchResult.tokens;
|
||||
var longestMatch = matchResult.longestMatch;
|
||||
var node = longestMatch < tokens.length ? tokens[longestMatch].node : null;
|
||||
var mismatchOffset = -1;
|
||||
var entries = 0;
|
||||
var css = '';
|
||||
function locateMismatch(matchResult, node) {
|
||||
const tokens = matchResult.tokens;
|
||||
const longestMatch = matchResult.longestMatch;
|
||||
const mismatchNode = longestMatch < tokens.length ? tokens[longestMatch].node || null : null;
|
||||
const badNode = mismatchNode !== node ? mismatchNode : null;
|
||||
let mismatchOffset = 0;
|
||||
let mismatchLength = 0;
|
||||
let entries = 0;
|
||||
let css = '';
|
||||
let start;
|
||||
let end;
|
||||
|
||||
for (let i = 0; i < tokens.length; i++) {
|
||||
const token = tokens[i].value;
|
||||
|
||||
for (var i = 0; i < tokens.length; i++) {
|
||||
if (i === longestMatch) {
|
||||
mismatchLength = token.length;
|
||||
mismatchOffset = css.length;
|
||||
}
|
||||
|
||||
if (node !== null && tokens[i].node === node) {
|
||||
if (badNode !== null && tokens[i].node === badNode) {
|
||||
if (i <= longestMatch) {
|
||||
entries++;
|
||||
} else {
|
||||
@@ -22,33 +30,58 @@ function fromMatchResult(matchResult) {
|
||||
}
|
||||
}
|
||||
|
||||
css += tokens[i].value;
|
||||
css += token;
|
||||
}
|
||||
|
||||
if (longestMatch === tokens.length || entries > 1) { // last
|
||||
start = fromLoc(badNode || node, 'end') || buildLoc(defaultLoc, css);
|
||||
end = buildLoc(start);
|
||||
} else {
|
||||
start = fromLoc(badNode, 'start') ||
|
||||
buildLoc(fromLoc(node, 'start') || defaultLoc, css.slice(0, mismatchOffset));
|
||||
end = fromLoc(badNode, 'end') ||
|
||||
buildLoc(start, css.substr(mismatchOffset, mismatchLength));
|
||||
}
|
||||
|
||||
return {
|
||||
node: node,
|
||||
css: css,
|
||||
mismatchOffset: mismatchOffset === -1 ? css.length : mismatchOffset,
|
||||
last: node === null || entries > 1
|
||||
css,
|
||||
mismatchOffset,
|
||||
mismatchLength,
|
||||
start,
|
||||
end
|
||||
};
|
||||
}
|
||||
|
||||
function getLocation(node, point) {
|
||||
var loc = node && node.loc && node.loc[point];
|
||||
function fromLoc(node, point) {
|
||||
const value = node && node.loc && node.loc[point];
|
||||
|
||||
if (loc) {
|
||||
return {
|
||||
offset: loc.offset,
|
||||
line: loc.line,
|
||||
column: loc.column
|
||||
};
|
||||
if (value) {
|
||||
return 'line' in value ? buildLoc(value) : value;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
var SyntaxReferenceError = function(type, referenceName) {
|
||||
var error = createCustomError(
|
||||
function buildLoc({ offset, line, column }, extra) {
|
||||
const loc = {
|
||||
offset,
|
||||
line,
|
||||
column
|
||||
};
|
||||
|
||||
if (extra) {
|
||||
const lines = extra.split(/\n|\r\n?|\f/);
|
||||
|
||||
loc.offset += extra.length;
|
||||
loc.line += lines.length - 1;
|
||||
loc.column = lines.length === 1 ? loc.column + extra.length : lines.pop().length + 1;
|
||||
}
|
||||
|
||||
return loc;
|
||||
}
|
||||
|
||||
const SyntaxReferenceError = function(type, referenceName) {
|
||||
const error = createCustomError(
|
||||
'SyntaxReferenceError',
|
||||
type + (referenceName ? ' `' + referenceName + '`' : '')
|
||||
);
|
||||
@@ -58,36 +91,37 @@ var SyntaxReferenceError = function(type, referenceName) {
|
||||
return error;
|
||||
};
|
||||
|
||||
var MatchError = function(message, syntax, node, matchResult) {
|
||||
var error = createCustomError('SyntaxMatchError', message);
|
||||
var details = fromMatchResult(matchResult);
|
||||
var mismatchOffset = details.mismatchOffset || 0;
|
||||
var badNode = details.node || node;
|
||||
var end = getLocation(badNode, 'end');
|
||||
var start = details.last ? end : getLocation(badNode, 'start');
|
||||
var css = details.css;
|
||||
const SyntaxMatchError = function(message, syntax, node, matchResult) {
|
||||
const error = createCustomError('SyntaxMatchError', message);
|
||||
const {
|
||||
css,
|
||||
mismatchOffset,
|
||||
mismatchLength,
|
||||
start,
|
||||
end
|
||||
} = locateMismatch(matchResult, node);
|
||||
|
||||
error.rawMessage = message;
|
||||
error.syntax = syntax ? generate(syntax) : '<generic>';
|
||||
error.css = css;
|
||||
error.mismatchOffset = mismatchOffset;
|
||||
error.loc = {
|
||||
source: (badNode && badNode.loc && badNode.loc.source) || '<unknown>',
|
||||
start: start,
|
||||
end: end
|
||||
};
|
||||
error.line = start ? start.line : undefined;
|
||||
error.column = start ? start.column : undefined;
|
||||
error.offset = start ? start.offset : undefined;
|
||||
error.mismatchLength = mismatchLength;
|
||||
error.message = message + '\n' +
|
||||
' syntax: ' + error.syntax + '\n' +
|
||||
' value: ' + (error.css || '<empty string>') + '\n' +
|
||||
' value: ' + (css || '<empty string>') + '\n' +
|
||||
' --------' + new Array(error.mismatchOffset + 1).join('-') + '^';
|
||||
|
||||
Object.assign(error, start);
|
||||
error.loc = {
|
||||
source: (node && node.loc && node.loc.source) || '<unknown>',
|
||||
start,
|
||||
end
|
||||
};
|
||||
|
||||
return error;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
SyntaxReferenceError: SyntaxReferenceError,
|
||||
MatchError: MatchError
|
||||
SyntaxReferenceError,
|
||||
SyntaxMatchError
|
||||
};
|
||||
|
||||
+11
-1
@@ -54,6 +54,16 @@ function areStringsEqualCaseInsensitive(testStr, referenceStr) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function isContextEdgeDelim(token) {
|
||||
if (token.type !== TYPE.Delim) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Fix matching for unicode-range: U+30??, U+FF00-FF9F
|
||||
// Probably we need to check out previous match instead
|
||||
return token.value !== '?';
|
||||
}
|
||||
|
||||
function isCommaContextStart(token) {
|
||||
if (token === null) {
|
||||
return true;
|
||||
@@ -65,7 +75,7 @@ function isCommaContextStart(token) {
|
||||
token.type === TYPE.LeftParenthesis ||
|
||||
token.type === TYPE.LeftSquareBracket ||
|
||||
token.type === TYPE.LeftCurlyBracket ||
|
||||
token.type === TYPE.Delim
|
||||
isContextEdgeDelim(token)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+16
-1
@@ -4,13 +4,14 @@ var TokenStream = require('../common/TokenStream');
|
||||
var List = require('../common/List');
|
||||
var tokenize = require('../tokenizer');
|
||||
var constants = require('../tokenizer/const');
|
||||
var findWhiteSpaceStart = require('../tokenizer/utils').findWhiteSpaceStart;
|
||||
var { findWhiteSpaceStart, cmpStr } = require('../tokenizer/utils');
|
||||
var sequence = require('./sequence');
|
||||
var noop = function() {};
|
||||
|
||||
var TYPE = constants.TYPE;
|
||||
var NAME = constants.NAME;
|
||||
var WHITESPACE = TYPE.WhiteSpace;
|
||||
var COMMENT = TYPE.Comment;
|
||||
var IDENT = TYPE.Ident;
|
||||
var FUNCTION = TYPE.Function;
|
||||
var URL = TYPE.Url;
|
||||
@@ -255,6 +256,7 @@ module.exports = function createParser(config) {
|
||||
options = options || {};
|
||||
|
||||
var context = options.context || 'default';
|
||||
var onComment = options.onComment;
|
||||
var ast;
|
||||
|
||||
tokenize(source, parser.scanner);
|
||||
@@ -278,6 +280,19 @@ module.exports = function createParser(config) {
|
||||
throw new Error('Unknown context `' + context + '`');
|
||||
}
|
||||
|
||||
if (typeof onComment === 'function') {
|
||||
parser.scanner.forEachToken((type, start, end) => {
|
||||
if (type === COMMENT) {
|
||||
const loc = parser.getLocation(start, end);
|
||||
const value = cmpStr(source, end - 2, end, '*/')
|
||||
? source.slice(start + 2, end - 2)
|
||||
: source.slice(start + 2, end);
|
||||
|
||||
onComment(value, loc);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ast = parser.context[context].call(parser, options);
|
||||
|
||||
if (!parser.scanner.eof) {
|
||||
|
||||
+85
-33
@@ -1,11 +1,14 @@
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
var shape = {
|
||||
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
const shape = {
|
||||
generic: true,
|
||||
types: {},
|
||||
atrules: {},
|
||||
properties: {},
|
||||
parseContext: {},
|
||||
scope: {},
|
||||
types: appendOrAssign,
|
||||
atrules: {
|
||||
prelude: appendOrAssignOrNull,
|
||||
descriptors: appendOrAssignOrNull
|
||||
},
|
||||
properties: appendOrAssign,
|
||||
parseContext: assign,
|
||||
scope: deepAssign,
|
||||
atrule: ['parse'],
|
||||
pseudo: ['parse'],
|
||||
node: ['name', 'structure', 'parse', 'generate', 'walkContext']
|
||||
@@ -16,26 +19,64 @@ function isObject(value) {
|
||||
}
|
||||
|
||||
function copy(value) {
|
||||
if (isObject(value)) {
|
||||
return Object.assign({}, value);
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
return isObject(value)
|
||||
? Object.assign({}, value)
|
||||
: value;
|
||||
}
|
||||
function extend(dest, src) {
|
||||
for (var key in src) {
|
||||
|
||||
function assign(dest, src) {
|
||||
return Object.assign(dest, src);
|
||||
}
|
||||
|
||||
function deepAssign(dest, src) {
|
||||
for (const key in src) {
|
||||
if (hasOwnProperty.call(src, key)) {
|
||||
if (isObject(dest[key])) {
|
||||
extend(dest[key], copy(src[key]));
|
||||
deepAssign(dest[key], copy(src[key]));
|
||||
} else {
|
||||
dest[key] = copy(src[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return dest;
|
||||
}
|
||||
|
||||
function append(a, b) {
|
||||
if (typeof b === 'string' && /^\s*\|/.test(b)) {
|
||||
return typeof a === 'string'
|
||||
? a + b
|
||||
: b.replace(/^\s*\|\s*/, '');
|
||||
}
|
||||
|
||||
return b || null;
|
||||
}
|
||||
|
||||
function appendOrAssign(a, b) {
|
||||
if (typeof b === 'string') {
|
||||
return append(a, b);
|
||||
}
|
||||
|
||||
const result = Object.assign({}, a);
|
||||
for (let key in b) {
|
||||
if (hasOwnProperty.call(b, key)) {
|
||||
result[key] = append(hasOwnProperty.call(a, key) ? a[key] : undefined, b[key]);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function appendOrAssignOrNull(a, b) {
|
||||
const result = appendOrAssign(a, b);
|
||||
|
||||
return !isObject(result) || Object.keys(result).length
|
||||
? result
|
||||
: null;
|
||||
}
|
||||
|
||||
function mix(dest, src, shape) {
|
||||
for (var key in shape) {
|
||||
for (const key in shape) {
|
||||
if (hasOwnProperty.call(shape, key) === false) {
|
||||
continue;
|
||||
}
|
||||
@@ -47,35 +88,48 @@ function mix(dest, src, shape) {
|
||||
}
|
||||
}
|
||||
} else if (shape[key]) {
|
||||
if (isObject(shape[key])) {
|
||||
var res = {};
|
||||
extend(res, dest[key]);
|
||||
extend(res, src[key]);
|
||||
dest[key] = res;
|
||||
if (typeof shape[key] === 'function') {
|
||||
const fn = shape[key];
|
||||
dest[key] = fn({}, dest[key]);
|
||||
dest[key] = fn(dest[key] || {}, src[key]);
|
||||
} else if (isObject(shape[key])) {
|
||||
const result = {};
|
||||
|
||||
for (let name in dest[key]) {
|
||||
result[name] = mix({}, dest[key][name], shape[key]);
|
||||
}
|
||||
|
||||
for (let name in src[key]) {
|
||||
result[name] = mix(result[name] || {}, src[key][name], shape[key]);
|
||||
}
|
||||
|
||||
dest[key] = result;
|
||||
} else if (Array.isArray(shape[key])) {
|
||||
var res = {};
|
||||
var innerShape = shape[key].reduce(function(s, k) {
|
||||
const res = {};
|
||||
const innerShape = shape[key].reduce(function(s, k) {
|
||||
s[k] = true;
|
||||
return s;
|
||||
}, {});
|
||||
for (var name in dest[key]) {
|
||||
if (hasOwnProperty.call(dest[key], name)) {
|
||||
res[name] = {};
|
||||
if (dest[key] && dest[key][name]) {
|
||||
mix(res[name], dest[key][name], innerShape);
|
||||
}
|
||||
|
||||
for (const [name, value] of Object.entries(dest[key] || {})) {
|
||||
res[name] = {};
|
||||
if (value) {
|
||||
mix(res[name], value, innerShape);
|
||||
}
|
||||
}
|
||||
for (var name in src[key]) {
|
||||
|
||||
for (const name in src[key]) {
|
||||
if (hasOwnProperty.call(src[key], name)) {
|
||||
if (!res[name]) {
|
||||
res[name] = {};
|
||||
}
|
||||
|
||||
if (src[key] && src[key][name]) {
|
||||
mix(res[name], src[key][name], innerShape);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dest[key] = res;
|
||||
}
|
||||
}
|
||||
@@ -83,6 +137,4 @@ function mix(dest, src, shape) {
|
||||
return dest;
|
||||
}
|
||||
|
||||
module.exports = function(dest, src) {
|
||||
return mix(dest, src, shape);
|
||||
};
|
||||
module.exports = (dest, src) => mix(dest, src, shape);
|
||||
|
||||
+20
-3
@@ -2,6 +2,7 @@ var TYPE = require('../../tokenizer').TYPE;
|
||||
var rawMode = require('../node/Raw').mode;
|
||||
|
||||
var COMMA = TYPE.Comma;
|
||||
var WHITESPACE = TYPE.WhiteSpace;
|
||||
|
||||
// var( <ident> , <value>? )
|
||||
module.exports = function() {
|
||||
@@ -16,10 +17,26 @@ module.exports = function() {
|
||||
|
||||
if (this.scanner.tokenType === COMMA) {
|
||||
children.push(this.Operator());
|
||||
children.push(this.parseCustomProperty
|
||||
|
||||
const startIndex = this.scanner.tokenIndex;
|
||||
const value = this.parseCustomProperty
|
||||
? this.Value(null)
|
||||
: this.Raw(this.scanner.tokenIndex, rawMode.exclamationMarkOrSemicolon, false)
|
||||
);
|
||||
: this.Raw(this.scanner.tokenIndex, rawMode.exclamationMarkOrSemicolon, false);
|
||||
|
||||
if (value.type === 'Value' && value.children.isEmpty()) {
|
||||
for (let offset = startIndex - this.scanner.tokenIndex; offset <= 0; offset++) {
|
||||
if (this.scanner.lookupType(offset) === WHITESPACE) {
|
||||
value.children.appendData({
|
||||
type: 'WhiteSpace',
|
||||
loc: null,
|
||||
value: ' '
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
children.push(value);
|
||||
}
|
||||
|
||||
return children;
|
||||
|
||||
+1
@@ -18,3 +18,4 @@ module.exports = require('./create').create(
|
||||
require('./config/walker')
|
||||
)
|
||||
);
|
||||
module.exports.version = require('../../package.json').version;
|
||||
|
||||
+16
@@ -7,6 +7,7 @@ var HASH = TYPE.Hash;
|
||||
var COLON = TYPE.Colon;
|
||||
var SEMICOLON = TYPE.Semicolon;
|
||||
var DELIM = TYPE.Delim;
|
||||
var WHITESPACE = TYPE.WhiteSpace;
|
||||
var EXCLAMATIONMARK = 0x0021; // U+0021 EXCLAMATION MARK (!)
|
||||
var NUMBERSIGN = 0x0023; // U+0023 NUMBER SIGN (#)
|
||||
var DOLLARSIGN = 0x0024; // U+0024 DOLLAR SIGN ($)
|
||||
@@ -58,6 +59,8 @@ module.exports = {
|
||||
this.scanner.skipSC();
|
||||
this.eat(COLON);
|
||||
|
||||
const valueStart = this.scanner.tokenIndex;
|
||||
|
||||
if (!customProperty) {
|
||||
this.scanner.skipSC();
|
||||
}
|
||||
@@ -68,6 +71,19 @@ module.exports = {
|
||||
value = consumeRaw.call(this, this.scanner.tokenIndex);
|
||||
}
|
||||
|
||||
if (customProperty && value.type === 'Value' && value.children.isEmpty()) {
|
||||
for (let offset = valueStart - this.scanner.tokenIndex; offset <= 0; offset++) {
|
||||
if (this.scanner.lookupType(offset) === WHITESPACE) {
|
||||
value.children.appendData({
|
||||
type: 'WhiteSpace',
|
||||
loc: null,
|
||||
value: ' '
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.scanner.isDelim(EXCLAMATIONMARK)) {
|
||||
important = getImportant.call(this);
|
||||
this.scanner.skipSC();
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
var TYPE = require('../../tokenizer').TYPE;
|
||||
|
||||
var HASH = TYPE.Hash;
|
||||
|
||||
// '#' ident
|
||||
module.exports = {
|
||||
name: 'Hash',
|
||||
structure: {
|
||||
value: String
|
||||
},
|
||||
parse: function() {
|
||||
var start = this.scanner.tokenStart;
|
||||
|
||||
this.eat(HASH);
|
||||
|
||||
return {
|
||||
type: 'Hash',
|
||||
loc: this.getLocation(start, this.scanner.tokenStart),
|
||||
value: this.scanner.substrToCursor(start + 1)
|
||||
};
|
||||
},
|
||||
generate: function(node) {
|
||||
this.chunk('#');
|
||||
this.chunk(node.value);
|
||||
}
|
||||
};
|
||||
+1
-1
@@ -14,7 +14,7 @@ module.exports = {
|
||||
DeclarationList: require('./DeclarationList'),
|
||||
Dimension: require('./Dimension'),
|
||||
Function: require('./Function'),
|
||||
HexColor: require('./HexColor'),
|
||||
Hash: require('./Hash'),
|
||||
Identifier: require('./Identifier'),
|
||||
IdSelector: require('./IdSelector'),
|
||||
MediaFeature: require('./MediaFeature'),
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ var U = 0x0075; // U+0075 LATIN SMALL LETTER U (u)
|
||||
module.exports = function defaultRecognizer(context) {
|
||||
switch (this.scanner.tokenType) {
|
||||
case HASH:
|
||||
return this.HexColor();
|
||||
return this.Hash();
|
||||
|
||||
case COMMA:
|
||||
context.space = null;
|
||||
|
||||
-2
@@ -1,7 +1,5 @@
|
||||
module.exports = {
|
||||
getNode: require('./default'),
|
||||
'-moz-element': require('../function/element'),
|
||||
'element': require('../function/element'),
|
||||
'expression': require('../function/expression'),
|
||||
'var': require('../function/var')
|
||||
};
|
||||
|
||||
+41
-20
@@ -86,7 +86,7 @@ function createTypeIterator(config, reverse) {
|
||||
fields.reverse();
|
||||
}
|
||||
|
||||
return function(node, context, walk) {
|
||||
return function(node, context, walk, walkReducer) {
|
||||
var prevContextValue;
|
||||
|
||||
if (useContext) {
|
||||
@@ -100,13 +100,15 @@ function createTypeIterator(config, reverse) {
|
||||
|
||||
if (!field.nullable || ref) {
|
||||
if (field.type === 'list') {
|
||||
if (reverse) {
|
||||
ref.forEachRight(walk);
|
||||
} else {
|
||||
ref.forEach(walk);
|
||||
var breakWalk = reverse
|
||||
? ref.reduceRight(walkReducer, false)
|
||||
: ref.reduce(walkReducer, false);
|
||||
|
||||
if (breakWalk) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
walk(ref);
|
||||
} else if (walk(ref)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -145,6 +147,8 @@ module.exports = function createWalker(config) {
|
||||
var types = getTypesFromConfig(config);
|
||||
var iteratorsNatural = {};
|
||||
var iteratorsReverse = {};
|
||||
var breakWalk = Symbol('break-walk');
|
||||
var skipNode = Symbol('skip-node');
|
||||
|
||||
for (var name in types) {
|
||||
if (hasOwnProperty.call(types, name) && types[name] !== null) {
|
||||
@@ -158,19 +162,38 @@ module.exports = function createWalker(config) {
|
||||
|
||||
var walk = function(root, options) {
|
||||
function walkNode(node, item, list) {
|
||||
enter.call(context, node, item, list);
|
||||
var enterRet = enter.call(context, node, item, list);
|
||||
|
||||
if (iterators.hasOwnProperty(node.type)) {
|
||||
iterators[node.type](node, context, walkNode);
|
||||
if (enterRet === breakWalk) {
|
||||
debugger;
|
||||
return true;
|
||||
}
|
||||
|
||||
leave.call(context, node, item, list);
|
||||
if (enterRet === skipNode) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (iterators.hasOwnProperty(node.type)) {
|
||||
if (iterators[node.type](node, context, walkNode, walkReducer)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (leave.call(context, node, item, list) === breakWalk) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
var walkReducer = (ret, data, item, list) => ret || walkNode(data, item, list);
|
||||
var enter = noop;
|
||||
var leave = noop;
|
||||
var iterators = iteratorsNatural;
|
||||
var context = {
|
||||
break: breakWalk,
|
||||
skip: skipNode,
|
||||
|
||||
root: root,
|
||||
stylesheet: null,
|
||||
atrule: null,
|
||||
@@ -210,22 +233,19 @@ module.exports = function createWalker(config) {
|
||||
throw new Error('Neither `enter` nor `leave` walker handler is set or both aren\'t a function');
|
||||
}
|
||||
|
||||
// swap handlers in reverse mode to invert visit order
|
||||
if (options.reverse) {
|
||||
var tmp = enter;
|
||||
enter = leave;
|
||||
leave = tmp;
|
||||
}
|
||||
|
||||
walkNode(root);
|
||||
};
|
||||
|
||||
walk.break = breakWalk;
|
||||
walk.skip = skipNode;
|
||||
|
||||
walk.find = function(ast, fn) {
|
||||
var found = null;
|
||||
|
||||
walk(ast, function(node, item, list) {
|
||||
if (found === null && fn.call(this, node, item, list)) {
|
||||
if (fn.call(this, node, item, list)) {
|
||||
found = node;
|
||||
return breakWalk;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -238,8 +258,9 @@ module.exports = function createWalker(config) {
|
||||
walk(ast, {
|
||||
reverse: true,
|
||||
enter: function(node, item, list) {
|
||||
if (found === null && fn.call(this, node, item, list)) {
|
||||
if (fn.call(this, node, item, list)) {
|
||||
found = node;
|
||||
return breakWalk;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
+26
-28
@@ -1,59 +1,56 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"css-tree@1.0.0-alpha.39",
|
||||
"/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series"
|
||||
"css-tree@1.1.3",
|
||||
"/home/node/nuxt"
|
||||
]
|
||||
],
|
||||
"_from": "css-tree@1.0.0-alpha.39",
|
||||
"_id": "css-tree@1.0.0-alpha.39",
|
||||
"_from": "css-tree@1.1.3",
|
||||
"_id": "css-tree@1.1.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-7UvkEYgBAHRG9Nt980lYxjsTrCyHFN53ky3wVsDkiMdVqylqRt+Zc+jm5qw7/qyOvN2dHSYtX0e4MbCCExSvnA==",
|
||||
"_integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==",
|
||||
"_location": "/csso/css-tree",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "css-tree@1.0.0-alpha.39",
|
||||
"raw": "css-tree@1.1.3",
|
||||
"name": "css-tree",
|
||||
"escapedName": "css-tree",
|
||||
"rawSpec": "1.0.0-alpha.39",
|
||||
"rawSpec": "1.1.3",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.0.0-alpha.39"
|
||||
"fetchSpec": "1.1.3"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/csso"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.39.tgz",
|
||||
"_spec": "1.0.0-alpha.39",
|
||||
"_where": "/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series",
|
||||
"_resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz",
|
||||
"_spec": "1.1.3",
|
||||
"_where": "/home/node/nuxt",
|
||||
"author": {
|
||||
"name": "Roman Dvornov",
|
||||
"email": "rdvornov@gmail.com",
|
||||
"url": "https://github.com/lahmatiy"
|
||||
},
|
||||
"browser": {
|
||||
"./data": "./dist/default-syntax.json"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/csstree/csstree/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"mdn-data": "2.0.6",
|
||||
"mdn-data": "2.0.14",
|
||||
"source-map": "^0.6.1"
|
||||
},
|
||||
"description": "CSSTree is a tool set to work with CSS, including fast detailed parser (string->AST), walker (AST traversal), generator (AST->string) and lexer (validation and matching) based on knowledge of spec and browser implementations",
|
||||
"description": "A tool set for CSS: fast detailed parser (CSS → AST), walker (AST traversal), generator (AST → CSS) and lexer (validation and matching) based on specs and browser implementations",
|
||||
"devDependencies": {
|
||||
"coveralls": "^3.0.4",
|
||||
"eslint": "^6.3.0",
|
||||
"@rollup/plugin-commonjs": "^11.0.2",
|
||||
"@rollup/plugin-json": "^4.0.2",
|
||||
"@rollup/plugin-node-resolve": "^7.1.1",
|
||||
"coveralls": "^3.0.9",
|
||||
"eslint": "^6.8.0",
|
||||
"json-to-ast": "^2.1.0",
|
||||
"mocha": "^5.2.0",
|
||||
"mocha": "^6.2.3",
|
||||
"nyc": "^14.1.1",
|
||||
"rollup": "^1.22.0",
|
||||
"rollup-plugin-commonjs": "^10.1.0",
|
||||
"rollup-plugin-json": "^4.0.0",
|
||||
"rollup-plugin-node-resolve": "^5.2.0",
|
||||
"terser": "^4.3.4"
|
||||
"rollup": "^1.32.1",
|
||||
"rollup-plugin-terser": "^5.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
@@ -64,6 +61,7 @@
|
||||
"lib"
|
||||
],
|
||||
"homepage": "https://github.com/csstree/csstree#readme",
|
||||
"jsdelivr": "dist/csstree.min.js",
|
||||
"keywords": [
|
||||
"css",
|
||||
"ast",
|
||||
@@ -77,17 +75,16 @@
|
||||
"validation"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./lib/index",
|
||||
"main": "lib/index.js",
|
||||
"name": "css-tree",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/csstree/csstree.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run gen:syntax && rollup --config && terser dist/csstree.js --compress --mangle -o dist/csstree.min.js",
|
||||
"build": "rollup --config",
|
||||
"coverage": "nyc npm test",
|
||||
"coveralls": "nyc report --reporter=text-lcov | coveralls",
|
||||
"gen:syntax": "node scripts/gen-syntax-data",
|
||||
"hydrogen": "node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm --trace_hydrogen_file=code.cfg --print-opt-code bin/parse --stat -o /dev/null",
|
||||
"lint": "eslint data lib scripts test && node scripts/review-syntax-patch --lint && node scripts/update-docs --lint",
|
||||
"lint-and-test": "npm run lint && npm test",
|
||||
@@ -97,5 +94,6 @@
|
||||
"travis": "nyc npm run lint-and-test && npm run coveralls",
|
||||
"update:docs": "node scripts/update-docs"
|
||||
},
|
||||
"version": "1.0.0-alpha.39"
|
||||
"unpkg": "dist/csstree.min.js",
|
||||
"version": "1.1.3"
|
||||
}
|
||||
|
||||
+2560
-2529
File diff suppressed because it is too large
Load Diff
+69
-4
@@ -19,7 +19,7 @@
|
||||
"additive-symbols": {
|
||||
"syntax": "[ <integer> && <symbol> ]#",
|
||||
"media": "all",
|
||||
"initial": "N/A",
|
||||
"initial": "n/a (required)",
|
||||
"percentages": "no",
|
||||
"computed": "asSpecified",
|
||||
"order": "orderOfAppearance",
|
||||
@@ -91,7 +91,7 @@
|
||||
"symbols": {
|
||||
"syntax": "<symbol>+",
|
||||
"media": "all",
|
||||
"initial": "N/A",
|
||||
"initial": "n/a (required)",
|
||||
"percentages": "no",
|
||||
"computed": "asSpecified",
|
||||
"order": "orderOfAppearance",
|
||||
@@ -298,7 +298,7 @@
|
||||
"percentages": "no",
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"status": "experimental"
|
||||
"status": "standard"
|
||||
},
|
||||
"marks": {
|
||||
"syntax": "none | [ crop || cross ]",
|
||||
@@ -310,12 +310,65 @@
|
||||
"percentages": "no",
|
||||
"computed": "asSpecified",
|
||||
"order": "orderOfAppearance",
|
||||
"status": "experimental"
|
||||
"status": "standard"
|
||||
},
|
||||
"size": {
|
||||
"syntax": "<length>{1,2} | auto | [ <page-size> || [ portrait | landscape ] ]",
|
||||
"media": [
|
||||
"visual",
|
||||
"paged"
|
||||
],
|
||||
"initial": "auto",
|
||||
"percentages": "no",
|
||||
"computed": "asSpecifiedRelativeToAbsoluteLengths",
|
||||
"order": "orderOfAppearance",
|
||||
"status": "standard"
|
||||
}
|
||||
},
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/@page"
|
||||
},
|
||||
"@property": {
|
||||
"syntax": "@property <custom-property-name> {\n <declaration-list>\n}",
|
||||
"interfaces": [
|
||||
"CSS",
|
||||
"CSSPropertyRule"
|
||||
],
|
||||
"groups": [
|
||||
"CSS Houdini"
|
||||
],
|
||||
"descriptors": {
|
||||
"syntax": {
|
||||
"syntax": "<string>",
|
||||
"media": "all",
|
||||
"percentages": "no",
|
||||
"initial": "n/a (required)",
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"status": "experimental"
|
||||
},
|
||||
"inherits": {
|
||||
"syntax": "true | false",
|
||||
"media": "all",
|
||||
"percentages": "no",
|
||||
"initial": "auto",
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"status": "experimental"
|
||||
},
|
||||
"initial-value": {
|
||||
"syntax": "<string>",
|
||||
"media": "all",
|
||||
"initial": "n/a (required)",
|
||||
"percentages": "no",
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"status": "experimental"
|
||||
}
|
||||
},
|
||||
"status": "experimental",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/@property"
|
||||
},
|
||||
"@supports": {
|
||||
"syntax": "@supports <supports-condition> {\n <group-rule-body>\n}",
|
||||
"interfaces": [
|
||||
@@ -455,6 +508,18 @@
|
||||
"order": "uniqueOrder",
|
||||
"status": "standard"
|
||||
},
|
||||
"viewport-fit": {
|
||||
"syntax": "auto | contain | cover",
|
||||
"media": [
|
||||
"visual",
|
||||
"continuous"
|
||||
],
|
||||
"initial": "auto",
|
||||
"percentages": "no",
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"status": "standard"
|
||||
},
|
||||
"width": {
|
||||
"syntax": "<viewport-length>{1,2}",
|
||||
"media": [
|
||||
|
||||
+3
@@ -25,6 +25,7 @@
|
||||
"CSS Frequencies",
|
||||
"CSS Generated Content",
|
||||
"CSS Grid Layout",
|
||||
"CSS Houdini",
|
||||
"CSS Images",
|
||||
"CSS Inline",
|
||||
"CSS Lengths",
|
||||
@@ -61,10 +62,12 @@
|
||||
"CSSOM View",
|
||||
"Filter Effects",
|
||||
"Grouping Selectors",
|
||||
"MathML",
|
||||
"Media Queries",
|
||||
"Microsoft Extensions",
|
||||
"Mozilla Extensions",
|
||||
"Pointer Events",
|
||||
"Pseudo",
|
||||
"Pseudo-classes",
|
||||
"Pseudo-elements",
|
||||
"Selectors",
|
||||
|
||||
+304
-95
@@ -238,6 +238,38 @@
|
||||
"status": "nonstandard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/-ms-flow-into"
|
||||
},
|
||||
"-ms-grid-columns": {
|
||||
"syntax": "none | <track-list> | <auto-track-list>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "simpleListOfLpcDifferenceLpc",
|
||||
"percentages": "referToDimensionOfContentArea",
|
||||
"groups": [
|
||||
"CSS Grid Layout"
|
||||
],
|
||||
"initial": "none",
|
||||
"appliesto": "gridContainers",
|
||||
"computed": "asSpecifiedRelativeToAbsoluteLengths",
|
||||
"order": "uniqueOrder",
|
||||
"status": "nonstandard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/-ms-grid-columns"
|
||||
},
|
||||
"-ms-grid-rows": {
|
||||
"syntax": "none | <track-list> | <auto-track-list>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "simpleListOfLpcDifferenceLpc",
|
||||
"percentages": "referToDimensionOfContentArea",
|
||||
"groups": [
|
||||
"CSS Grid Layout"
|
||||
],
|
||||
"initial": "none",
|
||||
"appliesto": "gridContainers",
|
||||
"computed": "asSpecifiedRelativeToAbsoluteLengths",
|
||||
"order": "uniqueOrder",
|
||||
"status": "nonstandard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/-ms-grid-rows"
|
||||
},
|
||||
"-ms-high-contrast-adjust": {
|
||||
"syntax": "auto | none",
|
||||
"media": "visual",
|
||||
@@ -803,7 +835,7 @@
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"status": "nonstandard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/-moz-appearance"
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/appearance"
|
||||
},
|
||||
"-moz-binding": {
|
||||
"syntax": "<url> | none",
|
||||
@@ -918,7 +950,7 @@
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/-moz-float-edge"
|
||||
},
|
||||
"-moz-force-broken-image-icon": {
|
||||
"syntax": "<integer>",
|
||||
"syntax": "<integer [0,1]>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
@@ -1178,7 +1210,7 @@
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/-moz-window-shadow"
|
||||
},
|
||||
"-webkit-appearance": {
|
||||
"syntax": "none | button | button-bevel | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield",
|
||||
"syntax": "none | button | button-bevel | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
@@ -1191,7 +1223,7 @@
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"status": "nonstandard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/-moz-appearance"
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/appearance"
|
||||
},
|
||||
"-webkit-border-before": {
|
||||
"syntax": "<'border-width'> || <'border-style'> || <'color'>",
|
||||
@@ -1703,6 +1735,22 @@
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/align-self"
|
||||
},
|
||||
"align-tracks": {
|
||||
"syntax": "[ normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position> ]#",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"percentages": "no",
|
||||
"groups": [
|
||||
"CSS Grid Layout"
|
||||
],
|
||||
"initial": "normal",
|
||||
"appliesto": "gridContainersWithMasonryLayoutInTheirBlockAxis",
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"status": "experimental",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/align-tracks"
|
||||
},
|
||||
"all": {
|
||||
"syntax": "initial | inherit | unset | revert",
|
||||
"media": "noPracticalMedia",
|
||||
@@ -1882,7 +1930,7 @@
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/animation-timing-function"
|
||||
},
|
||||
"appearance": {
|
||||
"syntax": "none | auto | button | textfield | <compat>",
|
||||
"syntax": "none | auto | textfield | menulist-button | <compat-auto>",
|
||||
"media": "all",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
@@ -1895,7 +1943,7 @@
|
||||
"computed": "asSpecified",
|
||||
"order": "perGrammar",
|
||||
"status": "experimental",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/-moz-appearance"
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/appearance"
|
||||
},
|
||||
"aspect-ratio": {
|
||||
"syntax": "auto | <ratio>",
|
||||
@@ -1942,7 +1990,7 @@
|
||||
"appliesto": "allElementsSVGContainerElements",
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"status": "experimental",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/backdrop-filter"
|
||||
},
|
||||
"backface-visibility": {
|
||||
@@ -2159,7 +2207,7 @@
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/background-position"
|
||||
},
|
||||
"background-position-x": {
|
||||
"syntax": "[ center | [ left | right | x-start | x-end ]? <length-percentage>? ]#",
|
||||
"syntax": "[ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
@@ -2175,7 +2223,7 @@
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/background-position-x"
|
||||
},
|
||||
"background-position-y": {
|
||||
"syntax": "[ center | [ top | bottom | y-start | y-end ]? <length-percentage>? ]#",
|
||||
"syntax": "[ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
@@ -2251,7 +2299,7 @@
|
||||
"syntax": "<'width'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "lpc",
|
||||
"percentages": "blockSizeOfContainingBlock",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -2370,7 +2418,11 @@
|
||||
"syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": [
|
||||
"border-block-end-color",
|
||||
"border-block-end-style",
|
||||
"border-block-end-width"
|
||||
],
|
||||
"percentages": "no",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -2394,7 +2446,7 @@
|
||||
"syntax": "<'border-top-color'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "color",
|
||||
"percentages": "no",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -2426,7 +2478,7 @@
|
||||
"syntax": "<'border-top-width'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "length",
|
||||
"percentages": "logicalWidthOfContainingBlock",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -2442,7 +2494,11 @@
|
||||
"syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": [
|
||||
"border-block-start-color",
|
||||
"border-block-start-style",
|
||||
"border-block-start-width"
|
||||
],
|
||||
"percentages": "no",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -2466,7 +2522,7 @@
|
||||
"syntax": "<'border-top-color'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "color",
|
||||
"percentages": "no",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -2498,7 +2554,7 @@
|
||||
"syntax": "<'border-top-width'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "length",
|
||||
"percentages": "logicalWidthOfContainingBlock",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -2881,7 +2937,11 @@
|
||||
"syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": [
|
||||
"border-inline-end-color",
|
||||
"border-inline-end-style",
|
||||
"border-inline-end-width"
|
||||
],
|
||||
"percentages": "no",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -2953,7 +3013,7 @@
|
||||
"syntax": "<'border-top-color'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "color",
|
||||
"percentages": "no",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -2985,7 +3045,7 @@
|
||||
"syntax": "<'border-top-width'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "length",
|
||||
"percentages": "logicalWidthOfContainingBlock",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -3001,7 +3061,11 @@
|
||||
"syntax": "<'border-top-width'> || <'border-top-style'> || <'color'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": [
|
||||
"border-inline-start-color",
|
||||
"border-inline-start-style",
|
||||
"border-inline-start-width"
|
||||
],
|
||||
"percentages": "no",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -3025,7 +3089,7 @@
|
||||
"syntax": "<'border-top-color'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "color",
|
||||
"percentages": "no",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -3057,7 +3121,7 @@
|
||||
"syntax": "<'border-top-width'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "length",
|
||||
"percentages": "logicalWidthOfContainingBlock",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -4084,7 +4148,7 @@
|
||||
"appliesto": "allElements",
|
||||
"computed": "asSpecified",
|
||||
"order": "perGrammar",
|
||||
"status": "experimental",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/contain"
|
||||
},
|
||||
"content": {
|
||||
@@ -4551,7 +4615,7 @@
|
||||
"::first-line",
|
||||
"::placeholder"
|
||||
],
|
||||
"status": "experimental",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/font-variation-settings"
|
||||
},
|
||||
"font-size": {
|
||||
@@ -4596,6 +4660,22 @@
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/font-size-adjust"
|
||||
},
|
||||
"font-smooth": {
|
||||
"syntax": "auto | never | always | <absolute-size> | <length>",
|
||||
"media": "visual",
|
||||
"inherited": true,
|
||||
"animationType": "discrete",
|
||||
"percentages": "no",
|
||||
"groups": [
|
||||
"CSS Fonts"
|
||||
],
|
||||
"initial": "auto",
|
||||
"appliesto": "allElements",
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"status": "nonstandard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/font-smooth"
|
||||
},
|
||||
"font-stretch": {
|
||||
"syntax": "<font-stretch-absolute>",
|
||||
"media": "visual",
|
||||
@@ -4843,7 +4923,7 @@
|
||||
"row-gap",
|
||||
"column-gap"
|
||||
],
|
||||
"appliesto": "gridContainers",
|
||||
"appliesto": "multiColumnElementsFlexContainersGridContainers",
|
||||
"computed": [
|
||||
"row-gap",
|
||||
"column-gap"
|
||||
@@ -5226,7 +5306,7 @@
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation"
|
||||
},
|
||||
"height": {
|
||||
"syntax": "[ <length> | <percentage> ] && [ border-box | content-box ]? | available | min-content | max-content | fit-content | auto",
|
||||
"syntax": "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "lpc",
|
||||
@@ -5266,7 +5346,7 @@
|
||||
"groups": [
|
||||
"CSS Images"
|
||||
],
|
||||
"initial": "0deg",
|
||||
"initial": "from-image",
|
||||
"appliesto": "allElements",
|
||||
"computed": "angleRoundedToNextQuarter",
|
||||
"order": "uniqueOrder",
|
||||
@@ -5356,7 +5436,7 @@
|
||||
"syntax": "<'width'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "lpc",
|
||||
"percentages": "inlineSizeOfContainingBlock",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -5544,6 +5624,22 @@
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/justify-self"
|
||||
},
|
||||
"justify-tracks": {
|
||||
"syntax": "[ normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ] ]#",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"percentages": "no",
|
||||
"groups": [
|
||||
"CSS Grid Layout"
|
||||
],
|
||||
"initial": "normal",
|
||||
"appliesto": "gridContainersWithMasonryLayoutInTheirInlineAxis",
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"status": "experimental",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/justify-tracks"
|
||||
},
|
||||
"left": {
|
||||
"syntax": "<length> | <percentage> | auto",
|
||||
"media": "visual",
|
||||
@@ -5583,7 +5679,7 @@
|
||||
"line-break": {
|
||||
"syntax": "auto | loose | normal | strict | anywhere",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"inherited": true,
|
||||
"animationType": "discrete",
|
||||
"percentages": "no",
|
||||
"groups": [
|
||||
@@ -5744,7 +5840,8 @@
|
||||
],
|
||||
"order": "uniqueOrder",
|
||||
"alsoAppliesTo": [
|
||||
"::first-letter"
|
||||
"::first-letter",
|
||||
"::first-line"
|
||||
],
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/margin"
|
||||
@@ -5769,7 +5866,7 @@
|
||||
"syntax": "<'margin-left'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "length",
|
||||
"percentages": "dependsOnLayoutModel",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -5785,7 +5882,7 @@
|
||||
"syntax": "<'margin-left'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "length",
|
||||
"percentages": "dependsOnLayoutModel",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -5811,7 +5908,8 @@
|
||||
"computed": "percentageAsSpecifiedOrAbsoluteLength",
|
||||
"order": "uniqueOrder",
|
||||
"alsoAppliesTo": [
|
||||
"::first-letter"
|
||||
"::first-letter",
|
||||
"::first-line"
|
||||
],
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/margin-bottom"
|
||||
@@ -5836,7 +5934,7 @@
|
||||
"syntax": "<'margin-left'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "length",
|
||||
"percentages": "dependsOnLayoutModel",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -5852,7 +5950,7 @@
|
||||
"syntax": "<'margin-left'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "length",
|
||||
"percentages": "dependsOnLayoutModel",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -5878,7 +5976,8 @@
|
||||
"computed": "percentageAsSpecifiedOrAbsoluteLength",
|
||||
"order": "uniqueOrder",
|
||||
"alsoAppliesTo": [
|
||||
"::first-letter"
|
||||
"::first-letter",
|
||||
"::first-line"
|
||||
],
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/margin-left"
|
||||
@@ -5897,7 +5996,8 @@
|
||||
"computed": "percentageAsSpecifiedOrAbsoluteLength",
|
||||
"order": "uniqueOrder",
|
||||
"alsoAppliesTo": [
|
||||
"::first-letter"
|
||||
"::first-letter",
|
||||
"::first-line"
|
||||
],
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/margin-right"
|
||||
@@ -5916,11 +6016,32 @@
|
||||
"computed": "percentageAsSpecifiedOrAbsoluteLength",
|
||||
"order": "uniqueOrder",
|
||||
"alsoAppliesTo": [
|
||||
"::first-letter"
|
||||
"::first-letter",
|
||||
"::first-line"
|
||||
],
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/margin-top"
|
||||
},
|
||||
"margin-trim": {
|
||||
"syntax": "none | in-flow | all",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"percentages": "no",
|
||||
"groups": [
|
||||
"CSS Box Model"
|
||||
],
|
||||
"initial": "none",
|
||||
"appliesto": "blockContainersAndMultiColumnContainers",
|
||||
"computed": "asSpecified",
|
||||
"order": "perGrammar",
|
||||
"alsoAppliesTo": [
|
||||
"::first-letter",
|
||||
"::first-line"
|
||||
],
|
||||
"status": "experimental",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/margin-trim"
|
||||
},
|
||||
"mask": {
|
||||
"syntax": "<mask-layer>#",
|
||||
"media": "visual",
|
||||
@@ -6005,7 +6126,7 @@
|
||||
],
|
||||
"order": "perGrammar",
|
||||
"stacking": true,
|
||||
"status": "experimental",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/mask-border"
|
||||
},
|
||||
"mask-border-mode": {
|
||||
@@ -6021,7 +6142,7 @@
|
||||
"appliesto": "allElementsSVGContainerElements",
|
||||
"computed": "asSpecified",
|
||||
"order": "perGrammar",
|
||||
"status": "experimental",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/mask-border-mode"
|
||||
},
|
||||
"mask-border-outset": {
|
||||
@@ -6037,7 +6158,7 @@
|
||||
"appliesto": "allElementsSVGContainerElements",
|
||||
"computed": "asSpecifiedRelativeToAbsoluteLengths",
|
||||
"order": "perGrammar",
|
||||
"status": "experimental",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/mask-border-outset"
|
||||
},
|
||||
"mask-border-repeat": {
|
||||
@@ -6053,7 +6174,7 @@
|
||||
"appliesto": "allElementsSVGContainerElements",
|
||||
"computed": "asSpecified",
|
||||
"order": "perGrammar",
|
||||
"status": "experimental",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/mask-border-repeat"
|
||||
},
|
||||
"mask-border-slice": {
|
||||
@@ -6069,7 +6190,7 @@
|
||||
"appliesto": "allElementsSVGContainerElements",
|
||||
"computed": "asSpecified",
|
||||
"order": "perGrammar",
|
||||
"status": "experimental",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/mask-border-slice"
|
||||
},
|
||||
"mask-border-source": {
|
||||
@@ -6085,7 +6206,7 @@
|
||||
"appliesto": "allElementsSVGContainerElements",
|
||||
"computed": "asSpecifiedURLsAbsolute",
|
||||
"order": "perGrammar",
|
||||
"status": "experimental",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/mask-border-source"
|
||||
},
|
||||
"mask-border-width": {
|
||||
@@ -6101,7 +6222,7 @@
|
||||
"appliesto": "allElementsSVGContainerElements",
|
||||
"computed": "asSpecifiedRelativeToAbsoluteLengths",
|
||||
"order": "perGrammar",
|
||||
"status": "experimental",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/mask-border-width"
|
||||
},
|
||||
"mask-clip": {
|
||||
@@ -6248,11 +6369,43 @@
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/mask-type"
|
||||
},
|
||||
"masonry-auto-flow": {
|
||||
"syntax": "[ pack | next ] || [ definite-first | ordered ]",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"percentages": "no",
|
||||
"groups": [
|
||||
"CSS Grid Layout"
|
||||
],
|
||||
"initial": "pack",
|
||||
"appliesto": "gridContainersWithMasonryLayout",
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"status": "experimental",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/masonry-auto-flow"
|
||||
},
|
||||
"math-style": {
|
||||
"syntax": "normal | compact",
|
||||
"media": "visual",
|
||||
"inherited": true,
|
||||
"animationType": "notAnimatable",
|
||||
"percentages": "no",
|
||||
"groups": [
|
||||
"MathML"
|
||||
],
|
||||
"initial": "normal",
|
||||
"appliesto": "allElements",
|
||||
"computed": "asSpecified",
|
||||
"order": "perGrammar",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/math-style"
|
||||
},
|
||||
"max-block-size": {
|
||||
"syntax": "<'max-width'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "lpc",
|
||||
"percentages": "blockSizeOfContainingBlock",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -6261,11 +6414,11 @@
|
||||
"appliesto": "sameAsWidthAndHeight",
|
||||
"computed": "sameAsMaxWidthAndMaxHeight",
|
||||
"order": "uniqueOrder",
|
||||
"status": "experimental",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/max-block-size"
|
||||
},
|
||||
"max-height": {
|
||||
"syntax": "<length> | <percentage> | none | max-content | min-content | fit-content | fill-available",
|
||||
"syntax": "none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "lpc",
|
||||
@@ -6284,7 +6437,7 @@
|
||||
"syntax": "<'max-width'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "lpc",
|
||||
"percentages": "inlineSizeOfContainingBlock",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -6293,7 +6446,7 @@
|
||||
"appliesto": "sameAsWidthAndHeight",
|
||||
"computed": "sameAsMaxWidthAndMaxHeight",
|
||||
"order": "uniqueOrder",
|
||||
"status": "experimental",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/max-inline-size"
|
||||
},
|
||||
"max-lines": {
|
||||
@@ -6312,7 +6465,7 @@
|
||||
"status": "experimental"
|
||||
},
|
||||
"max-width": {
|
||||
"syntax": "<length> | <percentage> | none | max-content | min-content | fit-content | fill-available",
|
||||
"syntax": "none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "lpc",
|
||||
@@ -6331,7 +6484,7 @@
|
||||
"syntax": "<'min-width'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "lpc",
|
||||
"percentages": "blockSizeOfContainingBlock",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -6344,7 +6497,7 @@
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/min-block-size"
|
||||
},
|
||||
"min-height": {
|
||||
"syntax": "<length> | <percentage> | auto | max-content | min-content | fit-content | fill-available",
|
||||
"syntax": "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "lpc",
|
||||
@@ -6363,7 +6516,7 @@
|
||||
"syntax": "<'min-width'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "lpc",
|
||||
"percentages": "inlineSizeOfContainingBlock",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -6376,7 +6529,7 @@
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/min-inline-size"
|
||||
},
|
||||
"min-width": {
|
||||
"syntax": "<length> | <percentage> | auto | max-content | min-content | fit-content | fill-available",
|
||||
"syntax": "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "lpc",
|
||||
@@ -6476,7 +6629,7 @@
|
||||
],
|
||||
"order": "perGrammar",
|
||||
"stacking": true,
|
||||
"status": "experimental",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/offset"
|
||||
},
|
||||
"offset-anchor": {
|
||||
@@ -6492,7 +6645,7 @@
|
||||
"appliesto": "transformableElements",
|
||||
"computed": "forLengthAbsoluteValueOtherwisePercentage",
|
||||
"order": "perGrammar",
|
||||
"status": "experimental"
|
||||
"status": "standard"
|
||||
},
|
||||
"offset-distance": {
|
||||
"syntax": "<length-percentage>",
|
||||
@@ -6507,11 +6660,11 @@
|
||||
"appliesto": "transformableElements",
|
||||
"computed": "forLengthAbsoluteValueOtherwisePercentage",
|
||||
"order": "perGrammar",
|
||||
"status": "experimental",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/offset-distance"
|
||||
},
|
||||
"offset-path": {
|
||||
"syntax": "none | ray( [ <angle> && <size>? && contain? ] ) | <path()> | <url> | [ <basic-shape> || <geometry-box> ]",
|
||||
"syntax": "none | ray( [ <angle> && <size> && contain? ] ) | <path()> | <url> | [ <basic-shape> || <geometry-box> ]",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "angleOrBasicShapeOrPath",
|
||||
@@ -6524,7 +6677,7 @@
|
||||
"computed": "asSpecified",
|
||||
"order": "perGrammar",
|
||||
"stacking": true,
|
||||
"status": "experimental",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/offset-path"
|
||||
},
|
||||
"offset-position": {
|
||||
@@ -6555,7 +6708,7 @@
|
||||
"appliesto": "transformableElements",
|
||||
"computed": "asSpecified",
|
||||
"order": "perGrammar",
|
||||
"status": "experimental",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/offset-rotate"
|
||||
},
|
||||
"opacity": {
|
||||
@@ -6587,7 +6740,7 @@
|
||||
"CSS Flexible Box Layout"
|
||||
],
|
||||
"initial": "0",
|
||||
"appliesto": "flexItemsAndAbsolutelyPositionedFlexContainerChildren",
|
||||
"appliesto": "flexItemsGridItemsAbsolutelyPositionedContainerChildren",
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"status": "standard",
|
||||
@@ -6727,7 +6880,10 @@
|
||||
],
|
||||
"initial": "visible",
|
||||
"appliesto": "blockContainersFlexContainersGridContainers",
|
||||
"computed": "asSpecified",
|
||||
"computed": [
|
||||
"overflow-x",
|
||||
"overflow-y"
|
||||
],
|
||||
"order": "uniqueOrder",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/overflow"
|
||||
@@ -6745,7 +6901,7 @@
|
||||
"appliesto": "allElements",
|
||||
"computed": "asSpecified",
|
||||
"order": "perGrammar",
|
||||
"status": "experimental"
|
||||
"status": "standard"
|
||||
},
|
||||
"overflow-block": {
|
||||
"syntax": "visible | hidden | clip | scroll | auto",
|
||||
@@ -6758,9 +6914,9 @@
|
||||
],
|
||||
"initial": "auto",
|
||||
"appliesto": "blockContainersFlexContainersGridContainers",
|
||||
"computed": "asSpecified",
|
||||
"computed": "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
|
||||
"order": "perGrammar",
|
||||
"status": "experimental"
|
||||
"status": "standard"
|
||||
},
|
||||
"overflow-clip-box": {
|
||||
"syntax": "padding-box | content-box",
|
||||
@@ -6789,9 +6945,9 @@
|
||||
],
|
||||
"initial": "auto",
|
||||
"appliesto": "blockContainersFlexContainersGridContainers",
|
||||
"computed": "asSpecified",
|
||||
"computed": "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
|
||||
"order": "perGrammar",
|
||||
"status": "experimental"
|
||||
"status": "standard"
|
||||
},
|
||||
"overflow-wrap": {
|
||||
"syntax": "normal | break-word | anywhere",
|
||||
@@ -6820,7 +6976,7 @@
|
||||
],
|
||||
"initial": "visible",
|
||||
"appliesto": "blockContainersFlexContainersGridContainers",
|
||||
"computed": "asSpecified",
|
||||
"computed": "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
|
||||
"order": "uniqueOrder",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/overflow-x"
|
||||
@@ -6836,7 +6992,7 @@
|
||||
],
|
||||
"initial": "visible",
|
||||
"appliesto": "blockContainersFlexContainersGridContainers",
|
||||
"computed": "asSpecified",
|
||||
"computed": "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
|
||||
"order": "uniqueOrder",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/overflow-y"
|
||||
@@ -6854,9 +7010,41 @@
|
||||
"appliesto": "nonReplacedBlockAndInlineBlockElements",
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"status": "nonstandard",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior"
|
||||
},
|
||||
"overscroll-behavior-block": {
|
||||
"syntax": "contain | none | auto",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"percentages": "no",
|
||||
"groups": [
|
||||
"CSS Box Model"
|
||||
],
|
||||
"initial": "auto",
|
||||
"appliesto": "nonReplacedBlockAndInlineBlockElements",
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block"
|
||||
},
|
||||
"overscroll-behavior-inline": {
|
||||
"syntax": "contain | none | auto",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"percentages": "no",
|
||||
"groups": [
|
||||
"CSS Box Model"
|
||||
],
|
||||
"initial": "auto",
|
||||
"appliesto": "nonReplacedBlockAndInlineBlockElements",
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline"
|
||||
},
|
||||
"overscroll-behavior-x": {
|
||||
"syntax": "contain | none | auto",
|
||||
"media": "visual",
|
||||
@@ -6870,7 +7058,7 @@
|
||||
"appliesto": "nonReplacedBlockAndInlineBlockElements",
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"status": "nonstandard",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x"
|
||||
},
|
||||
"overscroll-behavior-y": {
|
||||
@@ -6886,7 +7074,7 @@
|
||||
"appliesto": "nonReplacedBlockAndInlineBlockElements",
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"status": "nonstandard",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y"
|
||||
},
|
||||
"padding": {
|
||||
@@ -6913,7 +7101,8 @@
|
||||
],
|
||||
"order": "uniqueOrder",
|
||||
"alsoAppliesTo": [
|
||||
"::first-letter"
|
||||
"::first-letter",
|
||||
"::first-line"
|
||||
],
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/padding"
|
||||
@@ -6938,7 +7127,7 @@
|
||||
"syntax": "<'padding-left'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "length",
|
||||
"percentages": "logicalWidthOfContainingBlock",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -6954,7 +7143,7 @@
|
||||
"syntax": "<'padding-left'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "length",
|
||||
"percentages": "logicalWidthOfContainingBlock",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -6980,7 +7169,8 @@
|
||||
"computed": "percentageAsSpecifiedOrAbsoluteLength",
|
||||
"order": "uniqueOrder",
|
||||
"alsoAppliesTo": [
|
||||
"::first-letter"
|
||||
"::first-letter",
|
||||
"::first-line"
|
||||
],
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/padding-bottom"
|
||||
@@ -7005,7 +7195,7 @@
|
||||
"syntax": "<'padding-left'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "length",
|
||||
"percentages": "logicalWidthOfContainingBlock",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -7021,7 +7211,7 @@
|
||||
"syntax": "<'padding-left'>",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"animationType": "length",
|
||||
"percentages": "logicalWidthOfContainingBlock",
|
||||
"groups": [
|
||||
"CSS Logical Properties"
|
||||
@@ -7047,7 +7237,8 @@
|
||||
"computed": "percentageAsSpecifiedOrAbsoluteLength",
|
||||
"order": "uniqueOrder",
|
||||
"alsoAppliesTo": [
|
||||
"::first-letter"
|
||||
"::first-letter",
|
||||
"::first-line"
|
||||
],
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/padding-left"
|
||||
@@ -7066,7 +7257,8 @@
|
||||
"computed": "percentageAsSpecifiedOrAbsoluteLength",
|
||||
"order": "uniqueOrder",
|
||||
"alsoAppliesTo": [
|
||||
"::first-letter"
|
||||
"::first-letter",
|
||||
"::first-line"
|
||||
],
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/padding-right"
|
||||
@@ -7085,7 +7277,8 @@
|
||||
"computed": "percentageAsSpecifiedOrAbsoluteLength",
|
||||
"order": "uniqueOrder",
|
||||
"alsoAppliesTo": [
|
||||
"::first-letter"
|
||||
"::first-letter",
|
||||
"::first-line"
|
||||
],
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/padding-top"
|
||||
@@ -7160,7 +7353,7 @@
|
||||
"appliesto": "textElements",
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"status": "experimental",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/paint-order"
|
||||
},
|
||||
"perspective": {
|
||||
@@ -7450,6 +7643,22 @@
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-color"
|
||||
},
|
||||
"scrollbar-gutter": {
|
||||
"syntax": "auto | [ stable | always ] && both? && force?",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
"percentages": "no",
|
||||
"groups": [
|
||||
"CSS Overflow"
|
||||
],
|
||||
"initial": "auto",
|
||||
"appliesto": "allElements",
|
||||
"computed": "asSpecified",
|
||||
"order": "perGrammar",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter"
|
||||
},
|
||||
"scrollbar-width": {
|
||||
"syntax": "auto | thin | none",
|
||||
"media": "visual",
|
||||
@@ -8097,7 +8306,7 @@
|
||||
"syntax": "none | all | [ digits <integer>? ]",
|
||||
"media": "visual",
|
||||
"inherited": true,
|
||||
"animationType": "discrete",
|
||||
"animationType": "notAnimatable",
|
||||
"percentages": "no",
|
||||
"groups": [
|
||||
"CSS Writing Modes"
|
||||
@@ -8203,7 +8412,7 @@
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip"
|
||||
},
|
||||
"text-decoration-skip-ink": {
|
||||
"syntax": "auto | none",
|
||||
"syntax": "auto | all | none",
|
||||
"media": "visual",
|
||||
"inherited": true,
|
||||
"animationType": "discrete",
|
||||
@@ -8215,7 +8424,7 @@
|
||||
"appliesto": "allElements",
|
||||
"computed": "asSpecified",
|
||||
"order": "orderOfAppearance",
|
||||
"status": "experimental",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink"
|
||||
},
|
||||
"text-decoration-style": {
|
||||
@@ -8240,11 +8449,11 @@
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/text-decoration-style"
|
||||
},
|
||||
"text-decoration-thickness": {
|
||||
"syntax": "auto | from-font | <length>",
|
||||
"syntax": "auto | from-font | <length> | <percentage> ",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "byComputedValueType",
|
||||
"percentages": "no",
|
||||
"percentages": "referToElementFontSize",
|
||||
"groups": [
|
||||
"CSS Text Decoration"
|
||||
],
|
||||
@@ -8475,11 +8684,11 @@
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/text-transform"
|
||||
},
|
||||
"text-underline-offset": {
|
||||
"syntax": "auto | from-font | <length>",
|
||||
"syntax": "auto | <length> | <percentage> ",
|
||||
"media": "visual",
|
||||
"inherited": true,
|
||||
"animationType": "byComputedValueType",
|
||||
"percentages": "no",
|
||||
"percentages": "referToElementFontSize",
|
||||
"groups": [
|
||||
"CSS Text Decoration"
|
||||
],
|
||||
@@ -8496,7 +8705,7 @@
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/text-underline-offset"
|
||||
},
|
||||
"text-underline-position": {
|
||||
"syntax": "auto | [ under || [ left | right ] ]",
|
||||
"syntax": "auto | from-font | [ under || [ left | right ] ]",
|
||||
"media": "visual",
|
||||
"inherited": true,
|
||||
"animationType": "discrete",
|
||||
@@ -8561,7 +8770,7 @@
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/transform"
|
||||
},
|
||||
"transform-box": {
|
||||
"syntax": "border-box | fill-box | view-box",
|
||||
"syntax": "content-box | border-box | fill-box | stroke-box | view-box",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "discrete",
|
||||
@@ -8569,10 +8778,10 @@
|
||||
"groups": [
|
||||
"CSS Transforms"
|
||||
],
|
||||
"initial": "border-box ",
|
||||
"initial": "view-box",
|
||||
"appliesto": "transformableElements",
|
||||
"computed": "asSpecified",
|
||||
"order": "uniqueOrder",
|
||||
"order": "perGrammar",
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/transform-box"
|
||||
},
|
||||
@@ -8818,7 +9027,7 @@
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/widows"
|
||||
},
|
||||
"width": {
|
||||
"syntax": "[ <length> | <percentage> ] && [ border-box | content-box ]? | available | min-content | max-content | fit-content | auto",
|
||||
"syntax": "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
|
||||
"media": "visual",
|
||||
"inherited": false,
|
||||
"animationType": "lpc",
|
||||
|
||||
+7
@@ -27,6 +27,7 @@
|
||||
"integer",
|
||||
"length",
|
||||
"lpc",
|
||||
"notAnimatable",
|
||||
"numberOrLength",
|
||||
"number",
|
||||
"position",
|
||||
@@ -109,6 +110,7 @@
|
||||
"asLength",
|
||||
"asSpecified",
|
||||
"asSpecifiedAppliesToEachProperty",
|
||||
"asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
|
||||
"asSpecifiedExceptMatchParent",
|
||||
"asSpecifiedExceptPositionedFloatingAndRootElementsKeywordMaybeDifferent",
|
||||
"asSpecifiedRelativeToAbsoluteLengths",
|
||||
@@ -179,6 +181,7 @@
|
||||
"beforeAndAfterPseudos",
|
||||
"blockContainerElements",
|
||||
"blockContainers",
|
||||
"blockContainersAndMultiColumnContainers",
|
||||
"blockContainersExceptMultiColumnContainers",
|
||||
"blockContainersExceptTableWrappers",
|
||||
"blockContainersFlexContainersGridContainers",
|
||||
@@ -197,9 +200,13 @@
|
||||
"flexContainers",
|
||||
"flexItemsAndAbsolutelyPositionedFlexContainerChildren",
|
||||
"flexItemsAndInFlowPseudos",
|
||||
"flexItemsGridItemsAbsolutelyPositionedContainerChildren",
|
||||
"flexItemsGridItemsAndAbsolutelyPositionedBoxes",
|
||||
"floats",
|
||||
"gridContainers",
|
||||
"gridContainersWithMasonryLayout",
|
||||
"gridContainersWithMasonryLayoutInTheirBlockAxis",
|
||||
"gridContainersWithMasonryLayoutInTheirInlineAxis",
|
||||
"gridItemsAndBoxesWithinGridContainer",
|
||||
"iframeElements",
|
||||
"images",
|
||||
|
||||
+27
@@ -98,6 +98,24 @@
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/Column_combinator"
|
||||
},
|
||||
"Pseudo-classes": {
|
||||
"syntax": ":",
|
||||
"groups": [
|
||||
"Pseudo",
|
||||
"Selectors"
|
||||
],
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/Pseudo-classes"
|
||||
},
|
||||
"Pseudo-elements": {
|
||||
"syntax": "::",
|
||||
"groups": [
|
||||
"Pseudo",
|
||||
"Selectors"
|
||||
],
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/Pseudo-elements"
|
||||
},
|
||||
":active": {
|
||||
"syntax": ":active",
|
||||
"groups": [
|
||||
@@ -816,6 +834,15 @@
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/::cue"
|
||||
},
|
||||
"::cue-region": {
|
||||
"syntax": "::cue-region | ::cue-region( <selector> )",
|
||||
"groups": [
|
||||
"Pseudo-elements",
|
||||
"Selectors"
|
||||
],
|
||||
"status": "standard",
|
||||
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/::cue-region"
|
||||
},
|
||||
"::first-letter": {
|
||||
"syntax": "/* CSS3 syntax */\n::first-letter\n\n/* CSS2 syntax */\n:first-letter",
|
||||
"groups": [
|
||||
|
||||
+9
-6
@@ -45,7 +45,7 @@
|
||||
"syntax": "[ first | last ]? baseline"
|
||||
},
|
||||
"basic-shape": {
|
||||
"syntax": "<inset()> | <circle()> | <ellipse()> | <polygon()>"
|
||||
"syntax": "<inset()> | <circle()> | <ellipse()> | <polygon()> | <path()>"
|
||||
},
|
||||
"bg-image": {
|
||||
"syntax": "none | <image>"
|
||||
@@ -122,8 +122,8 @@
|
||||
"common-lig-values": {
|
||||
"syntax": "[ common-ligatures | no-common-ligatures ]"
|
||||
},
|
||||
"compat": {
|
||||
"syntax": "searchfield | textarea | push-button | button-bevel | slider-horizontal | checkbox | radio | square-button | menulist | menulist-button | listbox | meter | progress-bar"
|
||||
"compat-auto": {
|
||||
"syntax": "searchfield | textarea | push-button | slider-horizontal | checkbox | radio | square-button | menulist | listbox | meter | progress-bar | button"
|
||||
},
|
||||
"composite-style": {
|
||||
"syntax": "clear | copy | source-over | source-in | source-out | source-atop | destination-over | destination-in | destination-out | destination-atop | xor"
|
||||
@@ -180,7 +180,7 @@
|
||||
"syntax": "cross-fade( <cf-mixing-image> , <cf-final-image>? )"
|
||||
},
|
||||
"cubic-bezier-timing-function": {
|
||||
"syntax": "ease | ease-in | ease-out | ease-in-out | cubic-bezier(<number>, <number>, <number>, <number>)"
|
||||
"syntax": "ease | ease-in | ease-out | ease-in-out | cubic-bezier(<number [0,1]>, <number>, <number [0,1]>, <number>)"
|
||||
},
|
||||
"deprecated-system-color": {
|
||||
"syntax": "ActiveBorder | ActiveCaption | AppWorkspace | Background | ButtonFace | ButtonHighlight | ButtonShadow | ButtonText | CaptionText | GrayText | Highlight | HighlightText | InactiveBorder | InactiveCaption | InactiveCaptionText | InfoBackground | InfoText | Menu | MenuText | Scrollbar | ThreeDDarkShadow | ThreeDFace | ThreeDHighlight | ThreeDLightShadow | ThreeDShadow | Window | WindowFrame | WindowText"
|
||||
@@ -285,7 +285,7 @@
|
||||
"syntax": "[ normal | small-caps ]"
|
||||
},
|
||||
"font-weight-absolute": {
|
||||
"syntax": "normal | bold | <number>"
|
||||
"syntax": "normal | bold | <number [1,1000]>"
|
||||
},
|
||||
"frequency-percentage": {
|
||||
"syntax": "<frequency> | <percentage>"
|
||||
@@ -471,7 +471,7 @@
|
||||
"syntax": "min( <calc-sum># )"
|
||||
},
|
||||
"minmax()": {
|
||||
"syntax": "minmax( [ <length> | <percentage> | <flex> | min-content | max-content | auto ] , [ <length> | <percentage> | <flex> | min-content | max-content | auto ] )"
|
||||
"syntax": "minmax( [ <length> | <percentage> | min-content | max-content | auto ] , [ <length> | <percentage> | <flex> | min-content | max-content | auto ] )"
|
||||
},
|
||||
"named-color": {
|
||||
"syntax": "transparent | aliceblue | antiquewhite | aqua | aquamarine | azure | beige | bisque | black | blanchedalmond | blue | blueviolet | brown | burlywood | cadetblue | chartreuse | chocolate | coral | cornflowerblue | cornsilk | crimson | cyan | darkblue | darkcyan | darkgoldenrod | darkgray | darkgreen | darkgrey | darkkhaki | darkmagenta | darkolivegreen | darkorange | darkorchid | darkred | darksalmon | darkseagreen | darkslateblue | darkslategray | darkslategrey | darkturquoise | darkviolet | deeppink | deepskyblue | dimgray | dimgrey | dodgerblue | firebrick | floralwhite | forestgreen | fuchsia | gainsboro | ghostwhite | gold | goldenrod | gray | green | greenyellow | grey | honeydew | hotpink | indianred | indigo | ivory | khaki | lavender | lavenderblush | lawngreen | lemonchiffon | lightblue | lightcoral | lightcyan | lightgoldenrodyellow | lightgray | lightgreen | lightgrey | lightpink | lightsalmon | lightseagreen | lightskyblue | lightslategray | lightslategrey | lightsteelblue | lightyellow | lime | limegreen | linen | magenta | maroon | mediumaquamarine | mediumblue | mediumorchid | mediumpurple | mediumseagreen | mediumslateblue | mediumspringgreen | mediumturquoise | mediumvioletred | midnightblue | mintcream | mistyrose | moccasin | navajowhite | navy | oldlace | olive | olivedrab | orange | orangered | orchid | palegoldenrod | palegreen | paleturquoise | palevioletred | papayawhip | peachpuff | peru | pink | plum | powderblue | purple | rebeccapurple | red | rosybrown | royalblue | saddlebrown | salmon | sandybrown | seagreen | seashell | sienna | silver | skyblue | slateblue | slategray | slategrey | snow | springgreen | steelblue | tan | teal | thistle | tomato | turquoise | violet | wheat | white | whitesmoke | yellow | yellowgreen"
|
||||
@@ -521,6 +521,9 @@
|
||||
"page-selector": {
|
||||
"syntax": "<pseudo-page>+ | <ident> <pseudo-page>*"
|
||||
},
|
||||
"path()": {
|
||||
"syntax": "path( [ <fill-rule>, ]? <string> )"
|
||||
},
|
||||
"paint()": {
|
||||
"syntax": "paint( <ident>, <declaration-value>? )"
|
||||
},
|
||||
|
||||
+29
@@ -346,6 +346,7 @@
|
||||
"de": "wie angegeben",
|
||||
"en-US": "as specified",
|
||||
"es": "como se especifica",
|
||||
"ca": "com s'especifica",
|
||||
"fr": "comme spécifié",
|
||||
"ja": "指定値",
|
||||
"pl": "jako określone",
|
||||
@@ -357,6 +358,11 @@
|
||||
"fr": "comme la valeur spécifiée s'applique sur chaque propriété englobée par le raccourci",
|
||||
"ru": "как указанное значение, применяется к каждому свойству этой короткой записи."
|
||||
},
|
||||
"asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent": {
|
||||
"en-US": "as specified, except with <code>visible</code>/<code>clip</code> computing to <code>auto</code>/<code>hidden</code> respectively if one of {{cssxref(\"overflow-x\")}} or {{cssxref(\"overflow-y\")}} is neither <code>visible</code> nor </code>clip</code>",
|
||||
"es": "como se especifica, excepto que si {{cssxref(\"overflow-x\")}} o bien {{cssxref(\"overflow-y\")}} es distinto de <code>visible</code> o <code>clip</code>, estos dos valores computan a <code>auto</code> o <code>hidden</code> respectivamente",
|
||||
"ca": "com s'especifica, excepte que si {{cssxref(\"overflow-x\")}} o bé {{cssxref(\"overflow-y\")}} són diferents de <code>visible</code> o <code>clip</code>, aquests dos valors computen a <code>auto</code> o <code>hidden</code> respectivament"
|
||||
},
|
||||
"asSpecifiedExceptMatchParent": {
|
||||
"de": "wie angegeben, außer für den <code>match-parent</code> Wert, welcher in Bezug auf den <code>direction</code> Wert des Elternelements berechnet wird und einen berechneten Wert von <code>left</code> oder <code>right</code> ergibt",
|
||||
"en-US": "as specified, except for the <code>match-parent</code> value which is calculated against its parent's <code>direction</code> value and results in a computed value of either <code>left</code> or <code>right</code>",
|
||||
@@ -458,7 +464,13 @@
|
||||
"ja": "ブロックコンテナー",
|
||||
"ru": "блочные контейнеры"
|
||||
},
|
||||
"blockContainersAndMultiColumnContainers": {
|
||||
"de": "Blockcontainer und mehrspaltige Container",
|
||||
"en-US": "Block containers and multi-column containers",
|
||||
"ja": "ブロックコンテナー, 段組みクコンテナー"
|
||||
},
|
||||
"blockContainersExceptMultiColumnContainers": {
|
||||
"de": "Blockcontainer außer mehrspaltige Container",
|
||||
"en-US": "Block containers except multi-column containers"
|
||||
},
|
||||
"blockContainersExceptTableWrappers": {
|
||||
@@ -557,6 +569,7 @@
|
||||
"de": "Erstellt <a href=\"/de/docs/Web/CSS/CSS_Positioning/z_index_verstehen/Der_Stackingkontext\">Stapelkontext</a>",
|
||||
"en-US": "Creates <a href=\"/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context\">stacking context</a>",
|
||||
"fr": "Crée un <a href=\"/fr/docs/Web/CSS/Comprendre_z-index/L'empilement_de_couches\">contexte d'empilement</a>",
|
||||
"ja": "<a href=\"/ja/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context\">重ね合わせコンテキスト</a>の生成",
|
||||
"ru": "Создаёт <a href=\"/ru/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context\">контекст наложения</a>"
|
||||
},
|
||||
"dependsOnLayoutModel": {
|
||||
@@ -648,6 +661,10 @@
|
||||
"ja": "フロー内の疑似要素を含むフレックスアイテム",
|
||||
"ru": "flex-элементы, в том числе в потоке псевдоэлементов"
|
||||
},
|
||||
"flexItemsGridItemsAbsolutelyPositionedContainerChildren": {
|
||||
"en-US": "Flex items, grid items, and absolutely-positioned flex and grid container children",
|
||||
"ru": "flex-элементы, grid-элементы и абсолютно спозиционированные потомки flex- и grid-контейнеров"
|
||||
},
|
||||
"flexItemsGridItemsAndAbsolutelyPositionedBoxes": {
|
||||
"en-US": "flex items, grid items, and absolutely-positioned boxes"
|
||||
},
|
||||
@@ -684,6 +701,15 @@
|
||||
"fr": "conteneurs de grille",
|
||||
"ru": "сеточные контейнеры"
|
||||
},
|
||||
"gridContainersWithMasonryLayout": {
|
||||
"en-US": "Grid containers with masonry layout"
|
||||
},
|
||||
"gridContainersWithMasonryLayoutInTheirBlockAxis": {
|
||||
"en-US": "Grid containers with masonry layout in their block axis"
|
||||
},
|
||||
"gridContainersWithMasonryLayoutInTheirInlineAxis": {
|
||||
"en-US": "Grid containers with masonry layout in their inline axis"
|
||||
},
|
||||
"gridItemsAndBoxesWithinGridContainer": {
|
||||
"de": "Gridelemente und absolut positionierte Boxen, deren beinhaltender Block ein Gridcontainer ist",
|
||||
"en-US": "grid items and absolutely-positioned boxes whose containing block is a grid container",
|
||||
@@ -967,6 +993,9 @@
|
||||
"ja": "通常要素で使われると常に <code>normal</code>。{{cssxref(\"::before\")}} 及び {{cssxref(\"::after\")}} では: <code>normal</code> の指定があれば計算値は <code>none</code>。指定がなければ、<ul><li>URI 値は、絶対的 URI となる</li><li><code>attr()</code> 値は、計算値の文字列となる</li><li>その他のキーワードについては指定どおり</li></ul>",
|
||||
"ru": "На элементах всегда вычисляется как <code>normal</code>. На {{cssxref(\"::before\")}} и {{cssxref(\"::after\")}}, если <code>normal</code> указано, интерпретируется как <code>none</code>. Иначе, для значений URI, абсолютного URI; для значений <code>attr()</code> - результирующая строка; для других ключевых слов, как указано."
|
||||
},
|
||||
"notAnimatable": {
|
||||
"en-US": "Not animatable"
|
||||
},
|
||||
"number": {
|
||||
"de": "<a href=\"/de/docs/Web/CSS/number#Interpolation\">Nummer</a>",
|
||||
"en-US": "a <a href=\"/en-US/docs/Web/CSS/number#Interpolation\" title=\"Values of the <number> CSS data type are interpolated as real, floating-point, numbers.\">number</a>",
|
||||
|
||||
+15
-12
@@ -1,32 +1,32 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"mdn-data@2.0.6",
|
||||
"/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series"
|
||||
"mdn-data@2.0.14",
|
||||
"/home/node/nuxt"
|
||||
]
|
||||
],
|
||||
"_from": "mdn-data@2.0.6",
|
||||
"_id": "mdn-data@2.0.6",
|
||||
"_from": "mdn-data@2.0.14",
|
||||
"_id": "mdn-data@2.0.14",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-rQvjv71olwNHgiTbfPZFkJtjNMciWgswYeciZhtvWLO8bmX3TnhyA62I6sTWOyZssWHJJjY6/KiWwqQsWWsqOA==",
|
||||
"_integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==",
|
||||
"_location": "/csso/mdn-data",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "mdn-data@2.0.6",
|
||||
"raw": "mdn-data@2.0.14",
|
||||
"name": "mdn-data",
|
||||
"escapedName": "mdn-data",
|
||||
"rawSpec": "2.0.6",
|
||||
"rawSpec": "2.0.14",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.0.6"
|
||||
"fetchSpec": "2.0.14"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/csso/css-tree"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.6.tgz",
|
||||
"_spec": "2.0.6",
|
||||
"_where": "/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series",
|
||||
"_resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
|
||||
"_spec": "2.0.14",
|
||||
"_where": "/home/node/nuxt",
|
||||
"author": {
|
||||
"name": "Mozilla Developer Network"
|
||||
},
|
||||
@@ -39,8 +39,11 @@
|
||||
"better-ajv-errors": "^0.5.1"
|
||||
},
|
||||
"files": [
|
||||
"api/index.js",
|
||||
"api/*.json",
|
||||
"css/index.js",
|
||||
"css/*.json",
|
||||
"l10n/index.js",
|
||||
"l10n/*.json"
|
||||
],
|
||||
"homepage": "https://developer.mozilla.org",
|
||||
@@ -62,5 +65,5 @@
|
||||
"test": "npm run lint",
|
||||
"travis": "npm test"
|
||||
},
|
||||
"version": "2.0.6"
|
||||
"version": "2.0.14"
|
||||
}
|
||||
|
||||
+17
-17
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"csso@4.0.3",
|
||||
"/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series"
|
||||
"csso@4.2.0",
|
||||
"/home/node/nuxt"
|
||||
]
|
||||
],
|
||||
"_from": "csso@4.0.3",
|
||||
"_id": "csso@4.0.3",
|
||||
"_from": "csso@4.2.0",
|
||||
"_id": "csso@4.2.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-NL3spysxUkcrOgnpsT4Xdl2aiEiBG6bXswAABQVHcMrfjjBisFOKwLDOmf4wf32aPdcJws1zds2B0Rg+jqMyHQ==",
|
||||
"_integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==",
|
||||
"_location": "/csso",
|
||||
"_phantomChildren": {
|
||||
"source-map": "0.6.1"
|
||||
@@ -16,29 +16,32 @@
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "csso@4.0.3",
|
||||
"raw": "csso@4.2.0",
|
||||
"name": "csso",
|
||||
"escapedName": "csso",
|
||||
"rawSpec": "4.0.3",
|
||||
"rawSpec": "4.2.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "4.0.3"
|
||||
"fetchSpec": "4.2.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/svgo"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/csso/-/csso-4.0.3.tgz",
|
||||
"_spec": "4.0.3",
|
||||
"_where": "/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series",
|
||||
"_resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz",
|
||||
"_spec": "4.2.0",
|
||||
"_where": "/home/node/nuxt",
|
||||
"author": {
|
||||
"name": "Sergey Kryzhanovsky",
|
||||
"email": "skryzhanovsky@ya.ru",
|
||||
"url": "https://github.com/afelix"
|
||||
},
|
||||
"browser": {
|
||||
"css-tree": "css-tree/dist/csstree.min.js"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/css/csso/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"css-tree": "1.0.0-alpha.39"
|
||||
"css-tree": "^1.1.2"
|
||||
},
|
||||
"description": "CSS minifier with structural optimisations",
|
||||
"devDependencies": {
|
||||
@@ -57,8 +60,7 @@
|
||||
"node": ">=8.0.0"
|
||||
},
|
||||
"files": [
|
||||
"dist/csso.js",
|
||||
"dist/csso.min.js",
|
||||
"dist",
|
||||
"lib"
|
||||
],
|
||||
"homepage": "https://github.com/css/csso",
|
||||
@@ -88,14 +90,12 @@
|
||||
"build": "rollup --config && terser dist/csso.js --compress --mangle -o dist/csso.min.js",
|
||||
"coverage": "nyc npm test",
|
||||
"coveralls": "nyc report --reporter=text-lcov | coveralls",
|
||||
"gh-pages": "git clone --depth=1 -b gh-pages https://github.com/css/csso.git .gh-pages && npm run build && cp dist/csso.min.js .gh-pages/ && cd .gh-pages && git commit -am \"update\" && git push && cd .. && rm -rf .gh-pages",
|
||||
"hydrogen": "node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm --trace_hydrogen_file=code.cfg --print-opt-code bin/csso --stat -o /dev/null",
|
||||
"lint": "eslint lib test",
|
||||
"lint-and-test": "npm run lint && npm test",
|
||||
"postpublish": "npm run gh-pages",
|
||||
"prepublishOnly": "npm run build",
|
||||
"test": "mocha --reporter dot",
|
||||
"travis": "nyc npm run lint-and-test && npm run coveralls"
|
||||
},
|
||||
"version": "4.0.3"
|
||||
"version": "4.2.0"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user