https://bugzilla.wikimedia.org/show_bug.cgi?id=35704
--- Comment #27 from Matthew Flaschen <[email protected]> --- (In reply to comment #22) > The problem is unbalanced templates. We could try an approach like my > suggestion at > https://www.mediawiki.org/wiki/Talk:Requests_for_comment/ > Allow_styling_in_templates#What_measures_need_to_be_made_to_take_into_account > _performance_and_security Jon and I talked about this for a while. We didn't reach conclusions, but he pointed out you could use <style scoped> purely around bodyContent: <div id="bodyContent"> <style scoped> /* ... */ </style> </div> This would be an alternative to the CSS rewriting idea at https://www.mediawiki.org/wiki/Talk:Requests_for_comment/Allow_styling_in_templates#What_measures_need_to_be_made_to_take_into_account_performance_and_security . This dodges the unbalanced template issue, while still preventing styles from leaking into the chrome (non-content) areas. However, it does nothing to attempt to prevent templates from interfering with each other. However, I found a general issue with <style scoped> while reading about it (http://html5doctor.com/the-scoped-attribute/#compatibility). Since old browsers will simply drop the scoped, they will treat it as a regular style, meaning there's no scoping. It seems like this can be avoided with polyfills in at least some browsers (e.g. https://gist.github.com/richtr/4039383 works for me), but if JavaScript is disabled (and possibly for old browsers), it falls back to being global CSS. There is a proposal for a <scopedstyle> tag that may mitigate this. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
