Jump to content

Override global.css


innocuous

Recommended Posts

what i do is create a file called custom.css in the same folder as global.css then  i add the following to header.tpl file.

 

look for

{if isset($css_files)} 
	{foreach from=$css_files key=css_uri item=media}
		<link rel="stylesheet" href="{$css_uri|escape:'html':'UTF-8'}" type="text/css" media="{$media|escape:'html':'UTF-8'}" />
  {/foreach}
{/if}

then add the following line just after {if isset(*css_files)} see below

{if isset($css_files)} 
<link rel="stylesheet" href="{$css_dir}custom.css" type="text/css" media="{$media}" />
	{foreach from=$css_files key=css_uri item=media}
		<link rel="stylesheet" href="{$css_uri|escape:'html':'UTF-8'}" type="text/css" media="{$media|escape:'html':'UTF-8'}" />
  {/foreach}
{/if}

don't forget tuning off cache etc... i also use important! inn my css to force my new values

 

hope this is of some help

Link to comment
Share on other sites

Create new theme and copy files from default theme and then make changes in your new theme. That way it won't be overwritten with updates.

How do I copy the default theme? I tried to create a new folder in themes/ and copying all files from the default-bootstrap theme into the new folder.

 

However there is no way to activate in BO. Heading to Preferences -> themes does not show the new folder theme.

 

I even tried zipping the default theme and importing as new theme in PS. Gave error.

Link to comment
Share on other sites

Go to BO > Preferences > Themes

Click on Add new theme

Scroll down and click button Create new theme

Fill required fields

Copy missing files from existing theme

Save

Go to Preferences > Themes and check if your new theme is selected.

Link to comment
Share on other sites

×
×
  • Create New...