Replies: 2 comments 2 replies
-
Hi there, yes there's a note in the docs for this:
So you need module.exports = {
inlineCSS: {
styleToAttribute: {
width: 'width',
},
applyWidthAttributes: ['img'],
keepOnlyAttributeSizes: {
width: ['img']
}
}
} |
Beta Was this translation helpful? Give feedback.
2 replies
-
Merged #1110, should be fixed now in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am struggling with #keeponlyattributesizes. I want my image to inline styles exept width and make it as an attribute. I want to make something like this in my config.cjs file:
inlineCSS: {
applyWidthAttributes: ["img"],
keepOnlyAttributeSizes: {
width: ["img"],
},
},
but after run it shows me an error:
✖ Failed to compile template: index.html
⚠ attrStr.split is not a function
when i will delete keepOnlyAttributeSizes object everything works but i have inline styles and width attribute either - I want to keep only width as an attribute. How I can do it ?
Beta Was this translation helpful? Give feedback.
All reactions