kneath/kss

Please add the ability to auto-increment the styleguide entries

Closed this issue · 4 comments

Hi,

Would it be possible for the styleguide generator to automatically increment the styleguide index? Currently it is quite fiddly to manage the indices across lots of examples.

So for example I could do something like this:

/*
My first element

Markup:
<p class="foo">Lorem</p>

Styleguide 2.n
*/

.foo { color: red; }

/*
My second element

Markup:
<span class="bar">Ipsum</span>

Styleguide 2.n
*/

.bar { color: yellow; }

When the styleguide was generated, KSS would recognise n as a placeholder, and replace it with the appropriate integer:

2.1 - My first element
<p class="foo">Lorem</p>

2.2 - My second element
<span class="bar">Ipsum</span>

Thanks,
Dan

I think would be a strange feature for us to implement in kss. I suggest that you reconsider your naming conventions (and perhaps don't use numbers for your style guide)

Hi Ben,

Sorry for the delay, I just noticed my notification notification..

I'm using KSS Node - perhaps it does things differently from KSS Ruby?

However in the KSS spec everything is numbered off, so I assumed that the numbering was required for items to be added to the TOC?

Thanks,
Dan

@dotherightthing The spec now has other ways of describing the "styleguide section", I'm not sure that node-kss has implemented that feature yet, as its fairly new.

Ah, thanks, I just checked out the spec and that looks much more user friendly :)

My fork of the KSS Node repo is quite out of sync with the original repo, so I'll need to get myself in sync before I can check whether the latter has been updated to match the latest KSS spec.