avif-in-css
avif-in-css copied to clipboard
AddClass doesn't handle case of class already starting with "body"
Source code only handles html:
https://github.com/nucliweb/avif-in-css/blob/13b02388957f1ff649de318d77017cdef7c8ba52/index.js#L14-L16
The following:
body main {
background-image: url(./assets/test.jpeg);
background-size: contain;
}
will generate:
body.avif body main {
background-image: url(/assets/test.0e61a19d72e86eea12e0.avif);
}
Same as in https://github.com/ai/webp-in-css/issues/30