Skip to main content

Include "class" attribute in svg exports

  • August 13, 2021
  • 1 reply
  • 7619 views

Peter_Uithoven

Currently Figma can export svg’s with id attributes when Include “id” attribute is enabled. This uses the layer names as id’s, but it also makes sure they are kept unique by adding _2, _3 etc.
This is great, but I have a project where I need to target multiple layers with the same css selector, this means I need to create selectors with id, id_2, id_3 etc.

I’d love an additional Include “class” attribute checkbox, that would add non unique classnames based on layer names. This way the designer could easily “mark” certain layers so they can be targeted by the same css selector. As long as spaces are maintained this could even allow adding multiple classes.

This is kind of related to

  1. Add as much context as possible (screenshots, Figma files, mockups, etc.)

I’m curious what other people think about this.

This topic has been closed for comments

1 reply

  • 0 replies
  • September 12, 2021

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings