简体   繁体   中英

Removing duplication across Google Stylesheets (GSS) in GWT

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.

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. Eg

@Source({"Shared.gss", "BookEditor.gss"})

Hope this helps someone else with the same question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM