CSS Primer and Stuff
Ok,
so I ran across a cool app for taking in html and spitting out an external css style sheet based on any ids/classes in the markup.
So I figured I would attempt my own (albeit more basic) version (in ruby) for fun or maybe my own use. I don't go as in depth as PrimerCSS do, as I am missing additional features such as tag prefixes and child prefixing. Though I did some extra sorting and grouping.
For example, my layout markup will result in this...
(Primer CSS)/* CSS Generated by Primer - primercss.com */
div#global-loadingdiv {
}div#global-popup-image {
}div.global {
}div.global-content-header {
}div.global-content-nav {
}div.global-content-banner {
}div.global-content-main {
}p.flash-notice {
}div#global-content-stamp {
}div.global-content-footer {
}
----------------------------------------------
(My script)
#global-content-stamp{}
#global-loadingdiv{
}
#global-popup-image{
}
.flash-notice{
}
.global{
}
.global-content-banner{
}
.global-content-footer{
}
.global-content-header{
}
.global-content-main{
}
.global-content-nav{
}
----------------------------------------------
If anyone is interested, here is the source file.
Posted: 2010-01-02 15:32:56 UTC