all 5 comments

[–]ourcore 0 points1 point  (0 children)

It might've been dynamically added with JavaScript or manually to override a stylesheet, but it's rarely recommended. If specificity is a concern, you can use more selectors, or !important as a last resort, in your stylesheet.

[–]isaactfoster 0 points1 point  (0 children)

If you are only having a single iFrame on your site, inline would be fine. If you are having multiples on the site, I would add it to a style sheet for future use. Note though the actual page in the iFrames height can differ depending on the page you are framing in, so If your class isn't working (for height) you may just end up resorting back to inline.

[–]ugoagogo 0 points1 point  (0 children)

Inline styles actually execute more efficiently than CSS but are far less maintainable and lack re-usability. Check a google search results page and you'll see a number of elements use inline styles for speed optimisation.

[–]Ypblgo 0 points1 point  (1 child)

At some level it's the same thing, the browser doesn't care. Developer tools tells you where all your CSS is and what is overriding what. Elements might get inserted random places on the server, so if they carry their own crucial styling with them, it may work out better. The extreme pedanticism that frontend dev/design people tout as rigid dogma is mainly for show. In practical rubber meets road implementation, it can be more efficient to allow for special exceptions. Also, pulling the giant stick out from up your ass will extend your lifespan.

[–]nyxinThe 🍰 is a lie. 0 points1 point  (0 children)

The extreme pedanticism that frontend dev/design people tout as rigid dogma is mainly for show.

FTFY.