Currently, I am utilizing CSS and HTML in my project. To implement styles, I am utilizing both an external stylesheet as well as a "style" element within the HTML to override certain styles.
However, I have encountered an issue. When I insert an HTML comment within the "style" element, the style override does not work as expected. Strangely enough, when I use CSS comments instead, the override functions correctly. Since the "style" element is part of HTML, it raises the question: why do HTML comments interfere with the overrides in the "style" element?
As an illustration:
<html>
<head>
<title>test</title>
<style>
<!-- body{background:#eee;} -->
</style>
</head>
<body></body>
</html>
The provided example showcases the peculiar behavior of the styles being applied despite the presence of comment tags.
Check out the jsFiddle Demo (verified on Chrome 16.0.912.75 Windows 7)