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 19739 - Investigate whether attr() needs "invalid at computed-value time" concept
Summary: Investigate whether attr() needs "invalid at computed-value time" concept
Alias: None
Product: CSS
Classification: Unclassified
Component: Values and Units (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Tab Atkins Jr.
QA Contact: public-css-bugzilla
Depends on:
Reported: 2012-10-27 12:41 UTC by Tab Atkins Jr.
Modified: 2012-11-26 19:38 UTC (History)
2 users (show)

See Also:


Description Tab Atkins Jr. 2012-10-27 12:41:45 UTC
For example, some things only accept positive numbers.  If you have "attr(foo number)", you don't know at parse time whether the number will end up being correct.
Comment 1 fantasai 2012-11-26 19:30:03 UTC
You don't know at parse time whether it's even a number, nevermind a positive number. This is already handled; that's why attr() takes a fallback.

  # The optional <fallback> argument represents a fallback value, which is used
  # if the named attribute is missing, or its value cannot be parsed into the
  # given type or is invalid/out-of-range for the property. If it's absent, the
  # default value for the given <type-or-unit> (from the list below) is implied.
Comment 2 Tab Atkins Jr. 2012-11-26 19:38:05 UTC
Oh, duh.  Don't know why I forgot about that.