I create a lot of html and css pages. Is there a way to markup an html file, than generate a css file from the markup.
Here's what i'm thinking:
Example Markup
<body id="home">
<section id="main">
<article>
<p>Some content</p>
</article>
</section>
<aside>
<article>
<p>Some more content</p>
</article>
</aside>
</body>
Example of gen开发者_运维问答erated CSS
#home { }
#home #main { }
#home #main article { }
#home #main article p { }
#home aside { }
#home aside article { }
#home aside article p { }
Yes, there is: parse the HTML and walk the DOM tree to generate your skeleton CSS file.
PS: that IS very impractical CSS.
精彩评论