cssresource

How can I use the same @def in multiple CssResource css files?

一世执手 提交于 2019-12-19 10:49:23
问题 I'd like to say, in a single, centralized location, @def mainColor = #f00; and then, in all of my other css files, refer to mainColor without having to redefine it. Then when I change mainColor in once place, my entire app changes color. The best way I can think of so far is to include two @Source files for every CssResource declaration and always include the global def file. Are there any other ways? 回答1: As far as I know, this is your only option: style.css @def mainColor #f00; *.ui.xml <ui

how to access the styles from CSS

一曲冷凌霜 提交于 2019-12-13 05:48:30
问题 Can we get the value from inside a css definition in the code if CSS resource is used? e.g. .iv_menu_thumbnail { display: block; width: 24px; height: 24px; margin: 3px; float: left; cursor: pointer; }` Can we know via code the value of width and i want to access from one of my java class? Thanks in advance 回答1: var width = $('.iv_menu_thumbnail').width(); console.log(width); This will get the width of the element if this is what youre asking for. As far as I'm concerned you cannot get non

Is there a way to set GWT to include style names in the compiled names?

孤者浪人 提交于 2019-12-11 16:37:49
问题 I use CssResource extensively, and now my generated html is full of GWXSHFKADAish class names. I get all of the advantages of that, but for debugging it'd be helpful to add a flag that would turn .selected into GWXSTY_selected . Is there any way to do this? 回答1: When you set <set-configuration-property name="CssResource.style" value="pretty"/> in your .gwt.xml file, then the resulting class names will contain the original class name. 来源: https://stackoverflow.com/questions/7506671/is-there-a

In GWT 2.0 CssResource, how I can turn off obfuscation for all my css classes?

青春壹個敷衍的年華 提交于 2019-12-09 07:48:42
问题 I have a CssResource where I want to have some of the css classes "mapped" to methods: @ClassName("top-table") String topTable(); But I want to turn off the obfuscation GWT does (while developing at least, for better debugging in firebug, etc). Is there an easy way to achieve this? I know I can use @external in my css file but then I have to define all my css classes like @external .c1, .c2, .c3, etc... Something like @external .* would solve my problem but that doesn't seem to be available

In GWT 2.0 CssResource, how I can turn off obfuscation for all my css classes?

心已入冬 提交于 2019-12-03 10:47:01
I have a CssResource where I want to have some of the css classes "mapped" to methods: @ClassName("top-table") String topTable(); But I want to turn off the obfuscation GWT does (while developing at least, for better debugging in firebug, etc). Is there an easy way to achieve this? I know I can use @external in my css file but then I have to define all my css classes like @external .c1, .c2, .c3, etc... Something like @external .* would solve my problem but that doesn't seem to be available at least in gwt 2.0.x My current solution is to use: <set-configuration-property name="CssResource.style

Need app-wide CSS constants in GWT

给你一囗甜甜゛ 提交于 2019-12-03 09:45:32
问题 I'd like to define some colours as constants in a GWT CssResource, and use those constants throughout my application; but I don't know how to do that. I'll tell you what what I've tried. I've created a ClientBundle and a CssResource as follows: public interface Resources extends ClientBundle { public interface MyStyle extends CssResource { String JUNGLEGREEN(); String example(); ... } @Source("Resources.css") MyStyle css(); } I've defined some constants in Resources.css: @def JUNGLEGREEN

Need app-wide CSS constants in GWT

只谈情不闲聊 提交于 2019-12-03 00:19:09
I'd like to define some colours as constants in a GWT CssResource, and use those constants throughout my application; but I don't know how to do that. I'll tell you what what I've tried. I've created a ClientBundle and a CssResource as follows: public interface Resources extends ClientBundle { public interface MyStyle extends CssResource { String JUNGLEGREEN(); String example(); ... } @Source("Resources.css") MyStyle css(); } I've defined some constants in Resources.css: @def JUNGLEGREEN #1F3D0A; Within Resources.css, I use those constants like so: .example { color:JUNGLEGREEN; } I'm not aware

How can I use the same @def in multiple CssResource css files?

 ̄綄美尐妖づ 提交于 2019-12-01 11:24:40
I'd like to say, in a single, centralized location, @def mainColor = #f00; and then, in all of my other css files, refer to mainColor without having to redefine it. Then when I change mainColor in once place, my entire app changes color. The best way I can think of so far is to include two @Source files for every CssResource declaration and always include the global def file. Are there any other ways? As far as I know, this is your only option: style.css @def mainColor #f00; *.ui.xml <ui:style src="../../../styles/style.css"> .widget{ color: mainColor; } </ui:style> The downside to this is the