ISSUE-149: Require whitespace around binary "+" and "-" inside calc()

Require whitespace around binary "+" and "-" inside calc()

State:
CLOSED
Product:
CSS3 Values and Units
Raised by:
Bert Bos
Opened on:
2010-10-12
Description:
David wrote in
http://lists.w3.org/Archives/Public/www-style/2010May/0092.html
that there should be required spaces on both sides of binary operators "+' and "-".

It avoids confusion over why 'calc(3em+2px)' works but 'calc(3em-2px)' doesn't.

This may already have been in a previous draft, but it is not in the editor's draft of August 2010.

If accepted, the change would be to replace

sum : product [ [ "+" | "-" ] S* product ]*;

with

sum : product [ S [ "+" | "-" ] S+ product ]*;

(That gives a grammar that requires lookahead, so some more rewriting is needed if that is not acceptable.)
Related Actions Items:
No related actions
Related emails:
  1. Re: [css3-images] editorial comments (from jackalmage@gmail.com on 2012-02-09)
  2. [css3-images] editorial comments (from kennyluck@csail.mit.edu on 2012-02-09)
  3. Re: [css3-mediaqueries] tv and screen media types (from mikko.rantalainen@peda.net on 2010-11-01)
  4. Re: [css3-mediaqueries] tv and screen media types (from jackalmage@gmail.com on 2010-10-29)
  5. Re: [css3-mediaqueries] tv and screen media types (from rune@opera.com on 2010-10-29)
  6. Re: [css3-mediaqueries] tv and screen media types (from dstorey@opera.com on 2010-10-29)
  7. Re: [css3-mediaqueries] tv and screen media types (from rune@opera.com on 2010-10-29)
  8. Re: [css3-mediaqueries] tv and screen media types (from fantasai.lists@inkedblade.net on 2010-10-29)
  9. ISSUE-149: Require whitespace around binary '+' and '-' inside calc() [CSS3 Values and Units] (from sysbot+tracker@w3.org on 2010-10-12)

Related notes:

Fixed per http://www.w3.org/blog/CSS/2009/03/10/resolutions_56/ + http://lists.w3.org/Archives/Public/www-style/2009Mar/0066.html

Elika Etemad, 11 Oct 2011, 00:41:49

Changelog:

Created issue 'Require whitespace around binary "+" and "-" inside calc()' nickname owned by Bert Bos on product CSS3 Values and Units, description 'David wrote in
http://lists.w3.org/Archives/Public/www-style/2010May/0092.html
that there should be required spaces on both sides of binary operators "+' and "-".

It avoids confusion over why 'calc(3em+2px)' works but 'calc(3em-2px)' doesn't.

This may already have been in a previous draft, but it is not in the editor's draft of August 2010.

If accepted, the change would be to replace

sum : product [ [ "+" | "-" ] S* product ]*;

with

sum : product [ S [ "+" | "-" ] S+ product ]*;

(That gives a grammar that requires lookahead, so some more rewriting is needed if that is not acceptable.)' non-public

Bert Bos, 12 Oct 2010, 17:33:40

Status changed to 'closed'

Elika Etemad, 11 Oct 2011, 00:41:55


Peter Linss <peter.linss@hp.com>, Daniel Glazman <daniel.glazman@disruptive-innovations.com>, Chairs, Chris Lilley <chris@w3.org>, Bert Bos <bert@w3.org>, Staff Contacts
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: index.php,v 1.325 2014-09-10 21:42:02 ted Exp $