• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
2

SVG export is now adding "stroke-width: 0px;"

New Here ,
Apr 16, 2024 Apr 16, 2024

Copy link to clipboard

Copied

Situation

let take a simple square, no stroke:

LeQuestAdobe2_0-1713251832530.png

 

In older versions of illustrator (example v27) it exports this

<?xml version="1.0" encoding="UTF-8"?>
<svg id="uuid-6ba987cb-39fb-40cd-98de-d8b109dabf06" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 720">
  <g id="uuid-4f72d452-3eef-4411-a3a5-dacea231604c" data-name="red square 27">
    <rect width="720" height="720" style="fill: #ed1c24;"/>
  </g>
</svg>

 with no information on the stroke

 

and with v28.4.1 it now does this

<?xml version="1.0" encoding="UTF-8"?>
<svg id="uuid-9197d4b2-a83e-462e-a5ec-8eed0be30063" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 720">
  <g id="uuid-684f80f4-6e08-4bfc-90da-cd37ceef13b5" data-name="red square 28">
    <rect width="720" height="720" style="fill: #ed1c24; stroke-width: 0px;"/>
  </g>
</svg>

with the "stroke-width: 0px;" added to the style.

 

Problem

Why is this needed? no stroke style is the same as stroke 0, right? There's 1000s of information that are exported because they are "0", no need to add them.

Was this intentionally added to solve something that I don't know?

Is there a way to say to Illustrator to "not add this information" to the export?

This became a problem to us since we were targeting the stroke's style (and adding, animating it), and this basically because and unexpected hurdle.

TOPICS
Import and export

Views

367

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
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 05, 2024 Jun 05, 2024

It's fixed in the current Beta (28.6 578). fill: #000 is also removed.

Votes

Translate

Translate
Adobe
Community Expert ,
Apr 16, 2024 Apr 16, 2024

Copy link to clipboard

Copied

Are you using Export As or Save As? What exact export settings are you using?

Votes

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
community guidelines
New Here ,
Apr 23, 2024 Apr 23, 2024

Copy link to clipboard

Copied

 

We're using Asset Export. These are the settings:

LeQuestAdobe2_0-1713863891321.png

 

Votes

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
community guidelines
New Here ,
May 21, 2024 May 21, 2024

Copy link to clipboard

Copied

The "new" svg export is giving us some trouble as well. We need to export without a fill color since we are coloring our icons through css. Before the update the svg was exported without a fill attribute when colored completely in black. Now illustrator adds a fill attribute which makes our icon creation process 1 step longer (we need to open the newly created svg file in notepad and remove the stroke with=0 and the fill=000). What is the reason for this change? Why add unneccessary code?

Votes

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
community guidelines
Adobe Employee ,
May 21, 2024 May 21, 2024

Copy link to clipboard

Copied

Hello @defaultz306qicmv5ze, @LeQuest Adobe2,

Thank you for your patience. I have shared your observations with the product team, and they are currently investigating the issue. I will update this thread with more details as they become available.

In the meantime, the only workaround is to roll back to a previous version of Illustrator (https://adobe.ly/3V7ZNxx). I understand this is not ideal, and I apologize for the inconvenience.

If you have any further questions or need assistance, please feel free to reach out. We're here to help.


Thanks,
Anubhav

Votes

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
community guidelines
New Here ,
Jun 04, 2024 Jun 04, 2024

Copy link to clipboard

Copied

Has there been any update to this issue?

Votes

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
community guidelines
Community Expert ,
Jun 05, 2024 Jun 05, 2024

Copy link to clipboard

Copied

LATEST

It's fixed in the current Beta (28.6 578). fill: #000 is also removed.

Votes

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
community guidelines