Can the Vue 2.x API be used to convert an object representing component styles into a format suitable for the style DOM attribute? Essentially, I am seeking an imperative API similar to the v-bind:style directive.
For instance:
const style = {
fontSize: '14px',
color: 'red'
}
const value = Vue.createStyle(style) // font-size: 14px; color: red
I understand about the template compiler, scoped styles, risks of injecting user-provided styles, and the availability of v-bind. My goal is to supply a style string to an element within an inline frame using a computed property.
Although I believe it may not be significant, just in case, I am utilizing a payment processor SDK that embeds payment information in an inline frame to reduce PCI scope requirements. The SDK offers a function to set the inline style attribute of one or more fields within the frame.