Comments on: Required: CSS islands http://prettyprint.me/2009/06/03/required-css-islands/ by Ran Tavory Mon, 01 Aug 2011 08:29:01 +0000 hourly 1 http://wordpress.org/?v=3.2 By: Udi http://prettyprint.me/2009/06/03/required-css-islands/comment-page-1/#comment-29 Udi Sat, 31 Oct 2009 21:51:58 +0000 http://prettyprint.me/?p=114#comment-29 Ran, Have you seen http://code.google.com/p/cleanslatecss/ ? Udi Ran,

Have you seen http://code.google.com/p/cleanslatecss/ ?

Udi

]]>
By: Neil http://prettyprint.me/2009/06/03/required-css-islands/comment-page-1/#comment-28 Neil Sun, 16 Aug 2009 20:56:12 +0000 http://prettyprint.me/?p=114#comment-28 A CSS island isn't the way to go (IMO), because it contradicts the ideal of content, style, behavior suppuration (A very practical ideal). Actually i agree with Uzi and don't quite follow your reasoning. You don't have to put your trust on the widget author, You can just place the widget inside a "namespaced" div. Is this more ugly then CSS islands??? A CSS island isn’t the way to go (IMO), because it contradicts the ideal of content, style, behavior suppuration (A very practical ideal).
Actually i agree with Uzi and don’t quite follow your reasoning. You don’t have to put your trust on the widget author, You can just place the widget inside a “namespaced” div. Is this more ugly then CSS islands???

]]>
By: rantav http://prettyprint.me/2009/06/03/required-css-islands/comment-page-1/#comment-27 rantav Wed, 03 Jun 2009 10:38:51 +0000 http://prettyprint.me/?p=114#comment-27 Uzi and Udi (or should I call you U[zd]i ;)) what you're describing is what I call the sad situation of today and I think it deserves improvements. Uzi - so long as there is no solution to the problem I agree that a widget author should use unique namespace but this is a very error prone approach and makes an ugly code. Udi - I used h1 as an example, but even if you choose not to use it you still have the same set of problems. Even if you use more specific css selectors such as .mywidget div you still can't anticipate all other css attributes that the site owner has chosen to set so your widget may look unprofessional in some sites. Uzi and Udi (or should I call you U[zd]i ;) ) what you’re describing is what I call the sad situation of today and I think it deserves improvements.
Uzi – so long as there is no solution to the problem I agree that a widget author should use unique namespace but this is a very error prone approach and makes an ugly code.
Udi – I used h1 as an example, but even if you choose not to use it you still have the same set of problems. Even if you use more specific css selectors such as .mywidget div you still can’t anticipate all other css attributes that the site owner has chosen to set so your widget may look unprofessional in some sites.

]]>
By: uzi http://prettyprint.me/2009/06/03/required-css-islands/comment-page-1/#comment-26 uzi Wed, 03 Jun 2009 05:14:50 +0000 http://prettyprint.me/?p=114#comment-26 A widget maker *should* have it's CSS statements using a unique "name space", so if a the widget main element is a div, it should have an id attribute (id="my-widget"), and then ant css statement should begin with that id (e.g. #my-widget h1 {font-size: 16px}). A widget maker *should* have it’s CSS statements using a unique “name space”, so if a the widget main element is a div, it should have an id attribute (id=”my-widget”), and then ant css statement should begin with that id (e.g. #my-widget h1 {font-size: 16px}).

]]>
By: Udi http://prettyprint.me/2009/06/03/required-css-islands/comment-page-1/#comment-25 Udi Tue, 02 Jun 2009 23:56:58 +0000 http://prettyprint.me/?p=114#comment-25 mmm... I think adding css islands will just make things over complicated. If I will be designing a widget, I would be trying to stick to as less elements needed: div, span, img, a and some form elements can do most of the tricks. Leave h1,h2 and other stuff for the containing page - I am not sure markup semantics is so important in widgets in HTML pages of 2009. Now just reset those elemnts: .mywidget div, .mywidget span { font-weight:normal; } and apply your style to your classes. And you might need to add many !importants to stay on the safe side. Udi mmm…
I think adding css islands will just make things over complicated.
If I will be designing a widget, I would be trying to stick to as less elements needed: div, span, img, a and some form elements can do most of the tricks. Leave h1,h2 and other stuff for the containing page – I am not sure markup semantics is so important in widgets in HTML pages of 2009.
Now just reset those elemnts:
.mywidget div, .mywidget span {
font-weight:normal;
}
and apply your style to your classes.
And you might need to add many !importants to stay on the safe side.

Udi

]]>