element()
The element() CSS function creates a live-updating image from an HTML element that can be used as an image or background image.
Status
Limited availability
MDN documentation
Specifications
Browser support (view on caniuse.com)
- Chrome ❌
- Chrome Android ❌
- Edge ❌
- Firefox ❌ See bugzil.la/707106
- Firefox for Android ❌
- Safari ❌
- Safari on iOS ❌
Developer votes
Do you need this feature?
Let us know by leaving a 👍 reaction on the feedback issue. Don't forget to also leave a comment explaining your specific use case.
Developer use cases
-
I maintain a plugin called "[Statusbar Organizer](https://github.com/Opisek/obsidian-statusbar-organizer)" for the webapp "Obsidian". It lets users rearrange specific HTML elements to their liking with a drag and drop approach in a settings window. For the user to be able to preview their changes and be able to tell how their actions affect the actual elements, I need to be able to display a "copy" of the elements that are being manipulated. Using `element` I could easily create live-updating previews of the manipulated elements.
I maintain a plugin called "[Statusbar Organizer](https://github.com/Opisek/obsidian-statusbar-organizer)" for the webapp "Obsidian". It lets users rearrange specific HTML elements to their liking with a drag and drop approach in a settings window. For the user to be able to preview their changes and be able to tell how their actions affect the actual elements, I need to be able to display a "copy" of the elements that are being manipulated. Using `element` I could easily create live-updating previews of the manipulated elements. [see original comment]
View as JSON | Edit this feature | Report an issue | Web-features entry: source, dist