General Question

makemo's avatar

DIV class & id name parser for automatic CSS file generation?

Asked by makemo (531points) October 21st, 2008

Is there any tool that can automatically parse a html file’s containing div class & id names and, from that, automatically generate a CSS document with those style elements pre-written?

I’m seeking either a tool (as in application or script) or some kind of method to speed things up a little.

I’m using a Coda + CSS Edit combination. These apps can’t do this, or?

Observing members: 0 Composing members: 0

10 Answers

philo23's avatar

I saw something on reddit today about something called HSS, I can’t remember the link but google it, it sounded like it does what you want.

makemo's avatar

Hmm, if it’s this HSS you meant, I’m not sure it’s exactly what I’m looking for (I may miss something, as it’s looking slightly too technical for me).

I just need some simple way of extracting all the class names and ids into a ready-made CSS sheet.

Thanks for your reply, though, philo23!

philo23's avatar

@makemo ah, i’m sorry i read your question wrong, my bad, i thought you wanted to make dynamic CSS files, with say changable variables. Sorry about that. Now about extacting it from HTML, i’d say regular expressions could do it, but they are my swarn enemy, so i’m afraid couldnt help you any more than i have.

Sorry about the miss understanding, good luck getting it done.

makemo's avatar

Yeah. Regular Expressions. That’s a good idea.

I’ll try my hands at that, but I, also, must say I’m a sworn enemy of regexes. This is arcane stuff :)

But, you know, I think it would be such a huge time saver, at least for me. When I code HTML, I tend to throw in as well as rename already existing class/id names in a very rapid way, initially.

Updating the CSS document with the new and renamed class-/id-names is very tedious and killing my concentration on the structural work. SO. Here’s where an automated way of, at least, getting new classes/ids into the .css file, would be such a relief, I thinkā€¦

Edit: I’ll try remember keeping you posted if I find a solution.

philo23's avatar

Thanks, i’d like to hear it if you do come across one.

ajurie's avatar

http://blog.corunet.com/english/automatic-css-the-stylizator I don’t know if this link sends you in the right direction, but it is worth a shot.

makemo's avatar

re: ajurie. That’s somewhere along the lines of what I’m looking for! Thanks, I’ll look into it.

Response moderated (Spam)
makemo's avatar

markdaddy: spot on! thanks.

Response moderated (Spam)

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther