|
|
@@ -1107,7 +1107,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
|
|
|
static setBackgroundImage(element, url, style) {
|
|
|
element.style.setProperty("background-blend-mode", "normal", "important");
|
|
|
- element.style.setProperty("background-clip", "content-box", "important");
|
|
|
+ element.style.setProperty("background-clip", style && style["background-clip"] ? style["background-clip"] : "content-box", "important");
|
|
|
element.style.setProperty("background-position", style && style["background-position"] ? style["background-position"] : "center", "important");
|
|
|
element.style.setProperty("background-color", style && style["background-color"] ? style["background-color"] : "transparent", "important");
|
|
|
element.style.setProperty("background-image", url, "important");
|
|
|
@@ -1654,6 +1654,9 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
if (imgData.backgroundColor) {
|
|
|
backgroundStyle["background-color"] = imgData.backgroundColor;
|
|
|
}
|
|
|
+ if (imgData.boxSizing) {
|
|
|
+ backgroundStyle["background-clip"] = imgData.boxSizing;
|
|
|
+ }
|
|
|
ProcessorHelper.setBackgroundImage(imgElement, "var(" + variableName + ")", backgroundStyle);
|
|
|
imgElement.removeAttribute(dataAttributeName);
|
|
|
return true;
|