News for hackers. Stuff that matters.
Re:All style tags after the first 30 style tags are not appl... by Semiapies on Monday January 04, 2010 @03:22PM (#1031131)
Hmm, odd limit. I've never had more than 5 style tags on a page, though, and fewer since I got into using yuicompressor.

Has anyone here actually run into this in practice? If so, how? Just curious.

Re:All style tags after the first 30 style tags are not appl... by n8agrin on Monday January 04, 2010 @03:27PM (#1031141)
Create a modular UI framework that allows modules to import their own stylesheets. You hit this problem really quickly.
Re:All style tags after the first 30 style tags are not appl... by qeorge on Monday January 04, 2010 @03:41PM (#1031183)
Perhaps, but if you're including 30+ stylesheets in a given page you're doing it wrong.

Every stylesheet is an extra (blocking) HTTP request. 5 is already too many, but 30 is seriously impacting your user's experience.

Re:All style tags after the first 30 style tags are not appl... by DrJokepu on Monday January 04, 2010 @03:45PM (#1031188)
This bug can be triggered by inline stylesheets as well which do not create additional HTTP requests.
Re:All style tags after the first 30 style tags are not appl... by qeorge on Monday January 04, 2010 @04:09PM (#1031249)
Fair point, but in what case does including 30 inline stylesheets make sense?

I'm hesitant to call this a bug.

Re:All style tags after the first 30 style tags are not appl... by pyre on Monday January 04, 2010 @04:25PM (#1031272)
If it was meant to be a feature, it should have at least been documented. How is it good to have undocumented, arbitrary limitations on a platform that you are using?
Re:All style tags after the first 30 style tags are not appl... by daleharvey on Monday January 04, 2010 @05:53PM (#1031405)
using inline style tags directly after elements can have a noticeable speedup on a pages rendering, dynamically generated pages could quite easily have well over 30 with the only downside being this silly limit.

and that isnt mentioning the boundary situations for things like web page builders with the ability to user define styles in which having a "lot" of style tags is architecturally a good idea.

I am quite tired of this "your doing it wrong" meme when its used instead of "you arent doing the same thing I am doing"

Re:All style tags after the first 30 style tags are not appl... by jey on Monday January 04, 2010 @04:56PM (#1031330)
It makes perfect sense if you're generating your HTML and CSS from some kind of code-generator. Limiting it to only 30 style tags is really arbitrary and small.
Re:All style tags after the first 30 style tags are not appl... by knuckle_cake on Monday January 04, 2010 @04:34PM (#1031294)
The one time I've run into this 'bug' in the past was on a site that used lots of javascript plugins, more and more of which are coming with their own CSS files nowadays.

Of course you can concat them together, but that adds a maintenance burden in the future whose size can vary wildly.

At the very least, there is a documentation bug here. The reason for this seemingly arbitrary limit should be documented by MS.

Re:All style tags after the first 30 style tags are not appl... by pavs on Monday January 04, 2010 @04:16PM (#1031261)
Well, with MS, its a feature.
Re:All style tags after the first 30 style tags are not appl... by dkarl on Monday January 04, 2010 @06:48PM (#1031491)
At MS, it might be dictated by a coding standard.

More seriously, I was once treated VERY skeptically by an old-school programmer (not at MS, never worked there) when I replaced some of his fixed-sized buffers with resizeable ones. "If our customers are running workloads that create more than 256 frooble node objects, I want to hear about it." Via a bug report? Really? And then get a new bug report next year when the new limit is reached? But he was adamant, and if it was up to him we wouldn't have made the change at all. The way he worked, you knew how many frooble node objects the customer needed, and if you were wrong then you fixed the code.

Re:All style tags after the first 30 style tags are not appl... by ubernostrum on Monday January 04, 2010 @09:02PM (#1031666)
It's not unheard-of for components on a page to be separately generated, and for each to emit its own HTML and style info.
Re:All style tags after the first 30 style tags are not appl... by thenduks on Monday January 04, 2010 @10:22PM (#1031769)
Two words:

development mode

Re:All style tags after the first 30 style tags are not appl... by jeroen on Monday January 04, 2010 @03:42PM (#1031185)
I'd hope there would be server side combining of stylesheets. I have seen performance suffer from including about 10 stylesheets; don't want to imagine 30+.
Re:All style tags after the first 30 style tags are not appl... by mikeryan on Monday January 04, 2010 @06:25PM (#1031453)
In the reddit thread this seemed to crop up a lot in Drupal where each module installed can use its own CSS sheet.

There's apparently a setting to merge them but at least in that case something like this issue cropping up makes sense.

Re:All style tags after the first 30 style tags are not appl... by Semiapies on Monday January 04, 2010 @06:38PM (#1031472)
OK, I suspected that. I think that's a code smell, though; I have trouble seeing why you wouldn't want to get such styles into the main stylesheet.
Re:All style tags after the first 30 style tags are not appl... by wgj on Monday January 04, 2010 @03:41PM (#1031182)
My first web app (no longer active) allowed dynamic styles to be applied to different elements on a page. I used dynamically generated <style> tags to do this, and yes I did hit this limit on IE.

These days, I might dynamically generate a CSS file in that situation.

Re:All style tags after the first 30 style tags are not appl... by CitizenKane on Monday January 04, 2010 @03:53PM (#1031210)
When using Drupal it can be pretty easy to run into this (and I have). Modules are allowed to add default stylesheets for their forms/controls/etc. so in a website with a large number of modules this sometimes happens. First time I ran into this it took quite a bit of time to figure out.

Drupal has a performance feature, which will take these CSS files and automatically aggregate them together. This can make for difficult debugging because problems will disappear when you move from a development to a production environment.

Re:All style tags after the first 30 style tags are not appl... by treyp on Monday January 04, 2010 @10:11PM (#1031758)
Developers on the Facebook Platform ran into this problem a few years ago. Facebook had a bunch of style tags in their source already -- it seems like they put them in different pieces all over the place.

When you would write an application (your FBML is put into their layout) and use even more, you'd eventually run into this limit.

I think they fixed it by combining all style tags in applications into one, since they had to parse them for security reasons anyway.

Re:All style tags after the first 30 style tags are not appl... by dpcan on Monday January 04, 2010 @04:10PM (#1031253)
Yes. Sometimes while testing I'll put style=".." references in my tags just to get a feel for how things will look, then I'll commit to something and put it in the CSS files.

Fortunately, I do all my testing in Firefox so I've never even noticed this limitation :)

Re:All style tags after the first 30 style tags are not appl... by samdk on Monday January 04, 2010 @08:06PM (#1031592)
style=".." on an element is an attribute, not a style tag (<style>), and so is unaffected by this limitation.