Conditional CSS

Conditional CSS to remember It is desirable that browser specific bugs should be targeted and fixed each browser specifically with no impact on the way general CSS is written. If a bug is fixed in a certain browser version, we need a possibility to remove fixes without worrying about browser compatibility.

Microsoft offers to use conditional comments. Thus, you can write a special CSS file for their browsers. In other words, you include a separate CSS file for browsers that requires CSS fixes for a certain project instead of standardizing conditional comments.

It processes like a normal css file. The only difference is that only those browsers which are targeted will include the css file.

With targeting every browser in a separate CSS file is quite a lot of work that sometimes not possible within the constraints of a project. However, such process allows a developer to implement his often good ideas to use css without having to worry about complying to 5 (or more) browsers. Conditional CSS for all

As you can see advantages outweigh disadvantages of such a decision. It is necessary to look ahead and try to build a standard till CSS remains to be a problem with bugs in browsers. It is necessary to devise a system where the bugs can be addressed without reverting to hacks and tricks.

Reference: www.onderhond.com/blog/work/conditional-css

Comments are closed.