Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Include CSS in XML or HTML affects the output?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
hezjing  
View profile  
 More options Jul 3, 11:58 am
From: hezjing <hezj...@gmail.com>
Date: Fri, 3 Jul 2009 23:58:32 +0800
Local: Fri, Jul 3 2009 11:58 am
Subject: Include CSS in XML or HTML affects the output?

Hi
I want to customize the color and font size of the StackPanel item, so I
defined the following style:

.mymenu .gwt-StackPanelItem {
  color: blue;
  font-size: small;

}

Then I add the above style and keep the rest of the standard CSS properties:

StackPanel panel = new StackPanel();
panel.addStyleName("mymenu");

The problem is this only works if I include the CSS in the module XML file.

If I include the CSS in the HTML host page, the style is overridden by
standard.css.

Both methods above generate the same HTML shown below:

<table class="gwt-StackPanel mymenu" cellspacing="0" cellpadding="0"
style="width: 20%; height: 100%;">
<tbody>
<tr>
<td class="gwt-StackPanelItem gwt-StackPanelItem-first
gwt-StackPanelItem-selected" height="1">
<div>Administration</div>
</td>
</tr>
...
</table>

Do you know why including the CSS in the module XML or HTML host page
affects the output?

--

Hez


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas Broyer  
View profile  
 More options Jul 3, 6:18 pm
From: Thomas Broyer <t.bro...@gmail.com>
Date: Fri, 3 Jul 2009 15:18:29 -0700 (PDT)
Local: Fri, Jul 3 2009 6:18 pm
Subject: Re: Include CSS in XML or HTML affects the output?

On 3 juil, 17:58, hezjing <hezj...@gmail.com> wrote:

The stylesheets in the <module>.gwt.xml are injected at the end of the
document's <head> once the document's <body> is fully loaded, so they
always come *after* the stylesheets found in the HTML, and therefore
override their declarations.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
hezjing  
View profile  
 More options Jul 4, 3:15 am
From: hezjing <hezj...@gmail.com>
Date: Sat, 4 Jul 2009 15:15:05 +0800
Local: Sat, Jul 4 2009 3:15 am
Subject: Re: Include CSS in XML or HTML affects the output?

Does this means I must include the CSS in the module XML if I'm going to
override some of the styles in standard.css?
It seems that if I include the CSS in the module XML, I have to restart the
hosted server console to every time the CSS is modified.
Whereas in HTML hosted page, I can simply refresh the CSS by clicking the
refresh button in the hosted browser.

--

Hez


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas Broyer  
View profile  
 More options Jul 4, 9:21 pm
From: Thomas Broyer <t.bro...@gmail.com>
Date: Sat, 4 Jul 2009 18:21:23 -0700 (PDT)
Local: Sat, Jul 4 2009 9:21 pm
Subject: Re: Include CSS in XML or HTML affects the output?

On 4 juil, 09:15, hezjing <hezj...@gmail.com> wrote:

> Does this means I must include the CSS in the module XML if I'm going to
> override some of the styles in standard.css?

No, you can inherit
com.google.gwt.user.theme.standard.StandardResources instead of
com.google.gwt.user.theme.standard.Standard and include the stylesheet
in your HTML page.

...though actually I would recommend that you copy and modify the
standard.css (when the change has to be global) or use a "style
dependent name" (when it has to be somehow local to a few widgets, and
some other widgets use the "standard" CSS rules)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google