Forums | Mahara Community

Developers /
Customise fonts colors


Margari León's profile picture
Posts: 13

27 July 2017, 22:25

Hello, I´m afraid that I´m going to do a silly question.... but I don´t find how to change the color of the fonts in the default theme......

Can anybody help me? Thank you!!!

Margari León's profile picture
Posts: 13

27 July 2017, 22:30

Sorry, I haven´t seen the developers documentation.....

But anyway I don´t see how to change them... (I know almost nothing of coding).

Robert Lyon's profile picture
Posts: 749

28 July 2017, 9:46

Hi Margari,

It all depends on how much you are wanting to change.

If you are only wanting to override a few font colours for the site then you can add the relevant css information to:

 htdocs/local/theme/style/style.css

If the file/path does not exist create it first.

This style sheet gets called last for the page and so can override the particular style for all themes, eg

body {
   color: #ff0000;
}

would make all text (not getting a specific style) be red
-----

However, if you are wanting to develop your own theme where you expect to make may changes to the default theme you can use 'Deafult' as a base and copy the htdocs/theme/default theme directory to a new name, eg

cp -r htdocs/theme/default/ htdocs/theme/mytheme/

Then go into htdocs/theme/mytheme directory and edit the themeconfig.php file and change

$theme->displayname = 'Default';

to

$theme->displayname = 'MyTheme';

and then edit htdocs/theme/mytheme/sass/utilities/_theme-variables.scss

and change the color information there to what you want

then in the parent dir for htdocs and run:

make css

This will generate the css files for your new theme.
Then you'll need to choose this new theme in the admin section
to see it for your site.

Cheers

Robert

Margari León's profile picture
Posts: 13

28 July 2017, 21:53

Thank you!!! I got it, yujuuuu!!!

4 results