I would like to be able to hide, with a class, the entire <svg></svg> not just the <rect></rect>.
I am using the Rectangle Tool in XD to create placeholder images. Exporting will add a class to the <rect> but not the entire <svg>. I need to hide the entire element so I don’t have keep deleting it from the code.
If I understand it correctly, you want to add an Unsemantic Grid to the page but you want to provide all of the HTML and all of the CSS? So the only thing you want Web Export to do is it to place the HTML and CSS in the place of the rectangle?
OK. Thank you for the example. That makes sense. When Web Export exports objects from XD some of those are exported as a single component while others are exported as multiple components or composite components.
Composite components, like the Rectangle are not directly mapped to a single rect tag:
<rect x=10 y=10/>
but are instead mapped to a SVG container that contains the rect tag inside
So the additionalClasses are being applied to the Rect tag inside of the SVG tag. This is everything you said at the start.
So like the tagName and the subTagName issue I think to solve this there should be additionalClasses and subClasses properties that would apply to composite components.
In the mean time you might also be able to use a non composite component, set the class on that and then set the markupInside property. Or possibly use the new display property of the object. See if either of those work better. There is an example here on the markupInside feature.
I’ll see if I can put an example together with Unsemantic. Examples are great and have been a source of new features and finding existing bugs so keep them coming.