CSSLint/CodeMirror: background-position-x and -y

These have been used for a long time in the real world and will finally get standardized by the upcoming CSS Backgrounds and Borders Module L4.

fixes #397
This commit is contained in:
tophf 2018-06-12 12:31:12 +03:00
parent 44f3a79353
commit 2b268fc589
2 changed files with 7 additions and 1 deletions

View File

@ -102,6 +102,10 @@
} }
Object.assign(CodeMirror.mimeModes['text/css'].propertyKeywords, { Object.assign(CodeMirror.mimeModes['text/css'].propertyKeywords, {
// CSS Backgrounds and Borders Module L4
'background-position-x': true,
'background-position-y': true,
// CSS Logical Properties and Values L1 // CSS Logical Properties and Values L1
'block-size': true, 'block-size': true,
'border-block-color': true, 'border-block-color': true,

View File

@ -161,7 +161,9 @@ self.parserlib = (() => {
'background-color': '<color>', 'background-color': '<color>',
'background-image': '<bg-image>#', 'background-image': '<bg-image>#',
'background-origin': '<box>#', 'background-origin': '<box>#',
'background-position': '<bg-position>', 'background-position': '<bg-position>#',
'background-position-x': '[ center | [ left | right ]? <length-percentage>? ]#',
'background-position-y': '[ center | [ top | bottom ]? <length-percentage>? ]#',
'background-repeat': '<repeat-style>#', 'background-repeat': '<repeat-style>#',
'background-size': '<bg-size>#', 'background-size': '<bg-size>#',
'baseline-shift': 'baseline | sub | super | <percentage> | <length>', 'baseline-shift': 'baseline | sub | super | <percentage> | <length>',