kneath / kss

A methodology for documenting CSS and generating styleguides.
warpspire.com/kss
MIT License
4.04k stars 275 forks source link

Preserve relative paths to base in file names #41

Closed lautis closed 11 years ago

lautis commented 12 years ago

Changed Section#filename to return relative path to base directory. This makes sense when you have CSS files in nested directories and some may even have the same "base name". Also, it's a lot easier to link to GitHub repo in the generated docs if you know the full relative path.

mkdynamic commented 11 years ago

I think this is a great idea. It's very common to have some directory conventions for CSS, and showing the path surfaces this information (e.g. you know looking at a module when you see module/button.scss)

benschwarz commented 11 years ago

So essentially, you're saying that this will show the full relative path for every file? I can understand situations when you'd want this, but I'm not certain that this is something that everyone would want.

Also, you've changed the filename method to return a full path, which is a bit misleading, don't you think?

lautis commented 11 years ago

Yes, this would show the relative path from the root documentation path. If you're not using directory structures for your CSS, this wouldn't change anything assuming CSS root path is properly configured.

Section#filename wouldn't return a full absolute path, but the relative path from documentation root. For me, that seems intuitive since path is part of file name. But there could also be separate methods to retrieve path and base name.

benschwarz commented 11 years ago

I think you've won me over. Do you want to rebase from master and ensure that the test suite is running?

:+1:

benschwarz commented 11 years ago

ping @lautis

benschwarz commented 11 years ago

Closing due to a lack of activity.