How to adjust all the color with variables in sass?

1 reply · opened Jul 1, 2020

Aamadeus77Jul 1, 2020

How can I override the whole "colorsets" from bootstrap AND canvas through variables using sass? So that I can use them everywhere in the manner:

Bootstrap
.bg-primary
.bg-secondary
.bg-success
.bg-danger
.bg-warning
.bg-info
.bg-light
.bg-dark
.bg-white
.bg-transparent

BUT with OVERWRITTEN color codes!?

and where do all those root variables come that I see in the dev mode - how to overwrite and use those ones?:

--blue: #007bff;
--indigo: #6610f2;
--purple: #6f42c1;
--pink: #e83e8c;
--red: #dc3545;
--orange: #fd7e14;
--yellow: #ffc107;
--green: #28a745;
--teal: #20c997;
--cyan: #17a2b8;
--white: #fff;
--gray: #6c757d;
--gray-dark: #343a40;
--green: #59BA41;
--brown: #774F38;
--aqua: #40C0CB;
--lime: #AEE239;
--leaf: #A8CABA;
--dirtygreen: #1693A5;
--amber: #EB9C4D;
--black: #111111;
--white: #f9f9f9;
--primary: #007bff;
--secondary: #6c757d;
--success: #28a745;
--info: #17a2b8;
--warning: #ffc107;
--danger: #dc3545;
--light: #f8f9fa;
--dark: #343a40;
--breakpoint-xs: 0;
--breakpoint-sm: 576px;
--breakpoint-md: 768px;
--breakpoint-lg: 992px;
--breakpoint-xl: 1200px;
--breakpoint-xxl: 1440px;
--font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

SSemicolon WebSTAFFJul 1, 2020

Hello,

To edit the Default Bootstrap Colors, make sure that you follow the Official Guide: https://getbootstrap.com/docs/4.0/getting-started/theming/ .

Canvas SASS is built on Bootstrap SASS, so simply edit the default Colors in the sass/bootstrap/_variables.scss File directly.

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard