| 1 |
# 1. Reduce support for browsers that do not support CSS Custom Properties |
| 2 |
|
| 3 |
Date: 2024-02-01 |
| 4 |
|
| 5 |
## Status |
| 6 |
|
| 7 |
Accepted. |
| 8 |
|
| 9 |
## Context |
| 10 |
|
| 11 |
In order to develop night mode in a sustainable and performant way, the Web team |
| 12 |
decided to use CSS custom properties for all colors in the Minerva skin. This |
| 13 |
allows us to develop night mode by simply changing CSS custom property values. |
| 14 |
|
| 15 |
## Decision |
| 16 |
|
| 17 |
we will reduce support for browsers that do not support CSS custom properties, |
| 18 |
most notably Opera Mini. |
| 19 |
|
| 20 |
According to caniuse the main browsers this impacts are IE11 and Opera Mini: |
| 21 |
https://caniuse.com/css-variables |
| 22 |
|
| 23 |
According to https://github.com/Fyrd/caniuse/issues/3883 CSS variables are not |
| 24 |
available only in its non-default "extreme mode". |
| 25 |
|
| 26 |
According to the following stats: |
| 27 |
https://analytics.wikimedia.org/dashboards/browsers/#mobile-site-by-browser |
| 28 |
Opera Mini represents **0.1%** of traffic to the mobile site. Given this tiny |
| 29 |
percentage of traffic, the maintenance and performance cost of providing a |
| 30 |
fallback for older browsers is deemed too high (since it would involve |
| 31 |
increasing the CSS payload to the remaining 99.9% of users). |
| 32 |
|
| 33 |
## Consequences |
| 34 |
|
| 35 |
Browsers like IE11 and Opera Mini will degrade gracefully into a reduced color |
| 36 |
experience. Colors will fallback to the default user-agent stylesheet so links |
| 37 |
will be blue, text will be black and background colors will be white. Although this |
| 38 |
will be a grade C experience, it will still provide adequate legibility and |
| 39 |
accessibility for basic functionality (i.e. reading). |