KT Walrus Posted June 8, 2010 Posted June 8, 2010 The skin template currently manages CSS and HTML. I'd like to see it also manage all JavaScript in the skin template, including the ability to cache the JS to files, just like CSS and HTML. I'd also like to see built in conditional template tags for specifying that the HTML, CSS, JS that is used is tied to a set of browser versions. That is, I want to be able to generate an instance of the HTML, CSS, and JS files for specific browsers. So, IPB would cache a set of files specific for each browser versions and use the version appropriate for the current users browser agent. I'm thinking there are browsers now that support most of HTML5. For those browsers, IPB would use the version of the skin that supports HTML5. For mobile browsers, IPB would use the version of the skin that conditionally is made for the specific mobile browser. I know that I can just create separate versions of a skin as separate skins (like is currently done for the mobile skin), but often, it is only a few tweaks that are necessary in the skin for a specific browser version. For example, I would like to be able to conditionally generate CSS for IE6 (an older browser that is still used but is not very compatible with modern browsers). Hope this makes sense. The key is that template conditional statements be allowed in all potentially browser-specific files (HTML, CSS, and JS) and that the skin be generated for each potential browser agent (based on the conditional statements that test the browser agent and version found in the HTML, CSS, and JS). I'd really like to have a modern version of my skin for the HTML5 browsers and versions for the older compliant HTML4 browsers and more versions for the older, but still in use, non-compliant browsers. This way I could include CSS3 for things like rounded corners and text shadows but strip this CSS out for older browsers that don't know anything about such stuff.
Ryan H. Posted June 8, 2010 Posted June 8, 2010 My blunt opinion... this sounds like a nightmare. re: your CSS3 example, every browser I know of will simply ignore any statements it is not familiar with, so that's not really necessary. The size difference is negligible.
KT Walrus Posted June 8, 2010 Author Posted June 8, 2010 re: your CSS3 example, every browser I know of will simply ignore any statements it is not familiar with, so that's not really necessary. The size difference is negligible. My current skin has real problems in IE6. The skin uses some tricks to override some CSS for IE6 and IE7. It is a mess to figure out the right trick to get the CSS right in all browsers. But, the CSS could be browser specific with clear indications that some CSS is for IE6, others for IE7, others for Safari 4+, etc. I think it would be much less of a nightmare to have conditional CSS than these hacks to come up with CSS that will render sensibly in all browsers.
Biker.GA Posted June 8, 2010 Posted June 8, 2010 The longer developers hand hold those that insist on using outdated and insecure browsers, the longer those individuals will continue to use them. Supporting those browsers is not the answer. The more developers who pull the plug on supporting ancient browsers like IE6, the quicker we'll have to stop worrying about them and those users will finally get the hint and upgrade.
bfarber Posted June 8, 2010 Posted June 8, 2010 Personally, I don't see the value in managing javascript via the ACP. While it's true, you do need to have some browser-specific javascript code, the amount is negligible and considering browsers can cache javascript files, it's a moot issue for the most part. It doesn't slow down the javascript execution and keeps maintaining the files much easier than browser-version-specific copies. As for the CSS, we use industry standard tags to load conditional CSS already (which only needs to be done for IE basically). <link rel="stylesheet" type="text/css" title='Main' media="screen" href="{$this->settings['public_dir']}style_css/{$this->registry->output->skin['_csscacheid']}/ipb_ie.css" /> <![endif]--><!--[if lte IE 7]> Given that really no other browsers need browser-specific CSS, I think this is sufficient without being a hassle to maintain and manage, personally.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.