Birt styles priority [message #874763] |
Mon, 21 May 2012 13:58 |
donino donino Messages: 183 Registered: July 2011 |
Senior Member |
|
|
Hi,
When we define styles properties in a report, it appears Birt generates the css classes at the top of the report, for example on a table header:
When a report is embedded in a portal, and if this portal globally defines the css table header, then it will override the birt style. For example, uPortal adds a css class 'uP' on the body element of the page, and in the portal css there is something like:
Because of the 'th' tag, the weight is stronger in the portal css, and the birt table header style is overridden. Thus, the whole styles are completely mixed and the report cannot be used. I wonder if there would be a way to increase the birt styles weight, for example if the class generated by birt was such below it would resolve most of the issues:
.style_31 {color:white!important}
Since these classe names can be namespaced, it could not disturb the other page components. If it is not currently possible, would it be a good idea to submit this feature?
thanks
[Updated on: Mon, 21 May 2012 14:00] Report message to a moderator
|
|
|
Re: Birt styles priority [message #874902 is a reply to message #874763] |
Mon, 21 May 2012 17:57 |
|
This would be a good enhancement request. Do you want to open a
bugzilla for it?
Jason
On 5/21/2012 9:58 AM, donino donino wrote:
> Hi,
> When we define styles properties in a report, it appears Birt generates
> the css classes at the top of the report, for example on a table header:
>
> style_31 {color:white}
>
> When a report is embedded in a portal, and if this portal globally
> defines the css table header, then it will override the birt style. For
> example, uPortal adds a css class 'uP' ont the body element of the page,
> and in the portal css there is something like:
>
> uP th {color:black}
>
> Because of the 'th' tag, the weight is stronger in the portal css, and
> the birt table header style is overridden. Thus, the whole styles are
> completely mixed and the report cannot be used.
>
> I wonder if there would be a way to increase the birt styles weight, for
> example if the class generated by birt was such below it would resolve
> most of the issues:
>
> style_31 {color:white!important}
>
> Since these classe names can be namespaced, it could not disturb the
> other page components.
>
> If it is not currently possible, would it be a good idea to submit this
> feature?
>
> thanks
|
|
|
|
|
|
Re: Birt styles priority [message #875497 is a reply to message #875450] |
Tue, 22 May 2012 21:13 |
|
I believe this is relative to the web app. If you use this technique
both the view time css and designer css files will be in the output.
The engine will try to locate the external style first and if not found
it will default to designer styles. I agree with you that the better
option is to let the designer handle it.
Jason
On 5/22/2012 3:21 PM, donino donino wrote:
> Jason,
>
> When the styles are imported, the !important annotation is removed and
> will not be used. If the css file is linked at view time then it will
> work, though i'm not sure how the relative path must be filled for a css
> file: is it relative to the resource path, the web application or the
> report? However it is in my opinion much more efficient to take
> advantage of the eclipse birt designer to style the report items.
> thanks
|
|
|
Powered by
FUDForum. Page generated in 0.03018 seconds