at new Quoted (****node_modules/postcss-values-parser/lib/nodes/Quoted.js:21:37)
at cloneNode (****node_modules/postcss/lib/node.js:10:16)
at Quoted.clone (****node_modules/postcss/lib/node.js:97:18)
at new Node (****node_modules/postcss/lib/node.js:47:30)
at new Container (****node_modules/postcss/lib/container.js:27:1)
at new Container (****node_modules/postcss-values-parser/lib/nodes/Container.js:15:1)
at new Func (****node_modules/postcss-values-parser/lib/nodes/Func.js:96:5)
at asClonedNode (****node_modules/postcss-custom-properties/index.cjs:272:21)
at ****node_modules/postcss-custom-properties/index.cjs:268:60
Expected behaviour
CSS is generated with fallback value stored inside --btn-close-image variable.
:root {
--btn-close-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20fill='rgb(0,0,0)'%3E%3Cpath%20d='M.293.293a1%201%200%20011.414%200L8%206.586%2014.293.293a1%201%200%20111.414%201.414L9.414%208l6.293%206.293a1%201%200%2001-1.414%201.414L8%209.414l-6.293%206.293a1%201%200%2001-1.414-1.414L6.586%208%20.293%201.707a1%201%200%20010-1.414z'/%3E%3C/svg%3E");
}
.btn-close {
background: transparent url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20fill='rgb(0,0,0)'%3E%3Cpath%20d='M.293.293a1%201%200%20011.414%200L8%206.586%2014.293.293a1%201%200%20111.414%201.414L9.414%208l6.293%206.293a1%201%200%2001-1.414%201.414L8%209.414l-6.293%206.293a1%201%200%2001-1.414-1.414L6.586%208%20.293%201.707a1%201%200%20010-1.414z'/%3E%3C/svg%3E") center/0.75em auto no-repeat;
background: transparent var(--btn-close-image) center/0.75em auto no-repeat;
}
Description
We have updated postcss-preset-env
from
6.5.0
which uses^8.0.0
(tested with 8.0.11) to7.0.0
which uses^12.0.0
We are are getting a
Cannot read property 'value' of undefined
when processing css variables which containsurl(...)
:You can reproduce it on this Runkit example
Complete stack trace:
Expected behaviour
CSS is generated with fallback value stored inside
--btn-close-image
variable.This was working in
8.0.x
version: Runkit example