Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

bufferoverflow's avatar

Changing spark default colors the right way

I want to change the default colors which Spark comes with.

I know i can't just override the default colors in my css but i wonder if is there a better practice. Like overriding the spark-aurelius/resources/assets/sass/_variables.scss file in somewhere or anything like that.

I can only think about modifying the main import:

// app.scss
// @import "./../../../vendor/laravel/spark-aurelius/resources/assets/sass/spark";
@import "./imports";

// imports.scss
// @import 'variables';
@import 'mycustomvariables';
@import '~bootstrap/scss/bootstrap';
@import '~sweetalert/dist/sweetalert.css';
@import 'custom';

// Vue Cloak
[v-cloak] {
  display: none;
}

body {
  direction: ltr;
}
...

What would you do?

Thanks.

0 likes
3 replies
martinbean's avatar
Level 80

@bufferoverflow I don’t have a Spark 6 licence, but I’m hoping the variables in the source Sass files are post-fixed with !default. If they are, then in your application’s Sass file, include custom variables first and the Spark styles after:

// resources/assets/sass/app.scss
@import "variables"; // resources/assets/sass/_variables.scss
@import "absolute/path/to/spark";

Your variables will then take precedence over Spark’s defaults when compiled by Mix.

1 like
bufferoverflow's avatar

Oh true! Forgot to set the vars before the include. Working perfectly, thanks man!

1 like

Please or to participate in this conversation.