aboutsummaryrefslogtreecommitdiffstats
path: root/vanilla/node_modules/postcss/lib/rule.js
diff options
context:
space:
mode:
authorAdam Mathes <adam@adammathes.com>2026-02-13 21:34:48 -0800
committerAdam Mathes <adam@adammathes.com>2026-02-13 21:34:48 -0800
commit76cb9c2a39d477a64824a985ade40507e3bbade1 (patch)
tree41e997aa9c6f538d3a136af61dae9424db2005a9 /vanilla/node_modules/postcss/lib/rule.js
parent819a39a21ac992b1393244a4c283bbb125208c69 (diff)
downloadneko-76cb9c2a39d477a64824a985ade40507e3bbade1.tar.gz
neko-76cb9c2a39d477a64824a985ade40507e3bbade1.tar.bz2
neko-76cb9c2a39d477a64824a985ade40507e3bbade1.zip
feat(vanilla): add testing infrastructure and tests (NK-wjnczv)
Diffstat (limited to 'vanilla/node_modules/postcss/lib/rule.js')
-rw-r--r--vanilla/node_modules/postcss/lib/rule.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/vanilla/node_modules/postcss/lib/rule.js b/vanilla/node_modules/postcss/lib/rule.js
new file mode 100644
index 0000000..3b9b7e9
--- /dev/null
+++ b/vanilla/node_modules/postcss/lib/rule.js
@@ -0,0 +1,27 @@
+'use strict'
+
+let Container = require('./container')
+let list = require('./list')
+
+class Rule extends Container {
+ 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)
+ }
+
+ constructor(defaults) {
+ super(defaults)
+ this.type = 'rule'
+ if (!this.nodes) this.nodes = []
+ }
+}
+
+module.exports = Rule
+Rule.default = Rule
+
+Container.registerRule(Rule)