Foros de discusión

Compass/SASS

Patrick Hisshion, modificado hace 9 años.

Compass/SASS

Junior Member Mensajes: 29 Fecha de incorporación: 12/05/14 Mensajes recientes
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 hace 9 años.

RE: Compass/SASS

New Member Mensajes: 12 Fecha de incorporación: 9/01/14 Mensajes recientes
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 hace 9 años.

RE: Compass/SASS

Regular Member Mensajes: 180 Fecha de incorporación: 5/04/07 Mensajes recientes
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