Timeline for CSS: single directive generic class vs. style-attribute on element
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 23, 2017 at 12:37 | history | edited | CommunityBot |
replaced http://stackoverflow.com/ with https://stackoverflow.com/
|
|
Jun 20, 2013 at 13:22 | comment | added | Fleshgrinder |
I’m sorry bybe but you’re missing the point here. Everything you said is absolutely true and perfectly fine. But nothing applies to the specific problem I stated above. Let me elaborate. If you have a cached stylesheet with the .text-center class, the browser still has to go through the DOM to find the elements. Whereas elements with an inline style have it directly applied and the browser can directly apply the style (without any further DOM search). Other CSS rules can only overwrite it with !important .
|
|
Jun 20, 2013 at 13:04 | comment | added | Simon Hayter | There's nothing set in stone that says you can't use inline code and I believe the OP knows this including yourself, Inline CSS and External CSS vs inline styling has benefits and features which makes it easier for people to use as well as many features that extends within the realm of inline. | |
Jun 20, 2013 at 13:01 | comment | added | Simon Hayter | Would be silly not to include other features such as :hover and focus as these are important everyday website attributes. | |
Jun 20, 2013 at 12:58 | comment | added | Jukka K. Korpela | Being faster is just a claim that may be true in some cases, but the question was not about external style sheets at all. If you think the second argument applies to the given case, please specify how. Supporting more features is obviously irrelevant when the question deals with only one feature. | |
Jun 20, 2013 at 12:47 | history | edited | Simon Hayter | CC BY-SA 3.0 |
added 66 characters in body
|
Jun 20, 2013 at 12:46 | comment | added | Simon Hayter | @JukkaK.Korpela whats differcuit to understand that CSS is faster due to caching ability's, easier to maintain and supports features more than inline? | |
Jun 20, 2013 at 12:38 | comment | added | Jukka K. Korpela | None of the general arguments given in the answer really applies to the case presented in the question. | |
Jun 20, 2013 at 12:21 | history | answered | Simon Hayter | CC BY-SA 3.0 |