Topic on Skin talk:Chameleon

Devaroo (talkcontribs)

Could someone explain how to change menu icons? The docs describe how to change existing SCSS variables and icons seem to be defined by the variable $cmln-icons. However, since $cmln-icons uses a map-merge function, I think the methods described in the docs aren't directly applicable. I've tried several different definitions and approaches, including adding another map-merge function, but nothing's worked so far.

Morne Alberts (talkcontribs)

What happens when you just define your overrides, or extras, in your SCSS file?

$cmln-icons: (
    go-btn: fas fa-something-else,
    my-icon: foo-bar
);

The map-merge function takes the original empty, or overridden, $cmln-icons as the second parameter, meaning whatever you define will override the defaults.

Devaroo (talkcontribs)

G'day Morne, I've just tried this again and your suggested solution does work (thank you!); however, it's only part of the answer. When importing the SCSS file, it appears that the file's position parameter must be set to "beforeVariables" and not "afterVariables" (the latter being the generally suggested method in the docs). At least this works for me; setting the position to beforeVariables produces the expected result, while setting it to afterVariables makes the site look like no variable definitions are being loaded at all. I assume positioning the file before other variable definitions is required due to the map-merge function. Anyway, thanks again for your suggestion, which does work when combined with the right positioning.

Reply to "Changing Icons"