| 20:19 | <innovati> | Is there any issue with adding a <style> tag to documentElement (after body closes) using JavaScript after the page loads in a browser? |
| 20:20 | <innovati> | <html> <head></head> <body></body> <style></style> </html> |
| 21:51 | <Domenic> | innovati: it makes your page invalid HTML; not sure if that's what kind of issue you're wondering about. |
| 21:51 | <Domenic> | It generally will be bad for performance as then you'll need a restyle/etc., which is why it's suggested to keep style tags in the head. |
| 21:52 | <innovati> | I have to add the CSS via JavaScript, but depending on when our JS runs, sometimes it's not coming after the CSS on the site, so I'm wondering the latest in the document I can add it so ours comes last |
| 21:53 | <Domenic> | I don't remember if document position or time of insertion is more important for CSS cascade |
| 21:53 | <innovati> | it seems to work in the browsers where I would need to use it |
| 21:53 | <innovati> | the order in DOM I believe |
| 22:08 | <innovati> | Seems to work IE9+ |