Page 1 of 1

CSS validation fail

Posted: 17 Nov 2011, 15:17
by MagnusB
So this is kind of driving me crazy, cause I can not get the prettyPhoto.css to validate. 2 errors found:

1. Instance use of font-color, should be changed to color (easy)
2. Use of rgba(....) in a border. This I don't understand why it fails. I have checked with http://www.css3.info/preview/rgba/ and it should validate, but it doesn't. This keeps getting up:
1 .pp_gallery ul a Value Error : border Too many values or values are not recognized : 1px rgba(0,0,0,0.5 ) solid
However, if I remove the rgba(...) it validates perfectly. Now, I did quick source search on a post using an pp attachment, and I could not find pp_gallery, nor a ul inside the "box". I also tried validating with direct input, inserting spacings etc.

If I read the definition correctly, it only sets the border as transparent / opaque, which is not really needed for my site, cause I doubt anyone will notice a 1px wide border is opaque or not... However, it should validate, so it annoys me, maybe it isn't allowed to use within border?

And a more random note, the CSS file, is there any special encoding to it? Tried opening it as UTF8, and it looked really messy.

CSS validation fail

Posted: 17 Nov 2011, 15:28
by doktornotor
IMHO, this is a W3C validator bug that has been there for quite some time.

Edit: Indeed...

http://www.w3.org/Bugs/Public/show_bug.cgi?id=9123
http://stackoverflow.com/questions/2545 ... rgba-wrong

CSS validation fail

Posted: 17 Nov 2011, 15:35
by MagnusB
Hmm, seems you are right. Are a discussion regarding if it is a bug, or a feature as CSS 3 is not finished. Well, anyway, I kind of fixed it by removing the offending code, but it still annoys me.