maioman
maioman

Reputation: 18762

Svg - Firefox calculating wrong width when setting stroke-width

Consider this fiddle in Chrome and FF:


in Chrome the width and height get calculated perfectly taking stroke-width in account.

In FF width and height properties have a little offset without stroke-width (in my ex. 4px);
but adding stroke-width has the following problems:

is this a known issue or am I missing something obvious?

Upvotes: 0

Views: 407

Answers (1)

Robert Longson
Robert Longson

Reputation: 124269

In path commands commas can only be placed between numbers if the markup is to be valid. The comma preceding the Z is invalid in your example and Firefox correctly rejects this, terminating the path at this point. Chrome incorrectly continues to parse the path.

Upvotes: 1

Related Questions