This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The following CSS fragment is incorrectly reported as invalid. (under selected grammar=css2.1) test case 1: [attr=val ] {} (note: whitespace before ] ). Other tests with whitespace inserted in other possible positions show correct behaviour. The following test cases all fail similarly test case 2: [attr~=val ] {} test case 3: [attr|=val ] {} etc for other operators ==== Notes: This bug is confined to the (attr OP ident) cases. The case of (attr OP string) is not affected. (See test case 4 below.) Suggest adding additional test cases: test case 4: [attr = "val" ] {} test case 4 is correctly reported as valid. -- test case 5: [attr=val/**/] {} test case 5 is correctly reported as valid. -- test case 6: [attr ] {} (attribute existence test, whitespace before ]) test case 6 is correctly reported as valid.
The grammar of attrib() was indeed wrong (in the validator), catching <S> only for <STRING> and not <IDENT>. Fixed now on http://qa-dev.w3.org:8001/css-validator/