Hacker News new | comments | show | ask | jobs | submit login

I often find myself wishing for CSS widgets, so to speak. A reusable component of HTML and CSS that can be inserted without inheriting anything from the parent elements. You can achieve this if you take a lot of care, but it should be a lot easier than it is.

But where CSS really falls apart is in layouts. What is just a simple equation in a native application ends up being a myriad of hacks to get things flowing right in CSS. Javascript comes with the missing pieces, but introduces its own set of problems if you try to rely on it.

> the difficult of writing core graphics methods for every bevel, rounded corner, gradient etc has a lot of developers just using cut images for everything.

On iOS, the QuartzCore framework provides declarative methods for those common style choices (rounded corners, gradients, etc.).

The new CSS3 flexible box layout changes all that. It's incredibly rich and designed to obviate the need for clumsy CSS layout hacks. Check it out if you haven't already... it is the missing piece for app-like layouts for the web. The incredibly complex layouts that can be achieved with minimal CSS and no JS is astounding. Pair this with text-overflow and with ~ 50 lines of CSS and some very basic html you can achieve wonders.

Not only that but it's usable today. Both webkit and gecko have very close implementations with only minor edge cases, none of which are insurmountable.

Not sure about iOS support for the new layout modes.

Non-inheriting CSS widgets are coming with Web Components and the Shadow DOM. http://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/i...

Browsers, in fact, already use the shadow DOM to render many of their custom forms. It's just not available programmatically yet.

Layouts aren't completely horrifying if you use a good, responsive grid, although within that grid framework itself there are likely some hacks. But as mentioned -- new CSS layout types are coming!

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact