This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 19532 - Declaration of background-size without background-position in background shorthand should be parsed as invalid
Summary: Declaration of background-size without background-position in background shor...
Status: RESOLVED FIXED
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: CSS 3 (show other bugs)
Version: CSS Validator
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL: http://jigsaw.w3.org/css-validator/va...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-14 02:43 UTC by Gérard Talbot
Modified: 2012-10-23 10:30 UTC (History)
0 users

See Also:


Attachments

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 !