Touched
Resident ASMAGICIAN
- 625
- Posts
- 10
- Years
- Age 123
- Seen Feb 1, 2018
The [div][/div] and other CSS tags result in some really ugly markup. Would it not be possible to grant scoped styling (so that It can't leak out and affect the surrounding styles) with something like
This could be implemented using
Or using an Iframe for maximum browser support (with srcdoc, a data url containing html or some external html file generated from the inner BBCode)
This would just allow for cleaner and reusable CSS inside a thread, and maybe hover effects or other things that are not currently possible.
Code:
[PLAIN]
[scoped]
[style]
.my-class { color: red: }
[/style]
[class="my-class"]Whatever[/class]
[/scoped]
[/PLAIN]
This could be implemented using
HTML:
<div class="scoped">
<style scoped>
.my-class { color: red }
</style>
<span class="my-class">Whatever</span>
</div>
Or using an Iframe for maximum browser support (with srcdoc, a data url containing html or some external html file generated from the inner BBCode)
HTML:
<iframe class="scoped" seamless="seamless" srcdoc="...">
This would just allow for cleaner and reusable CSS inside a thread, and maybe hover effects or other things that are not currently possible.