Closed bemurphy closed 11 years ago
I would love to see this merged. Any thoughts @kneath?
In my opinion a better thing to do would be to support this type of syntax:
Styleguide 10.1 Buttons
@twe4ked, @bemurphy This should absolutely be allowed — If you want to add some tests I'll handle the merge / acceptance.
@benschwarz got it, a bit slammed right now but should take of this soon. Thanks.
@bemurphy That'd be rad!
After thinking abotu this, I think this should be good. I'm not entirely sure why I kept it to numbers to begin with, but worst case we just go back to numbers once we find a problem with it.
@benschwarz added a few tests. My less and SASS are weak btw, just heads up.
BTW this probably needs a rebase before merge, I can take care of that.
I think I found an unrelated issue in the parer_tests while checking this btw, will open separate issue for tracking.
So the string can also be "Styleguide Buttons - Another descriptor", we don't need the dot, right? You sir, are a legend.
Can you add some details to the read me / spec docs while you're at it (otherwise people won't know the change that you've made here)
Sure, will add some doc shortly.
Not sure if the dot is needed, to be honest. Will write a test for it and see what happens. There should probably be at least one test fixture for that pattern in the .css file, checking for that if we keep it.
Oh shiny, I just tried:
// Styleguide Buttons - Core Stuff.
and:
// Styleguide Buttons - Micro Stuff.
in an install I've got and it seems to work there. neat.
So, so hot.
Decimal-style numerical keys still seems better than strings that are based on no naming conventions. Why not parse this string into two pieces of data?
For example: Styleguide 10.4 Buttons
results in two fields on the section object, where "key" is "10.4" and "name" is "Buttons".
@bemurphy, I think this is ready to be merged. Any chance you can get it cleanly merging with master?
@benschwarz yeah I'll rebase and squash it later tonight I think
:heart:
Oops commented on wrong PR just now...
@benschwarz this is rebased and squashed.
This is an experimental idea to allows words for section keys. So, Forms.Radiobuttons, etc. You could also mix/match like Forms.1 to isolate numbering changes.
It's possible it should require a flag to KSS parser to enable this mode.
It's also possible this is crazy. I kind of like the idea because then I think you can reorder (or not sweat the ordering when starting out) without having to edit toplevel numbers every time you shuffle.