CSS 'fragmenter' or unconsolidator?
Is there a tool to convert something like
font:bold 1.9em "Book Antiqua",Verdana,Tahoma,"Trebuchet MS",sans-serif;
to
font-weight: bold; font-size: 1.9em; font-family: "Book Antiqua",Verdana,Tahoma,开发者_Go百科"Trebuchet MS",sans-serif
in CSS files?
BTW, I am not sure what to call this process.
Elbow grease, unfortunately.
More helpfully, I suppose that if your strings are always going to be in the same format (font weight first, size next, fonts 3rd, etc) it's possible that you could write a helper function to parse those strings, but it will be intense...
If you use Chrome (or this would work with firebug as well) you can bring up the CSS properties for an element in the developer window (ctrl-shift-J), choose the elements tab and click on an element.
Even if the CSS applied to the element is short-form the browser will expand that out to long-form and you can copy/paste right from the "Computed Style" sidebar.
Chrome Dev CSS http://img2.imageshack.us/img2/2649/chromedevcss.png
精彩评论