svg-sprite/gulp-svg-sprite

SVG dimensionAttributes boolean not being respected

mcraiganthony opened this issue · 10 comments

When SVG dimensionAttributes boolean is set to false the generated sprite still has height and width attributes on the symbols.

xmlDeclaration and doctypeDeclaration work as expected.

I reverted to 1.2.19 to verify.

jkphl commented

Thanks for reporting, @mcraiganthony! I'll check that asap!

jkphl commented

@mcraiganthony I tested with both svg-sprite and gulp-svg-sprite and both behave correctly / as expected. Could you please double-check / confirm that you're using a configuration like this:

var config = {
    svg: {
        dimensionAttributes: false
    }
}

I'm asking because the option used to be somewhere at shapes.dimensions (or similar) a couple of releases ago. Thanks for confirming!

@jkphl Yep. See my config below. I also deleted my node_modules and ran npm install just to make sure all dependencies were correct. I'll have a co-worker update to 1.3 and see if he gets the same results. Thanks!

screen shot 2016-05-16 at 4 08 10 pm

@jkphl My co-worker updated to 1.3 and sees the same results ... sprite symbols have width and height attributes.

jkphl commented

That's super strange. I didn't test with symbol mode, it was view mode IIRC, so I'll do that tomorrow and let you know. Thanks for helping!

+1 on this -- will have to downgrade until fixed :-)

jkphl commented

No idea what the exact reason was (I suspect a change inside lodash with the handling of NodeLists), but it should be fixed now (new release 1.3.1). Can you confirm?

Yes, works perfectly :-) thanks! 👍

Thanks @jkphl! Much appreciated.

jkphl commented

@mcraiganthony @hesselberg Glad that it worked for you! :)