jamesshore / quixote

CSS unit and integration testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hasClippingOverflow(element) : Missing CSS overflow values

claudeG opened this issue · comments

Hi James !

Got "EnsureException: Unknown overflow property: hidden auto".
The problem is in descriptors/element_rendered_edge.js, function hasClippingOverflow(element).

No doubt that you know why.
For other readers : overflow-x is free to be different from overflow-y.

The complete set of standard values on one axis is { visible, hidden, clip, scroll, auto, overlay }.
'overlay' is deprecated and Quixote excludes it currently.
'clip' is not supported yet because it could be in the future.

In the first note of https://developer.mozilla.org/en-US/docs/Web/CSS/overflow, we can read:
"Setting one axis to visible (the default) while setting the other to a different value
results in visible behaving as auto."

So in hasClippingOverflow(element), the complete of values considered in the switch statement should be
(more legible in spreadsheet Excel or like. Duplicates are commented)

   case "visible":         /* case "auto hidden": */  /* case "auto clip": */  /* case "auto scroll": */  /* case "auto": */
/* case "hidden auto": */     case "hidden":             case "hidden clip":      case "hidden scroll":      case "hidden auto":
/* case "clip auto": */       case "clip hidden":        case "clip":             case "clip scroll":        case "clip auto":
/* case "scroll auto": */     case "scroll hidden":      case "scroll clip":      case "scroll":             case "scroll auto":
/* case "auto": */            case "auto hidden":        case "auto clip":        case "auto scroll":        case "auto":

For what I understand in the current function code, all these cases return false and only "visible" returns true.

Regards

Claude G.

Thanks for the report, Claude. This is fixed and will be in the next release.

No, I'm not aware of anything like that.

This is outside of the scope for Quixote.

Fixed in v0.14.1.