Timeline for Moving CSS rules from a CSS file to inline attributes
Current License: CC BY-SA 3.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 21, 2014 at 14:04 | comment | added | Not that Charles |
this can definitely be trimmed down more manually. Drop the var, assign n[j].getAttribute('style'), change charAt(0) to [0], no need for .replace(': ',':')... but does it work with two classes? Also, this seems to only work with XHTML, not HTML5 (I don't think it will output tags that are not XML-compliant).
|
|
| May 15, 2014 at 20:42 | comment | added | Kwebble | @Peter_Taylor: true, the script doesn't do that. But that's not how I read the requirements. And from my limited Python knowledge I don't see it handled in the Python version either. But I may very well be wrong about that. | |
| May 15, 2014 at 14:22 | comment | added | Peter Taylor |
Buggy. If a node has an id and a class, it should get the rules of both, where they don't conflict. Where they do conflict, #id should have priority over .class regardless of the order of the rules in the CSS.
|
|
| May 15, 2014 at 14:09 | review | First posts | |||
| May 15, 2014 at 14:23 | |||||
| May 15, 2014 at 14:02 | comment | added | A.L | Oops, in fact the rules don't allow jQuery because it's not a part of the Javascript language. I started to think about a pure JS solution. | |
| May 15, 2014 at 14:00 | comment | added | Kwebble | With jQuery it might be possible to reduce code size. But that can't work without the jQuery library. And I liked investigating the DOM manipulation for CSS. | |
| May 15, 2014 at 13:56 | comment | added | A.L |
I started thinking about a jQuery solution yesterday but I didn't find an easy way to modify the HTML page inplace. I like the idea of the </iframe>. I don't see any problem with the serialization if it's only differences in tabulation.
|
|
| May 15, 2014 at 13:50 | history | answered | Kwebble | CC BY-SA 3.0 |