Saturday, March 21, 2015

GSS @alternate errors for duplicate selectors

If you have the following lines in a .gss file :

 
  background: transparent;
  background
: rgba(0, 0, 0, 0.5);

You're greeted with this compile error:

 [ERROR] Error in xxx/css/foundation.gss[line: 4921 column: 20]: Detected multiple identical, non-alternate declarations in the same ruleset. If this is intentional please use the /* @alternate */ annotation. background:[rgba(0,0,0,0.5)]



requiring you to replace the above with the following:

 
background: transparent;
 
/* @alternate */ background: rgba(0, 0, 0, 0.5);

And if you work with a large css file, or even something like Foundation, you're greeted with hundreds of these errors which have to be manually fixed.

Is there a way to disable these errors / checks? CSS is not like Java which needs to be statically analyzed, and css designers can't be expected to follow syntax rules. If something is valid syntax, leave it as is. At least offer a strict / lenient mode.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment