aboutsummaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
Diffstat (limited to 'dev')
-rw-r--r--dev/css-to-json-util.js12
-rw-r--r--dev/data/structured-content-overrides.css7
2 files changed, 14 insertions, 5 deletions
diff --git a/dev/css-to-json-util.js b/dev/css-to-json-util.js
index d6a9622c..71033f3a 100644
--- a/dev/css-to-json-util.js
+++ b/dev/css-to-json-util.js
@@ -90,8 +90,9 @@ function generateRules(cssFile, overridesCssFile) {
const stylesheet1 = css.parse(content1, {}).stylesheet;
const stylesheet2 = css.parse(content2, {}).stylesheet;
- const removePropertyPattern = /^remove-property\s+([a-zA-Z0-9-]+)$/;
+ const removePropertyPattern = /^remove-property\s+([\w\W]+)$/;
const removeRulePattern = /^remove-rule$/;
+ const propertySeparator = /\s+/;
const rules = [];
@@ -139,10 +140,11 @@ function generateRules(cssFile, overridesCssFile) {
const comment = declaration.comment.trim();
let m;
if ((m = removePropertyPattern.exec(comment)) !== null) {
- const property = m[1];
- const removeCount = removeProperty(rules[index].styles, property, removedProperties);
- if (removeCount === 0) { throw new Error(`Property removal is unnecessary; ${property} does not exist`); }
- } else if ((m = removeRulePattern.exec(comment)) !== null) {
+ for (const property of m[1].split(propertySeparator)) {
+ const removeCount = removeProperty(rules[index].styles, property, removedProperties);
+ if (removeCount === 0) { throw new Error(`Property removal is unnecessary; ${property} does not exist`); }
+ }
+ } else if (removeRulePattern.test(comment)) {
rules.splice(index, 1);
}
}
diff --git a/dev/data/structured-content-overrides.css b/dev/data/structured-content-overrides.css
index 1d2ed830..9fd08f8f 100644
--- a/dev/data/structured-content-overrides.css
+++ b/dev/data/structured-content-overrides.css
@@ -54,3 +54,10 @@
border-width: 1px;
border-color: currentColor;
}
+.gloss-link-text {
+ /* remove-rule */
+}
+.gloss-link-external-icon {
+ display: none;
+ /* remove-property background-color vertical-align width height margin-left background-color position */
+}