Skip to content

Commit

Permalink
Fix bootstrap colour customisation
Browse files Browse the repository at this point in the history
Massively simplify customising bootstraps colours
  • Loading branch information
wrightmartin committed Feb 26, 2025
1 parent efad8e7 commit 7a25dc7
Showing 1 changed file with 40 additions and 20 deletions.
60 changes: 40 additions & 20 deletions app/assets/stylesheets/ecosystems.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,14 @@ $color-grey: #DCDCE0;
$color-grey-dark: #4C4C61;

/* Tokens to override bootstrap colours */
$bootstrap-primary: $color-purple;
$bootstrap-secondary: $color-grey;
$bootstrap-success: $color-green;
$bootstrap-info: $color-purple-light;
$bootstrap-warning: $color-orange-light;
$bootstrap-danger: $color-orange-dark;
$bootstrap-light: $color-grey-light;
$bootstrap-dark: $color-black;

/* Bootstrap SCSS colour variables */
$theme-colors: (
"primary": $bootstrap-primary,
"secondary": $bootstrap-secondary,
"success": $bootstrap-success,
"info": $bootstrap-info,
"warning": $bootstrap-warning,
"danger": $bootstrap-danger,
"light": $bootstrap-light,
"dark": $bootstrap-dark
);
$primary: $color-purple;
$secondary: $color-grey;
$success: $color-green;
$info: $color-purple-light;
$warning: $color-orange-light;
$danger: $color-orange-dark;
$light: $color-grey-light;
$dark: $color-black;

/* Typography */
$font-family-base: "Inter", sans-serif;
Expand All @@ -60,6 +48,9 @@ $headings-font-weight: 700;
$display-font-weight: 900;
$lead-font-weight: 400;

$link-color: $color-purple-dark;
$link-hover-color: $color-purple;

$transition-collapse: height .35s ease;

$btn-padding-y: 0.5em;
Expand Down Expand Up @@ -238,6 +229,9 @@ $badge-padding-y: 0.4em;
.alert-dark {
background-color: $color-grey-dark;
color: $color-white;
a {
color: $color-white;
}
}

hr {
Expand Down Expand Up @@ -782,3 +776,29 @@ body {
border-bottom-right-radius: 800px;
}
}


// Form validation

.was-validated .form-control:invalid,
.form-control.is-invalid {
border-color: $color-orange;
}

.invalid-feedback {
color: $color-orange-dark;
}

.was-validated .form-control:valid,
.form-control.is-valid {
border-color: $color-green-dark;
}

.valid-feedback {
color: $color-green-darker;
}

.form-check-input:checked {
background-color: $color-purple;
border-color: $color-purple;
}

0 comments on commit 7a25dc7

Please sign in to comment.