Impossible to use data in '::before` pseudo-selector in `content' property
Vue version
3.2.21
Link to minimal reproduction
Steps to reproduce
I'd like to bind some data from script
to ::before
pseudo-selector
Determine some property in setup
or data
and try to use it in ::before
in styles
section.
This is works, but only content
property can't accept any data from script
section
What is expected?
I expect to see actual data in content
property
What is actually happening?
Nothing happens.
System Info
System:
OS: Linux 5.15 Manjaro Linux
CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
Memory: 6.76 GB / 15.45 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 18.1.0 - /usr/bin/node
Yarn: 1.22.18 - /usr/bin/yarn
npm: 8.5.5 - /usr/bin/npm
Browsers:
Firefox: 100.0
npmPackages:
vue: ^3.2.21 => 3.2.32
Any additional comments?
No response
The CSS content
attribute requires quotes around string values.
-const msg = ref('Hello World!');
+const msg = ref('"Hello World!"');
See this demo.