掲示板

Compass/SASS

9年前 に Patrick Hisshion によって更新されました。

Compass/SASS

Junior Member 投稿: 29 参加年月日: 14/05/12 最新の投稿
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
9年前 に Drew Brokke によって更新されました。

RE: Compass/SASS

New Member 投稿: 12 参加年月日: 14/01/09 最新の投稿
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
9年前 に Fuad Efendi によって更新されました。

RE: Compass/SASS

Regular Member 投稿: 180 参加年月日: 07/04/05 最新の投稿
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