Universal selector warning

For topics about current or future BETA releases, including feature requests.

Universal selector warning

Postby RSteinwand » Mon Feb 22, 2010 10:55 pm

I have this css in an xhtml strict document:

<style type="text/css">
<!--
#main{text-align:left}
-->
</style>

... and get this warning which doesn't seem to apply:

"A universal selector (*) is implied instead being explicit. It is recommended that universal selectors not be omitted in order to decrease potential confusion and improve readability. For example, "div :first-child" versus "div:first-child". Here, "div *:first-child" is more readable and less confusing. This message is displayed up to three times."
Rick
User avatar
RSteinwand
Rank IV - Intermediate
Rank IV - Intermediate
 
Posts: 161
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND

Re: Universal selector warning

Postby Albert Wiersch » Mon Feb 22, 2010 11:52 pm

I think that message is reasonable but you can disable the message or you could use:
*#main{text-align:left}

I see a grammatical error in the message, though, and I will correct that.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2361
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX


Return to CSE BETA Talk

Who is online

Users browsing this forum: No registered users and 1 guest