I was unsetting a particular color by using initial, but IE doesnt support initial so I had to provide a specific color for it. So below was the format I used.
Initially:
a.link-ele {
color: initial;
&:hover {
text-decoration: none;
color: initial;
}
}
In order to support IE:
a.link-ele {
color: black;
color: initial;
&:hover {
text-decoration: none;
color: black;
color: initial;
}
}
Here black will be set in IE and initial in browsers which support it since initial comes later.
PROBLEM: Less, in-order to optimize the CSS uses only color:initial;
since it thinks its quite obvious the second one will be used by browser.
Alright so for that I do the below:
a.link-ele {
color: initial;
&:hover {
text-decoration: none;
color: initial;
}
}
.link-ele {
color: black;
&:hover {
color: black;
}
}
I changed the specificity thinking Less would not remove it but it looks like Less still uses the higher specificity value.
Question: How do I make Less allow both values?
Note: I know to make it work using different class-names or other ways, I just want to know is there a flag or something I can set which makes Less to allow both colors.
I have already tested the above concept in IE and other browsers and it works fine
I use ember-cli and emberjs framework