summaryrefslogtreecommitdiff
path: root/node_modules/postcss/lib/rule.js
diff options
context:
space:
mode:
authorPhilipp Tanlak <philipp.tanlak@gmail.com>2025-11-24 20:54:57 +0100
committerPhilipp Tanlak <philipp.tanlak@gmail.com>2025-11-24 20:57:48 +0100
commitb1e2c8fd5cb5dfa46bc440a12eafaf56cd844b1c (patch)
tree49d360fd6cbc6a2754efe93524ac47ff0fbe0f7d /node_modules/postcss/lib/rule.js
Docs
Diffstat (limited to 'node_modules/postcss/lib/rule.js')
-rw-r--r--node_modules/postcss/lib/rule.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/node_modules/postcss/lib/rule.js b/node_modules/postcss/lib/rule.js
new file mode 100644
index 0000000..a93ab25
--- /dev/null
+++ b/node_modules/postcss/lib/rule.js
@@ -0,0 +1,27 @@
+'use strict'
+
+let Container = require('./container')
+let list = require('./list')
+
+class Rule extends Container {
+ constructor(defaults) {
+ super(defaults)
+ this.type = 'rule'
+ if (!this.nodes) this.nodes = []
+ }
+
+ get selectors() {
+ return list.comma(this.selector)
+ }
+
+ set selectors(values) {
+ let match = this.selector ? this.selector.match(/,\s*/) : null
+ let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen')
+ this.selector = values.join(sep)
+ }
+}
+
+module.exports = Rule
+Rule.default = Rule
+
+Container.registerRule(Rule)