GWT theme style overrides my css style

前端 未结 6 1691
陌清茗
陌清茗 2020-11-27 05:21

I have some html files with their own css. I want to use them in a gwt application so i copied the html and the css files in the application.

The problem is when i o

6条回答
  •  轮回少年
    2020-11-27 05:46

    Like Sarfaz said - !important should be your last resort as it kind of defeats the whole concept of Cascading Style Sheets.

    Anyway, in GWT, in order to easily override the core GWT styles contained in the theme you selected, you should locate your module file (the one that has a file name ending on *.gwt.xml), then locate the line where you declare your theme and put your custom/whatever stylesheet after it, like this:

    
    
    

    Note, however, that for GWT 2.0 CssResource and UiBinder is recommended.

    Be sure to read the appropriate section of the docs for more pointers.

提交回复
热议问题