Let me provide some additional comments.
>> If libraries are combined that both play in the same area (in this case styling with CSS), problems will occur.
Not necessarily. Problems will occur only if a library targets elements in the global scope. This is a bad practice. We do not do it. Twitter Bootstrap does.
>> I also would not call this situation an "unwisely used CSS selector".
Cases in which targeting all elements in the web application globally are rarely justified and I don't think this is the case currently.
First, the above rule violates the concept of the cascade (inheritance) and it would have been better if the style at least read:
Second, both CSS rules above are totally redundant, because there is already a 20px line-height defined for the <body> element and list items inherit that.
So I would suggest submitting a pull request to Twitter Bootstrap to resolve this oversight.
Imagine that you want a 18px line-height across your web application, so you set it to the <html> or <body> element, and everything works. Then you add some third-party library and all of a sudden the <li> elements change their line-height, because of a conflicting global CSS selector. As a result, you need to transform your plain and simple CSS rule to something absurd such as:
>> Would it really be that bad, if Telerik added a rule just as you showed in your answer?
Actually not, this is only a single CSS rule. However, I am strongly convinced that doing this is wrong, especially with the above pointers in mind. The Twitter Bootstrap CSS file sets custom styles for a lot of other HTML elements globally. Other third-party libraries may set custom global styles to something else. If we go down that path and fix all libraries in the world, we will punish ourselves and the majority of our customers for some edge cases that apply to only a small portion of them. I would like to stress once again upon the fact that we always build our stylesheets and scripts so that we don't break anything outside our widgets, and we expect the same from other libraries.
Finally, Twitter Bootstrap allows creating a customized version of its stylesheet
, which only includes what you really need. It is good to consider using this option.
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI