Reputation: 12751
Most of my stylesheets (GSS) have the same set of @defmixin
statements. I would like to be able to remove the duplication.
Is it possible to @include
a common GSS stylesheet in some way?
Or are there other ways to do this simply? (I mean without having any external scripting to munge the files.) I'm using GSS from a GWT 2.8 app, by the way.
I found a related question but the answers aren't really appropriate for using GSS within GWT.
Upvotes: 1
Views: 70
Reputation: 2460
To add to the accepted answer, UiBinder templates will likewise allow you to combine GSS files via a comma-separated list, e.g.:
<ui:style type="com.myapp.client.views.EditorView.Style"
src="EditorView.gss, ViewCommon.gss"/>
As a result, you'll be able to use definitions from ViewCommon.gss
inside EditorView.gss
.
Upvotes: 0
Reputation: 12751
I just found the answer by looking at the GWT code. You can't include files, but you can combine several GSS files by specifying them all in the @Source
annotation. E.g.
@Source({"Shared.gss", "BookEditor.gss"})
Hope this helps someone else with the same question.
Upvotes: 2