Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Vinod Kumar Nair
Purpose of custom.css in liferay6.1
August 7, 2012 8:40 PM
Answer

Vinod Kumar Nair

Rank: Junior Member

Posts: 59

Join Date: July 13, 2012

Recent Posts

Hi, Im learning liferay6.1. Im Themes right now, while working on themes it generated automatically some .vm files, and css files like custom.css, then few css related to docbar, portlets etc.
Now my question is whenever I want to override some exisiting core functionality of liferay in terms of there look and feel for e.g. - i want to change the default color of dockbar to red color then do i need to specify that change in custom.css or in that spefici css file for docbar where this class is specified?
I mean to say any changes to existing css needs to be done ONLY in custom.css or in their respective specific files generated in my own theme plugin?
Hitoshi Ozawa
RE: Purpose of custom.css in liferay6.1
August 7, 2012 10:32 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

css can be changed from Manage - > Page
OR
by creating a new theme

This way, you'll be able to upgrade liferay more easily.
Dhrutika Vyas
RE: Purpose of custom.css in liferay6.1
August 8, 2012 4:55 AM
Answer

Dhrutika Vyas

Rank: Expert

Posts: 438

Join Date: February 9, 2009

Recent Posts

Hi,

First of you need to modify existing theme,so create new theme.

When you create new theme,it will generate velocity ,css and images(Internally it copies _unstyled and the _styled theme).

Now you want to modify existing theme,so in build.xml define parent theme id as 'classic'

Now create '_diffs' folder and inside their create same structure as of outside _diffs.

Copy custom.css from /css/custom.css and place it into _/diffs/css/custom.css and then make your changes in that file.

Better practice is always add your custom changes in custom.css file

Regards,
Dhrutika
Vinod Kumar Nair
RE: Purpose of custom.css in liferay6.1
August 16, 2012 2:03 AM
Answer

Vinod Kumar Nair

Rank: Junior Member

Posts: 59

Join Date: July 13, 2012

Recent Posts

Dhrutika Parekh:
Now you want to modify existing theme,so in build.xml define parent theme id as 'classic'


Why it is necessary to mark parent theme id as 'classic' before working on custom theme plugin? Can't I leave it as '_stlyed' and work on my custom theme(custom.css in _diffs)?
Amit Doshi
RE: Purpose of custom.css in liferay6.1
August 16, 2012 2:29 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

you can make it as _styled.
Tejas Kanani
RE: Purpose of custom.css in liferay6.1
August 16, 2012 2:52 AM
Answer

Tejas Kanani

Rank: Liferay Master

Posts: 655

Join Date: January 6, 2009

Recent Posts

Why it is necessary to mark parent theme id as 'classic' before working on custom theme plugin? Can't I leave it as '_stlyed' and work on my custom theme(custom.css in _diffs)?

If you go with "classic" option, it will provide you base of Liferay Classic theme. So that you'll have basic theme ready and you can make modification in that if you want. Else if you don't want any base to start with, just go with other option.
Vinod Kumar Nair
RE: Purpose of custom.css in liferay6.1
August 16, 2012 11:14 AM
Answer

Vinod Kumar Nair

Rank: Junior Member

Posts: 59

Join Date: July 13, 2012

Recent Posts

Tejas Kanani:
Why it is necessary to mark parent theme id as 'classic' before working on custom theme plugin? Can't I leave it as '_stlyed' and work on my custom theme(custom.css in _diffs)?

If you go with "classic" option, it will provide you base of Liferay Classic theme. So that you'll have basic theme ready and you can make modification in that if you want. Else if you don't want any base to start with, just go with other option.


Thanks Tejas! very well explained emoticon
Dhrutika Vyas
RE: Purpose of custom.css in liferay6.1
August 16, 2012 11:18 AM
Answer

Dhrutika Vyas

Rank: Expert

Posts: 438

Join Date: February 9, 2009

Recent Posts

Hi Vinod,

Its not necessary,but as you asked that you wanted to modify dock bar color or some existing functionality.

That was the reason I said that make build.parent as classic,so that you will have basic theme ready same as classic theme.

Regards,
Dhrutika
Vinod Kumar Nair
RE: Purpose of custom.css in liferay6.1
August 16, 2012 8:25 PM
Answer

Vinod Kumar Nair

Rank: Junior Member

Posts: 59

Join Date: July 13, 2012

Recent Posts

Dhrutika Parekh:
Hi Vinod,

Its not necessary,but as you asked that you wanted to modify dock bar color or some existing functionality.

That was the reason I said that make build.parent as classic,so that you will have basic theme ready same as classic theme.

Regards,
Dhrutika


Thanks Dhrutika, now I got your point.
I'll work on it and respond you back.emoticon
Samuel Kong
RE: Purpose of custom.css in liferay6.1
August 16, 2012 9:29 PM
Answer

Samuel Kong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1548

Join Date: March 10, 2008

Recent Posts

Please be aware that setting the parent theme as classic is not recommended. The classic theme in future versions of Liferay Portal may change and you're theme might look all weird after upgrading. It's safer to use _styled as your parent theme.