getchopchop / chopchop

Front end user interface primer toolkit for the pro's
https://getchopchop.github.io
MIT License
31 stars 7 forks source link

Function to return array of classes in stylesheet #211

Closed daveredfern closed 7 years ago

daveredfern commented 7 years ago

Same as colours but returns an array of anything we want.

not sure what to call this function so open to ideas.

getCss('g-col-lg')

this would return an array of anything with g-col-lg in it.

I managed to do a regex that might help .([^\s,{]+) or .g-col-([^\s,{]+).

I can manually print them out once we have the array where ever we want them to appear.

Triickii commented 7 years ago

@daveredfern has this been done now?

daveredfern commented 7 years ago

@Triickii yes, feel free to refactor it. If you look in utilities you can see what we're trying to achieve.

gazjoy commented 7 years ago

done in #213