Skip to content

stroke-miterlimit: invalid value behavior? #545

Closed

Description

Image for: Description

The section on stroke-miterlimit currently says:

<number>
The limit on the extent of a miter, miter-clip, or arcs line join as a multiple of the stroke-width value. The value of stroke-miterlimit must be a <number> greater than or equal to 1. Any other value is an error (see Error processing).

If it was truly an error handled by the general error processing rules, then the shape with an invalid value for the property would not be drawn at all. I'm sure that's not what happens, and not what we want to happen.

But we need to define whether value clamping happens at parse time or used value time. Which means checking to see what implementations currently do.

e.g, for:

path {
  stroke-miterlimit: 2;
  stroke-miterlimit: 0.5;
}

Is the second value thrown out at parse time, so the used value is 2? Or is it accepted then clamped to the minimum value of 1? Or is it accepted then thrown out at rendering time, so that the used value is the initial value (4)?

Does any of this change if a negative or zero value is declared?

Metadata

Image for: Metadata

Metadata

Image for: Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Image for: Issue actions