From 2b268fc5898f472c8cf5c96b41ff0006af23fee6 Mon Sep 17 00:00:00 2001 From: tophf Date: Tue, 12 Jun 2018 12:31:12 +0300 Subject: [PATCH] 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 --- edit/codemirror-default.js | 4 ++++ vendor-overwrites/csslint/parserlib.js | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/edit/codemirror-default.js b/edit/codemirror-default.js index b1f413bb..edd6896b 100644 --- a/edit/codemirror-default.js +++ b/edit/codemirror-default.js @@ -102,6 +102,10 @@ } 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 'block-size': true, 'border-block-color': true, diff --git a/vendor-overwrites/csslint/parserlib.js b/vendor-overwrites/csslint/parserlib.js index e4c19d53..2e7e64ba 100644 --- a/vendor-overwrites/csslint/parserlib.js +++ b/vendor-overwrites/csslint/parserlib.js @@ -161,7 +161,9 @@ self.parserlib = (() => { 'background-color': '', 'background-image': '#', 'background-origin': '#', - 'background-position': '', + 'background-position': '#', + 'background-position-x': '[ center | [ left | right ]? ? ]#', + 'background-position-y': '[ center | [ top | bottom ]? ? ]#', 'background-repeat': '#', 'background-size': '#', 'baseline-shift': 'baseline | sub | super | | ',