svg-sprite / gulp-svg-sprite

SVG sprites & stacks galore — Gulp plugin wrapping around svg-sprite that reads in a bunch of SVG files, optimizes them and creates SVG sprites and CSS resources in various flavours
MIT License
648 stars 43 forks source link

where are the "/TEST" css files? #33

Closed yairEO closed 9 years ago

yairEO commented 9 years ago

There are only SVGs on the project's /TEST folder and no CSS files.

jkphl commented 9 years ago

Hi @yairEO,

sorry, but I have no idea what you are talking about?! For what do you need CSS files in the test folder? Please explain in more detail what you are missing.

Please bear in mind, that this package is just a wrapper around svg-sprite. Some more heavy-lifting tests are done there already.

Cheers, Joschi

yairEO commented 9 years ago

Well, the README says:

In this very basic example, mostly default settings will be applied to create a traditional CSS sprite (bundle of SVG sprite and CSS stylesheet).

also it says it can output SASS file. so, IMHO, the test folder should include the generated CSS and SASS files so one could actually test so see if the positions in those actually match the generated SVG..what's the point in a TEST folder if you don't test the CSS output and if it's actually working and rendered correctly? Also it is interesting for developers to see a tested CSS/SCSS output file before they will even consider using the code.

jkphl commented 9 years ago

@yairEO As you might know, the test folder contains some basic tests to verify the libraries integrity. This isn't something regular developers would want to use. The library can produce Sass files, but this is not a question of the included tests. It sounds to me that you misinterpret the included tests somehow. Also, as I said before, the heavy-lifting tests (like visual comparison of generated CSS files) are included in svg-sprite, not in the gulp wrapper. The tests here only verify the Gulp wrapper functionality.

yairEO commented 9 years ago

but a huge part of that functionality is the creation of a matching CSS rules to accompany the SVG wouldn't you say? so how do you actually test this? you just visually see that the svg sprite files are created and that's it?

jkphl commented 9 years ago

Once again: As a user of _(grunt/gulp-)svg-sprite_, you are throwing in your own SVG files, and individual stylesheets are rendered. How could *svg-sprite come with inbuilt tests for that? The test folder is for development puposes only (with me being the only developer). Thus, there's nothing you'd have to worry about. There are no tests for users. In fact, you shouldn't even get the test folder when installing via npm AFAIK.

yairEO commented 9 years ago

yeah but I want to know how the CSS/SCSS look like before I'm gonna install anything. I know the test folder isn't getting installed and it's just for you as a developer, that is obvious :)

jkphl commented 9 years ago

There is no way to know how it looks like unless you install and use it.

yairEO commented 9 years ago

but you have the /expected folder with the final SVG files. Each one has it's only CSS file which describes the SVG spread and positions, and all I'm saying is that you could include those CSS files to correlates with the SVG files, because one is meaningless without the other for, (maybe not for you but sitll..)

jkphl commented 9 years ago

It doesn't make any sense to make a 1:1 comparison of CSS files, as the plain CSS file, the Sass one, the LESS one and the Stylus one are completely different. Each renderer produces a different output (which might change from version to version of each of these tools). Instead, svg-sprite takes a visual approach and compares rendered HTML pages with the sprite against reference images. So there's no direct CSS comparison.

yairEO commented 9 years ago

well, i'm used to seeing how all the output will be like before I even try to install anything, just to be on the safe side. for example, many projects do show the CSS on their test folder, or write how it would look like in the README, like this project

jkphl commented 9 years ago

I got your point. However, as I said, svg-sprite (and its wrappers) doesn't offer this at the moment and I tend not to offer it due to maintainability reasons and very little demand (in fact, you're the only one who has ever asked for). Pleas install the module an run the tests to find out.