Fórum

Compass/SASS

Patrick Hisshion, modificado 9 Anos atrás.

Compass/SASS

Junior Member Postagens: 29 Data de Entrada: 12/05/14 Postagens Recentes
Hi All,

I noticed that the majority of Liferay's CSS comes from sass files which I assume are handled by compass. If I would like to create my own sass files where would I place the .scss? Would I need to compile the .scss myself (make compass watch a folder)? Does anyone want to share their workflow if they do something similar?

Any help would be much appreciated.
thumbnail
Drew Brokke, modificado 9 Anos atrás.

RE: Compass/SASS

New Member Postagens: 12 Data de Entrada: 09/01/14 Postagens Recentes
Hi Patrick,

The full answer depends on exactly what you're trying to style, but in general Compass automatically handles the creation of the .scss files. In the case of developing a theme, most if not all of the styling is done in the _diffs > custom.css file in the theme's directory.

If you include:
@import "compass";
at the top of the page, it will automatically be parsed into the appropriate files.

The great thing is, even though you're working in a .css file, you can use SASS syntax!

For theme development, this is a helpful overview of how it's handled. What are you attempting to style?
thumbnail
Fuad Efendi, modificado 9 Anos atrás.

RE: Compass/SASS

Regular Member Postagens: 180 Data de Entrada: 05/04/07 Postagens Recentes
Hi Drew,

Can I modify *.css (with "compass" macro) file directly under webapps/MyTheme-theme/css folder?
Can Liferay automatically recompile it into proper CSS? (of course, in dev environment with caching disabled)

Thanks