Highlighted

Illustrator-imposed stroke-dasharray limitation in SVG

Explorer ,
Aug 05, 2020

Copy link to clipboard

Copied

I have an application that generates SVG XML, following the SVG 1.1 recommendation. For one global CSS class definition, I define the style attribute of stroke-dasharray: 24,10,6,10,6,10,6,10. This intended to be a pattern of one long dash and three short dashes, with consistent gaps between them all. When my generated SVG is opened in Illustrator 24.2.3, the paths to which the style is applied renders solid. No dashes. I have found out that it all works just fine when my dash array specification does not exeed the number of values that the Illustrator UI can handle. Since the Stoke panel presents only 6 fields in which to provide dash and gap values, SVG stroke-dasharray values that exceed that number do not get rendered as dashed paths. I was really kind of hoping that Illustrator would abide the rules and render the path as styled in my SVG. Is there any way around this?

Adobe Community Professional
Correct answer by Monika Gause | Adobe Community Professional

You are not opening the SVG, you are importing it. That is an important difference, because Illustrator has to translate the SVG code to something it can handle with its own functionality. What is possible in SVG does not match Illustrator's functionality and vice versa.

You can post a feature request: Please post bugs & feature requests to http://illustrator.uservoice.com

TOPICS
Bug, Draw and design, Import and export

Views

26

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Illustrator-imposed stroke-dasharray limitation in SVG

Explorer ,
Aug 05, 2020

Copy link to clipboard

Copied

I have an application that generates SVG XML, following the SVG 1.1 recommendation. For one global CSS class definition, I define the style attribute of stroke-dasharray: 24,10,6,10,6,10,6,10. This intended to be a pattern of one long dash and three short dashes, with consistent gaps between them all. When my generated SVG is opened in Illustrator 24.2.3, the paths to which the style is applied renders solid. No dashes. I have found out that it all works just fine when my dash array specification does not exeed the number of values that the Illustrator UI can handle. Since the Stoke panel presents only 6 fields in which to provide dash and gap values, SVG stroke-dasharray values that exceed that number do not get rendered as dashed paths. I was really kind of hoping that Illustrator would abide the rules and render the path as styled in my SVG. Is there any way around this?

Adobe Community Professional
Correct answer by Monika Gause | Adobe Community Professional

You are not opening the SVG, you are importing it. That is an important difference, because Illustrator has to translate the SVG code to something it can handle with its own functionality. What is possible in SVG does not match Illustrator's functionality and vice versa.

You can post a feature request: Please post bugs & feature requests to http://illustrator.uservoice.com

TOPICS
Bug, Draw and design, Import and export

Views

27

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 05, 2020 0
Adobe Community Professional ,
Aug 06, 2020

Copy link to clipboard

Copied

You are not opening the SVG, you are importing it. That is an important difference, because Illustrator has to translate the SVG code to something it can handle with its own functionality. What is possible in SVG does not match Illustrator's functionality and vice versa.

You can post a feature request: Please post bugs & feature requests to http://illustrator.uservoice.com

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 06, 2020 0