Bug 19532 - Declaration of background-size without background-position in background shorthand should be parsed as invalid
Declaration of background-size without background-position in background shor...
Status: RESOLVED FIXED
Product: CSSValidator
Classification: Unclassified
Component: CSS 3
CSS Validator
All All
: P2 normal
: ---
Assigned To: This bug has no owner yet - up for the taking
qa-dev tracking
http://jigsaw.w3.org/css-validator/va...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-14 02:43 UTC by Gérard Talbot
Modified: 2012-10-23 10:30 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gérard Talbot 2012-10-14 02:43:06 UTC
div {background: url("support/60x60-green.png") / 100% auto no-repeat;}

should be parsed as invalid declaration and therefore be rejected, ignored.

The syntax is

<final-bg-layer> = <bg-image> || <position> [ / <bg-size> ]? ||
<repeat-style> || <attachment> || <box>{1,2} || <'background-color'>

so, that implies that if <bg-size> is declared, then <position> must be declared too.

URL of test: 
http://www.gtalbot.org/BrowserBugsSection/CSS3Backgrounds/background-shorthand-background-size.html


URL of test submitted to CSS validator
--------------------------------------

http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.gtalbot.org%2FBrowserBugsSection%2FCSS3Backgrounds%2Fbackground-shorthand-background-size.html&profile=css3&usermedium=all&warning=2&vextwarning=&lang=en

Additional info
---------------
- Firefox 16.0.1 error console and Opera 12.02 error console spot the error and reports the error.
- Chrome 22.0.1229.94 strikes the declaration suggesting a parsing error too.
Comment 1 Yves Lafon 2012-10-23 10:30:38 UTC
The validator was implementing the grammar of a previous draft.
Fixed now, thanks for the report !