Yahoo reset-fonts-grid Syntax

Hi,
What’s the meaning of these rules:


.yui-gb .yui-g div.first{
 *margin-right:4%;
 _margin-right:1.3%;
}

why there is * and _ before the property ?
It sound strange to me the decimal coma value (1.3%)
as well.

Thanks in advance.

Bye.

*, _ are css ie hacks.

Taxation of an individual’s income in Italy is progressive. In other words, the higher the income, the higher the rate of tax payable.
In 2010 the tax rate for an individual is between 23%-43%, In addition to direct taxation (IRPEF), there is also a regional tax of 0.9%-1.4% and a municipal tax of 0.1%-0.8%.

that should appear strange to you also :lol:

one word: look. for the “ie box model”. :slight_smile:

Are you making fun of me ?

no, I think noonope’s serious (or making fun of Italian taxes lawlz)

Older versions of IE (before 6) would go ahead and read the property even if it started with an illegal character like * or _.

IE 6 and later doesn’t. IE for Mac did, I believe.

I don’t believe there’s any newer browser out there who still reads stuff starting with * and _, but it also would surprise me that Yahoo (which already starts you out with bloataceous cetaceous code overkill) would have code for such an old browser… making me wonder if it’s not the CSS hack noonope and I think it is.

And the numbers are ridiculous. 1.3%? Arg. Like taxes.

well, let me explain.

you appear to be of italian origin. so i wanted you to relate to something you feel close to: an italian law. that uses values that seem arbitrary to you. but that are making sense for those that created them. like yahoo, in our case.

since it has correction added to the margin declaration, one would immediately think about the dispute over the box model in ie. assuming you never have heard of it, i hinted you’d search for the subject. meaning: do a little homework :slight_smile:

and yes, the underscore and the star used together with a selector usually means ie hacks. that is, making some declarations be understood by a particular UA. and so, i’ve hinted another homework for you to do.

in your signature you have a last site work. that implies you are a developer, and so i found it hard to believe you’ve never heard of the underscore hack or the start hack. hence the humorous approach. because i always find it odd, at least, how these 1.4% taxes are imposed on us. i mean, what’s wrong with 1%?

both topics have been greatly covered here on SP forums. one quick search should give more answers than you need.

one last thing: if you thought i was trying to make fun of you, i apologise :cool:

I think noonnope is trying to make the point that while some countries use a comma to show a decimal part, others (including all variations of English) use a full stop, aka period. As HTML and CSS have been developed using English as their base language, they also use the English style decimal.

thanks Steve :slight_smile:

Sad part is there is no need to EVER send IE different widths like that if you just take the time to understand the box model differences, follow some simple rules and learn two or three simple behavioral fixes like display:inline on floats and haslayout triggers.

But given what a steaming pile of crap YUI, Grid, and every other “CSS framework” is, setting CSS back a decade in functionality and defeating one of the ENTIRE POINTS OF USING CSS IN THE FIRST PLACE…

Well, my advice is don’t use YUI or other ‘frameworks’ as they do NOT make it simpler, they make it more complex and shoot both your accessibility and ease of page construction/maintenance in the foot! You have a site you are working on that’s built with that bull, rip it out and build it over with actual semantics and separation of presentation from content.

Me, dark alleyway, Yahoo programmers… Bad scene. <colbert>I for one am shocked, does Yahoo still have customers?</colbert>

Hell I’ve been discovered !

Well, my advice is don’t use YUI or other ‘frameworks’ as they do NOT make it simpler, they make it more complex and shoot both your accessibility and ease of page construction/maintenance in the foot! You have a site you are working on that’s built with that bull, rip it out and build it over with actual semantics and separation of presentation from content.

Amen. I can’t speak for their JS stuff because I haven’t seen it (and many people seem to like it) but their reset and grid system is just… monstrous. Way way overkill… it’s like you need as large a CSS file as possible to keep the zombies from eating your PC or something.

I’m not saying it’s worse than other resets and other grid systems. I just see them as wastes of code. And, really, ARE you supporting IE5? Because if you’re not, that’s code going to a browser who’s still not going to look good because your own CSS isn’t written for it, nor your JS or anything else. It’s like leaving that isNN7 stuff in your Javascript.

Meh, newer developers haven’t co-existed with IE5 (I really haven’t either but I’ve built for it), just as many newer developers have never built a table. (I learned how to build a table a good year after I started learning HTML/CSS… because I hadn’t needed a table until then!)

Well, be fair, the layout in every one of those signature links appears to be broken here.

@whisher – Take “last site” for example where on large font/120dpi systems the text is overlapping the image because it’s in a fixed height px metric container, there’s 6k of javascript inlined in the HEAD for nothing, it abuses semantic tags by wrapping paragraphs around non-paragraph elements like LABEL and INPUT (they already have meanings, you don’t need to add more), doesn’t degrade gracefully scripting off, doesn’t degrace gracefully CSS off, relies upon presentational classes like “center” and “clearfix”, puts comments after closing tags which is why the content dissappears in IE7-, uses flash for a image rotator, and ends up an ungodly 866K in 50 separate files which is why it takes a year and a half to load.

Which again, when you have twice as much javascript as you do images… 552k of javascript?!?

Not trying to be mean – just want to point out that, well… 15k of markup for 2.1k of plaintext means you’ve got problems… especially with the broken layouts added on top of it. That page in terms of filesizes and filecounts is seven times the upper limit I’d ever allow for a single page on a site, and fifteen times what I would consider ideal – and most of the blame can be hung around the neck of poor image optimization and the use of javascript for nothing that should be done on a page in the first place.

px fontsizes… still an issue…

Which is funny since PX should NOT be resized without resizing ALL PX elements – that’s something FF screws up thanks to it’s nyetscape heritage.

But then I’ve always leaned a bit on the side of IE’s implementation as making more sense when it came to accessibility AND development.

You can’t resize a pixel, and if you’re going to then resize ALL pixels.

Yes … it’s ironic that the one thing that IE does right and that all the other browsers do wrong - both according to the specs and to common sense - is the cause of so many problems for IE users (:

It’s due to “CSS-pixels”. There was an interesting (maybe not entirely-correct) explanation of them on ppk’s blog (talking about device-width, mobiles and zoom):

This is apparently why they are flexible units. Real pixels aren’t flexible at all: I only gots so many of the darn things on my screen.

Where is it ?

:rofl:

it’s funny… and not so.

try navigate your Bunga Bunga with images being blocked. you won’t get anything that makes sense.

nevermind the 1280px width.

don’t take it the wrong way again. i only try to point out things you might have missed.

http://translate.google.com/translate?hl=en&langpair=it%7Cen&u=http://www.repubblica.it/politica/2010/10/28/news/bunga_bunga-tormentone-8515695/

Regarding semantics (file sizes and bloat aside) I can’t say anything bad about jQuery… at least that framework makes you do the work (in regards to using naming conventions) and it doesn’t make a bunch of wild assumptions about how your columns or other components should look. It’s designed to be as unobtrusive as possible, which is a good thing. And yes I know it’s not better than hand coding, but I’ll give the developers the credit in that they force the users to learn something rather than blindly attaching it (though jQuery plug-in makers are screwing this up). With CSS frameworks however, too many people are depending on a bunch of pre-written (poorly produced) files that both bloat your page and screw up the semantics into generic fluff which is as bad as if you embedded the style inline. :frowning: