On Thu, Apr 19, 2012 at 7:57 AM, Jon Robson <jrob...@wikimedia.org> wrote:
> Solutions I have thought about so far involve the following. I am yet > to conclude on which is the best way to do this so would really > appreciate discussion... > > 1) scrubbing all inline styles > You mean removing them? That isn't super-expensive I suppose but would damage some content by removing relevant styles. > 2) scrubbing certain inline styles > ######################### > * I could imagine us scrubbing any inline styles which have not been > marked as mobile safe (e.g. anything with a class 'mobilesafe' keeps > its inline style) - this at least allows editors to use pretty styles > and encourages checking their styles on mobile > Are more styles damaging or legit? How do we know? I'd encourage keeping all styles by default except for ones known to cause trouble... > 3) disallowing inline styles in wikitext output > Kills backward compatibility with existing pages, so I'd recommend against this. > ** one could imagine pages/templates being able to maintain their own > stylesheets for desktop and mobile to allow customisations > ^^^ this would be very useful! 4) educating editors better about ensuring their styles work on mobile > ############################################# > I'm not sure how effective/sustainable this would be and how we'd go > about doing this... but would be keen to hear your thoughts around it. > Education is tough, but setting good examples in usage and documentation always helps. Most styles are probably cut-n-pasted from elsewhere, so the more we fix, the more new things will be fixed. An example that I made a little effort on is the layout of portal pages. I manually fixed up a number of portals (but not all! there's more to go), giving them *inline styles* if any that were mobile-safe, and then using *global styles* in MediaWiki:Common.css to provide for multi-column-style layouts on large screens. I also redid some of the templates from using tables to floats or inline-blocks that fit both large and small screens reasonably. Especially if this can be combined with <script> blocks attached to templates -- and thus not forced to be manually rewritten -- I think that's the way to go. -- brion _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l