Let's say I have an HTML page that imports two stylesheets, for example:
<link href="Styles1.css" rel="stylesheet" type="text/css" />
<link href="Styles2.css" rel="stylesheet" type="text/css" />
Also suppose that a class with the same name appears in both of these stylesheets.
.SomeStyle {font-weight:bold; }
.SomeStyle {font-weight:normal;}
Question : Is there a syntax in which I can apply the class to an element in a way that eliminates the version of the style to use?
For example (pseudo code):
<span id="mySpan" class="Styles1.css:SomeStyle">Example</span>
Disclaimer: I know that the best solution would be to resolve the name conflict between the two stylesheets, but I ask mainly academic reasons.
source
share