- This topic is empty.
-
AuthorPosts
-
July 24, 2012 at 2:19 am #39036
NicholasChamberlin
MemberI was listening to the latest shop talk show and I started to wonder why there isn’t a way to cause the browser to zero everything out for you. How often do people actually use the css defaults the browser puts in place, over changing them? I understand that the web used to be a different place, and there are a lot of old websites out there that count on the browser defaults to be shown correctly… but nowadays, the web is different and I don’t think the browser css presets are very helpful.
Most web developers use CSS resets or Normalize their code so there’s no surprises in any one browser, I base that on absolutely nothing, but I’m pretty sure that’s right.
I don’t know if this would be a good proposal for the W3C, or if i’m way out in left field on this, but I think a way of resetting all of the numerical defaults to zero would be a huge step forward. Imagine with me a wonderful world where you could do this:
html {
browser-reset: all;
}and every css property that takes a numeral is set to zero.
OR if you like some presets but not others, you could do this:
html {
browser-reset: margin, padding, border;
}If you just wanted to set the presets for paragraphs back to zero, you could do:
p {
browser-reset: all;
}Is this something worthy of proposing, or how does that work, is it something you think could be realistic, or is this a bad idea?
Some considerations for things like ‘font-size’ would have to be thought over, but for the most part I think it’s pretty clear and simple.July 24, 2012 at 4:41 am #106668Vermaas
ParticipantWell the idea is good in my eyes. But I’ve never figured out the real value of normalize.css or a CSS reset. The difference in the modern browsers is not that big. Off course they’re all experimenting with some brand new prefixes, but the common CSS is all the same.
So your idea would be great for the older browsers.. But those older browsers will not get any CSS elements. So the idea is good, but I’m not for sure it adds also some kind of value to the current CSS properties.
The only reset I use is:
* { margin: 0; padding: 0; }
And that works fine for all browsers.
July 24, 2012 at 5:37 pm #106686NicholasChamberlin
Member@andy: but that adds tons of weight to the inspector, it’s harder to debug stuff with so much added to the webkit inspector. I thought a property that did basically what you do with that reset, would solve this problem.
July 25, 2012 at 7:18 pm #106780joshuanhibbert
Member@NicholasChamerlin With the way the webkit inspector works, a single property would get broken down into its individual components anyway, so it wouldn’t actually make a difference when inspecting an element. This could change in the future of course.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.