1) @external not working as expected
The GWT doc states that if you mark a style as @external it won't be
obfuscated and it doesn't need an associated method in the CssResource
interface.
So for instance:
@external legacySelectorA, legacySelectorB;
.obfuscated .legacySelectorA { .... }
When I do this, the style: ".obfuscated .legacySelectorA" will simply
be ignored and will not show up in the generated CSS. All other
styles that do not use an @external style appear fine in the CSS.
There's no errors generated.
I thought maybe I could only have one @external annotation in the CSS
file so I moved all the external styles into one big annotation at the
top of the file:
@external abc, def, ghi, blah, blahblah, blahblahblah
Putting them in one @external annotation at the top of the file
generates errors so I'm assuming this should not be done.
2) How do I simply bundle a simple CSS file without obfuscating it?
I thought I could simply create a CssResouce (without subclassing),
and specify an annotation so that it's just treated as a static
resource.
Both the link (html) and stylesheet tag (in module descriptor) are
deprecated according to the documentation. I would like slowly
transition CSS files to the new CssResource method without adding 50
million @external annotations everywhere. The styles are referenced
all throughout our project as strings like addStyleName("my-style")
and I don't want to break this functionality at the moment.
3) How can I have an "=" sign in a style?
@if user.agent ie6 ie8 {
.my-style img { filter: alpha(opacity=20); } */
} @elif user.agent gecko gecko1_8 {
.my-style img { -moz-opacity: 0.2; }
}
The "=" sign in the IE specific string generates an error.
--------------
Finally, this isn't a question. It's more of a general comment. So
far the experience using the CssResource has been pretty painful.
Much of our CSS involves customizing the GXT library's stylesheet.
So if you have a style like this:
.my-tab-panel-header .x-tab-strip-top .x-tab-strip-active .x-tab-right
span.x-tab-strip-text
...it quickly turns into annotation hell especially since I often have
the same external styles referenced in two spots. Here, we're
slightly customizing the GXT tab panel adding three styles.
@external .x-tab-strip-top, .x-tab-left
.my-tab-panel-header .x-tab-strip-top .x-tab-left {
.. one CSS style
}
@external .x-tab-strip-top, .x-tab-strip-inner
.my-tab-panel-header .x-tab-strip-top .x-tab-strip-inner {
.. one more CSS style
}
@external .x-tab-strip-top, .x-tab-strip-active, .x-tab-strip-inner
.my-tab-panel-header .x-tab-strip-top .x-tab-strip-active .x-tab-strip-
inner {
.. one more CSS style
}
I wind up having more @external annotations all over the document than
I do actual CSS code.
Thanks.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.