Skip to content

Commit f7967bc

Browse files
committed
feat: add global styles override file
1 parent 5f37960 commit f7967bc

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
3+
Global Style Overrides for v3
4+
5+
When dealing with CSS, many classes are being globally applied in legacy content.
6+
These sources cannot be directly updated, as that would change the behavior of the website that's
7+
still in production.
8+
9+
The goal of this file is to centralize global style overrides for v3.
10+
11+
For the sake of example, the selector `.dark textarea` below aims to override a background color
12+
definition that's being set in `frontend/styles.css`.
13+
14+
This CSS file is then loaded at the end of all other CSS files to ensure that it takes precedence over
15+
any conflicting styles. That's in `templates/base.html`, under a v3 flag check.
16+
17+
After we release the v3 website, this file should not longer exist, and the overrides here should
18+
be moved to the appropriate component-specific CSS files or replace the styles they're overriding.
19+
20+
*/
21+
22+
.dark textarea {
23+
background-color: var(--color-surface-weak);
24+
}

templates/base.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
<link href="{% static 'css/boostlook.css' %}" rel="stylesheet">
6060
{% flag "v3" %}
6161
<link href="{% static 'css/v3/components.css' %}" rel="stylesheet">
62+
<link href="{% static 'css/v3/v3-style-overrides.css' %}" rel="stylesheet">
6263
{% endflag %}
6364
{% endblock %}
6465

0 commit comments

Comments
 (0)