Re: Overriding Default Styles
Bloat is all relative. Tapestry could dynamically assemble a virtual stylesheet for the page from bits and pieces, somewhat like JavaScript initialization is accomplished. However, that would require encoding a lot of state information into the URL for the virtual stylesheet, and that would likely prevent the browser from caching it effectively. It also complicates the story when Ajax partial page updates come into play. I would rather we have a static stylesheet (and perhaps a static override to that stylesheet) that has a far-future expires header to encourage the browser to cache it. As everywhere, it is a tradeoff: you may see a first page load difference (more coming down than necessary) followed by very quick follow on pages (due to browser cache). If it is a top concern, you can copy the Tapestry default.css and use some configuration to override Tapestry to use your customized stylesheet instead of default.css. However, the contents of default.css and tapestry.js are in flux, more so than any other aspect of the framework, and fall into a grey area between stable public APIs and Tapestry internals. In other words, a moving target. It's very easy to lose sight of the forest for the trees; measure, measure, measure! Web applications have so many moving parts in so many different locations, so they are going to perform counter-intuitively. I use the YSlow plugin for FireBug and I'm working to make Tapestry applications automatically score well by those metrics: we've seen that in terms of moving the
Re: Overriding Default Styles
That's a point, indeed. I could imagine some kind of mechanism where you specify a stylesheet link for every component (or override it for existing components) and Tapestry combines those definitions together to one stylesheet, omitting unused definitions. But I don't know if this improved cleanliness regarding unnecessary CSS definitions is worth the extra complexity as there is usually only a manageable amount of Tapestry CSS definitions per page that has to be overriden. Cheers, Uli Peter Stavrinides schrieb: Yes, this much I know... and as I said before this is not ideal, and not very modular, it also means that I have to fiddle around with CSS inheritance which I loath to do as it can be time consuming, and one last point: bloating my pages with style sheets then more style sheets to cancel those out is not exactly a clean solution and it increases the size of my page. Thanks anyway, Peter - Original Message - From: "Ulrich Stärk" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Wednesday, 3 September, 2008 4:40:26 PM GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Overriding Default Styles Hi Peter, As I said before, you can write a stylesheet that overrides the desired styles and include this everywhere you want to have the default styles being overriden by your custom style by including it either with renderSupport.addStylesheetLink() or with the @IncludeStylesheet annotation or by defining an asset and including it in your template. There you just override the desired styles. It might be necessary to use CSS' !important notation, though. Cheers, Uli Am Mi, 3.09.2008, 15:03, schrieb Peter Stavrinides: Hi Ulrich, I am not sure exactly what you didn't understand, but what I meant is this: Certain components such as the ones in the components project have their own style sheet. Overriding these styles one by one everywhere I use the component can be tedious, maybe I don't even want the styles to begin with! Since these styles are linked in by the component using RenderSupport.addStylesheetLink(asset, media), wouldn't it be great if I could simply supply my own style sheet instead of the default style sheet on a case by case basis? or perhaps override the style sheet in the containing page? (hence: renderSupport_.overrideStylesheetLink(stylesheet, media)) is this possible somehow at present? cheers, Peter - Original Message - From: "Ulrich StÃ?rk" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Wednesday, 3 September, 2008 1:25:24 PM GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Overriding Default Styles I don't quite understand. A stylesheet is an asset and we already got RenderSupport.addStylesheetLink(asset, media)... Just write your css, create an asset and pass it to addStylesheetLink(). Uli Am Mi, 3.09.2008, 12:16, schrieb Peter Stavrinides: hmmm not ideal, especially for components, I was hoping there was something more along the lines of: renderSupport_.addStylesheetLink(stylesheet, media); or even better: renderSupport_.overrideStylesheetLink(stylesheet, media); - Original Message - From: "Ulrich StÃfÂ?rk" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Wednesday, 3 September, 2008 12:44:12 PM GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Overriding Default Styles Tapestry's styles are included via default.css which can be found here: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/default.css?view=markup Just include some css overriding those styles or change the configuration symbol tapestry.default-stylesheet to your own default stylesheet. Uli Am Mi, 3.09.2008, 11:27, schrieb Peter Stavrinides: Hi I would like to know how to override Tapestry's default styles, particularly: 1. Individual styles like validation error popups 2. Component styles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For
RE: Overriding Default Styles
That's a really good point Peter. I'd be interested to hear what you think about this Howard? > -Original Message- > From: Peter Stavrinides [mailto:[EMAIL PROTECTED] > Sent: 03 September 2008 15:40 > To: Tapestry users > Subject: Re: Overriding Default Styles > > Yes, this much I know... and as I said before this is not ideal, and > not very modular, it also means that I have to fiddle around with CSS > inheritance which I loath to do as it can be time consuming, and one > last point: bloating my pages with style sheets then more style sheets > to cancel those out is not exactly a clean solution and it increases > the size of my page. > > Thanks anyway, > > Peter > > - Original Message - > From: "Ulrich Stärk" <[EMAIL PROTECTED]> > To: "Tapestry users" > Sent: Wednesday, 3 September, 2008 4:40:26 PM GMT +02:00 Athens, > Beirut, Bucharest, Istanbul > Subject: Re: Overriding Default Styles > > Hi Peter, > > As I said before, you can write a stylesheet that overrides the desired > styles and include this everywhere you want to have the default styles > being overriden by your custom style by including it either with > renderSupport.addStylesheetLink() or with the @IncludeStylesheet > annotation or by defining an asset and including it in your template. > There you just override the desired styles. It might be necessary to > use > CSS' !important notation, though. > > Cheers, > > Uli > > Am Mi, 3.09.2008, 15:03, schrieb Peter Stavrinides: > > Hi Ulrich, > > > > I am not sure exactly what you didn't understand, but what I meant is > > this: Certain components such as the ones in the components project > have > > their own style sheet. Overriding these styles one by one everywhere > I use > > the component can be tedious, maybe I don't even want the styles to > begin > > with! > > > > Since these styles are linked in by the component using > > RenderSupport.addStylesheetLink(asset, media), wouldn't it be great > if I > > could simply supply my own style sheet instead of the default style > sheet > > on a case by case basis? or perhaps override the style sheet in the > > containing page? (hence: > renderSupport_.overrideStylesheetLink(stylesheet, > > media)) is this possible somehow at present? > > > > cheers, > > Peter > > > > > > > > - Original Message - > > From: "Ulrich Stärk" <[EMAIL PROTECTED]> > > To: "Tapestry users" > > Sent: Wednesday, 3 September, 2008 1:25:24 PM GMT +02:00 Athens, > Beirut, > > Bucharest, Istanbul > > Subject: Re: Overriding Default Styles > > > > I don't quite understand. A stylesheet is an asset and we already got > > RenderSupport.addStylesheetLink(asset, media)... Just write your css, > > create an asset and pass it to addStylesheetLink(). > > > > Uli > > > > Am Mi, 3.09.2008, 12:16, schrieb Peter Stavrinides: > >> hmmm not ideal, especially for components, I was hoping there was > >> something more along the lines of: > >> renderSupport_.addStylesheetLink(stylesheet, media); > >> > >> or even better: > >> renderSupport_.overrideStylesheetLink(stylesheet, media); > >> > >> > >> > >> > >> - Original Message - > >> From: "Ulrich Stärk" <[EMAIL PROTECTED]> > >> To: "Tapestry users" > >> Sent: Wednesday, 3 September, 2008 12:44:12 PM GMT +02:00 Athens, > >> Beirut, > >> Bucharest, Istanbul > >> Subject: Re: Overriding Default Styles > >> > >> Tapestry's styles are included via default.css which can be found > here: > >> http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry- > core/src/main/resources/org/apache/tapestry5/default.css?view=markup > >> Just include some css overriding those styles or change the > >> configuration > >> symbol tapestry.default-stylesheet to your own default stylesheet. > >> > >> Uli > >> > >> Am Mi, 3.09.2008, 11:27, schrieb Peter Stavrinides: > >>> Hi > >>> > >>> I would like to know how to override Tapestry's default styles, > >>> particularly: > >>> > >>> 1. Individual styles like validation error popups > >>> 2. Component styles > >>> > >>> --- > -- > >>> To unsubscribe, e-mail: [EMAIL PROTE
Re: Overriding Default Styles
Yes, this much I know... and as I said before this is not ideal, and not very modular, it also means that I have to fiddle around with CSS inheritance which I loath to do as it can be time consuming, and one last point: bloating my pages with style sheets then more style sheets to cancel those out is not exactly a clean solution and it increases the size of my page. Thanks anyway, Peter - Original Message - From: "Ulrich Stärk" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Wednesday, 3 September, 2008 4:40:26 PM GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Overriding Default Styles Hi Peter, As I said before, you can write a stylesheet that overrides the desired styles and include this everywhere you want to have the default styles being overriden by your custom style by including it either with renderSupport.addStylesheetLink() or with the @IncludeStylesheet annotation or by defining an asset and including it in your template. There you just override the desired styles. It might be necessary to use CSS' !important notation, though. Cheers, Uli Am Mi, 3.09.2008, 15:03, schrieb Peter Stavrinides: > Hi Ulrich, > > I am not sure exactly what you didn't understand, but what I meant is > this: Certain components such as the ones in the components project have > their own style sheet. Overriding these styles one by one everywhere I use > the component can be tedious, maybe I don't even want the styles to begin > with! > > Since these styles are linked in by the component using > RenderSupport.addStylesheetLink(asset, media), wouldn't it be great if I > could simply supply my own style sheet instead of the default style sheet > on a case by case basis? or perhaps override the style sheet in the > containing page? (hence: renderSupport_.overrideStylesheetLink(stylesheet, > media)) is this possible somehow at present? > > cheers, > Peter > > > > - Original Message - > From: "Ulrich Stärk" <[EMAIL PROTECTED]> > To: "Tapestry users" > Sent: Wednesday, 3 September, 2008 1:25:24 PM GMT +02:00 Athens, Beirut, > Bucharest, Istanbul > Subject: Re: Overriding Default Styles > > I don't quite understand. A stylesheet is an asset and we already got > RenderSupport.addStylesheetLink(asset, media)... Just write your css, > create an asset and pass it to addStylesheetLink(). > > Uli > > Am Mi, 3.09.2008, 12:16, schrieb Peter Stavrinides: >> hmmm not ideal, especially for components, I was hoping there was >> something more along the lines of: >> renderSupport_.addStylesheetLink(stylesheet, media); >> >> or even better: >> renderSupport_.overrideStylesheetLink(stylesheet, media); >> >> >> >> >> - Original Message - >> From: "Ulrich Stärk" <[EMAIL PROTECTED]> >> To: "Tapestry users" >> Sent: Wednesday, 3 September, 2008 12:44:12 PM GMT +02:00 Athens, >> Beirut, >> Bucharest, Istanbul >> Subject: Re: Overriding Default Styles >> >> Tapestry's styles are included via default.css which can be found here: >> http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/default.css?view=markup >> Just include some css overriding those styles or change the >> configuration >> symbol tapestry.default-stylesheet to your own default stylesheet. >> >> Uli >> >> Am Mi, 3.09.2008, 11:27, schrieb Peter Stavrinides: >>> Hi >>> >>> I would like to know how to override Tapestry's default styles, >>> particularly: >>> >>> 1. Individual styles like validation error popups >>> 2. Component styles >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Overriding Default Styles
Hi Peter, As I said before, you can write a stylesheet that overrides the desired styles and include this everywhere you want to have the default styles being overriden by your custom style by including it either with renderSupport.addStylesheetLink() or with the @IncludeStylesheet annotation or by defining an asset and including it in your template. There you just override the desired styles. It might be necessary to use CSS' !important notation, though. Cheers, Uli Am Mi, 3.09.2008, 15:03, schrieb Peter Stavrinides: > Hi Ulrich, > > I am not sure exactly what you didn't understand, but what I meant is > this: Certain components such as the ones in the components project have > their own style sheet. Overriding these styles one by one everywhere I use > the component can be tedious, maybe I don't even want the styles to begin > with! > > Since these styles are linked in by the component using > RenderSupport.addStylesheetLink(asset, media), wouldn't it be great if I > could simply supply my own style sheet instead of the default style sheet > on a case by case basis? or perhaps override the style sheet in the > containing page? (hence: renderSupport_.overrideStylesheetLink(stylesheet, > media)) is this possible somehow at present? > > cheers, > Peter > > > > - Original Message - > From: "Ulrich Stärk" <[EMAIL PROTECTED]> > To: "Tapestry users" > Sent: Wednesday, 3 September, 2008 1:25:24 PM GMT +02:00 Athens, Beirut, > Bucharest, Istanbul > Subject: Re: Overriding Default Styles > > I don't quite understand. A stylesheet is an asset and we already got > RenderSupport.addStylesheetLink(asset, media)... Just write your css, > create an asset and pass it to addStylesheetLink(). > > Uli > > Am Mi, 3.09.2008, 12:16, schrieb Peter Stavrinides: >> hmmm not ideal, especially for components, I was hoping there was >> something more along the lines of: >> renderSupport_.addStylesheetLink(stylesheet, media); >> >> or even better: >> renderSupport_.overrideStylesheetLink(stylesheet, media); >> >> >> >> >> - Original Message ----- >> From: "Ulrich Stärk" <[EMAIL PROTECTED]> >> To: "Tapestry users" >> Sent: Wednesday, 3 September, 2008 12:44:12 PM GMT +02:00 Athens, >> Beirut, >> Bucharest, Istanbul >> Subject: Re: Overriding Default Styles >> >> Tapestry's styles are included via default.css which can be found here: >> http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/default.css?view=markup >> Just include some css overriding those styles or change the >> configuration >> symbol tapestry.default-stylesheet to your own default stylesheet. >> >> Uli >> >> Am Mi, 3.09.2008, 11:27, schrieb Peter Stavrinides: >>> Hi >>> >>> I would like to know how to override Tapestry's default styles, >>> particularly: >>> >>> 1. Individual styles like validation error popups >>> 2. Component styles >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Overriding Default Styles
Hi Ulrich, I am not sure exactly what you didn't understand, but what I meant is this: Certain components such as the ones in the components project have their own style sheet. Overriding these styles one by one everywhere I use the component can be tedious, maybe I don't even want the styles to begin with! Since these styles are linked in by the component using RenderSupport.addStylesheetLink(asset, media), wouldn't it be great if I could simply supply my own style sheet instead of the default style sheet on a case by case basis? or perhaps override the style sheet in the containing page? (hence: renderSupport_.overrideStylesheetLink(stylesheet, media)) is this possible somehow at present? cheers, Peter - Original Message - From: "Ulrich Stärk" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Wednesday, 3 September, 2008 1:25:24 PM GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Overriding Default Styles I don't quite understand. A stylesheet is an asset and we already got RenderSupport.addStylesheetLink(asset, media)... Just write your css, create an asset and pass it to addStylesheetLink(). Uli Am Mi, 3.09.2008, 12:16, schrieb Peter Stavrinides: > hmmm not ideal, especially for components, I was hoping there was > something more along the lines of: > renderSupport_.addStylesheetLink(stylesheet, media); > > or even better: > renderSupport_.overrideStylesheetLink(stylesheet, media); > > > > > - Original Message - > From: "Ulrich Stärk" <[EMAIL PROTECTED]> > To: "Tapestry users" > Sent: Wednesday, 3 September, 2008 12:44:12 PM GMT +02:00 Athens, Beirut, > Bucharest, Istanbul > Subject: Re: Overriding Default Styles > > Tapestry's styles are included via default.css which can be found here: > http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/default.css?view=markup > Just include some css overriding those styles or change the configuration > symbol tapestry.default-stylesheet to your own default stylesheet. > > Uli > > Am Mi, 3.09.2008, 11:27, schrieb Peter Stavrinides: >> Hi >> >> I would like to know how to override Tapestry's default styles, >> particularly: >> >> 1. Individual styles like validation error popups >> 2. Component styles >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Overriding Default Styles
I don't quite understand. A stylesheet is an asset and we already got RenderSupport.addStylesheetLink(asset, media)... Just write your css, create an asset and pass it to addStylesheetLink(). Uli Am Mi, 3.09.2008, 12:16, schrieb Peter Stavrinides: > hmmm not ideal, especially for components, I was hoping there was > something more along the lines of: > renderSupport_.addStylesheetLink(stylesheet, media); > > or even better: > renderSupport_.overrideStylesheetLink(stylesheet, media); > > > > > - Original Message - > From: "Ulrich Stärk" <[EMAIL PROTECTED]> > To: "Tapestry users" > Sent: Wednesday, 3 September, 2008 12:44:12 PM GMT +02:00 Athens, Beirut, > Bucharest, Istanbul > Subject: Re: Overriding Default Styles > > Tapestry's styles are included via default.css which can be found here: > http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/default.css?view=markup > Just include some css overriding those styles or change the configuration > symbol tapestry.default-stylesheet to your own default stylesheet. > > Uli > > Am Mi, 3.09.2008, 11:27, schrieb Peter Stavrinides: >> Hi >> >> I would like to know how to override Tapestry's default styles, >> particularly: >> >> 1. Individual styles like validation error popups >> 2. Component styles >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Overriding Default Styles
hmmm not ideal, especially for components, I was hoping there was something more along the lines of: renderSupport_.addStylesheetLink(stylesheet, media); or even better: renderSupport_.overrideStylesheetLink(stylesheet, media); - Original Message - From: "Ulrich Stärk" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Wednesday, 3 September, 2008 12:44:12 PM GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Overriding Default Styles Tapestry's styles are included via default.css which can be found here: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/default.css?view=markup Just include some css overriding those styles or change the configuration symbol tapestry.default-stylesheet to your own default stylesheet. Uli Am Mi, 3.09.2008, 11:27, schrieb Peter Stavrinides: > Hi > > I would like to know how to override Tapestry's default styles, > particularly: > > 1. Individual styles like validation error popups > 2. Component styles > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Overriding Default Styles
Tapestry's styles are included via default.css which can be found here: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/default.css?view=markup Just include some css overriding those styles or change the configuration symbol tapestry.default-stylesheet to your own default stylesheet. Uli Am Mi, 3.09.2008, 11:27, schrieb Peter Stavrinides: > Hi > > I would like to know how to override Tapestry's default styles, > particularly: > > 1. Individual styles like validation error popups > 2. Component styles > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Overriding Default Styles
Hi I would like to know how to override Tapestry's default styles, particularly: 1. Individual styles like validation error popups 2. Component styles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]