Refactor: Use CSS Variables for colors, font-family #970
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #968
The CSS file should no longer have any un-variable-ized colors and font-family declarations.
How to read this code
--bs
are overriding Bootstrap CSS variables.How this change works
For example, when overriding
--bs-primary
with#046b99
, like so:all Bootstrap classes that rely on
--bs-primary
color will also be affected. Most notably,btn-primary
,bg-primary
will now all also use#046b99
. With just these few CSS variable override lines, I was able to change all instances of the "primary" color to#046b99
throughout the CSS styles. Because of this, I was able to delete places in the style.css code where we were manually setting the Header background color or a Button background color to#046b99
, because we are using classes ofbg-primary
orbtn-primary
instead.Caveat: If the CA Web Standard code also sets another override to a
--bs
variable, then we'll still have to manually override it. An example of this is thebody
andh1
font declaration: we cannot remove the manual font declaration even though we've set--bs-font-family
toRoboto
because the CA Web Standard code overrides it to some other font. It is tricky.How to test this
Changes
#323A45
#046B99
#046B99
, which is different from prod: