mkdocs-material/docs/browser-support.md

87 lines
4.0 KiB
Markdown
Raw Normal View History

# Browser support
Material for MkDocs goes at great lengths to support the largest possible range
2023-02-16 18:21:11 +03:00
of browsers while retaining the simplest possibilities for customization via
modern CSS features like [custom properties] and [mask images].
[custom properties]: https://caniuse.com/css-variables
[mask images]: https://caniuse.com/mdn-css_properties_mask-image
## Supported browsers
The following table lists all browsers for which Material for MkDocs offers full
support, so it can be assumed that all features work without degradation. If you
2022-09-11 20:25:40 +03:00
find that something doesn't look right in a browser which is in the supported
version range, please [open an issue]:
<figure markdown>
2023-07-06 16:27:53 +03:00
| Browser | Version[^2] | Release date | | | Usage |
| ------------------------------------ | ----------: | -----------: | ------: | -----: | ---------: |
| | | | desktop | mobile | overall |
| :fontawesome-brands-chrome: Chrome | 49+ | 03/2016 | 25.65% | 38.33% | 63.98% |
| :fontawesome-brands-safari: Safari | 10+ | 09/2016 | 4.63% | 14.96% | 19.59% |
| :fontawesome-brands-edge: Edge | 79+ | 01/2020 | 3.95% | n/a | 3.95% |
| :fontawesome-brands-firefox: Firefox | 53+ | 04/2017 | 3.40% | .30% | 3.70% |
| :fontawesome-brands-opera: Opera | 36+ | 03/2016 | 1.44% | .01% | 1.45% |
| | | | | | __92.67%__ |
<figcaption markdown>
Browser support matrix sourced from [caniuse.com].[^1]
</figcaption>
</figure>
[^1]:
2022-01-09 16:00:28 +03:00
The data was collected from [caniuse.com] in January 2022, and is primarily
based on browser support for [custom properties], [mask images] and the
2022-01-09 16:00:28 +03:00
[:is pseudo selector] which are not entirely polyfillable. Browsers with a
cumulated market share of less than 1% were not considered, but might still
be fully or partially supported.
2023-07-06 16:27:53 +03:00
[^2]:
In Material for MkDocs 9.2.0, polyfills for ancient browsers were removed,
so make sure to add them back if you need to support the full version
range as mentioned in the [browser support] matrix. Add the following
lines to `mkdocs.yml`:
``` yaml
config:
extra:
polyfills:
- https://unpkg.com/resize-observer-polyfill
- https://unpkg.com/array-flat-polyfill
```
You can also download the files and self-host them, or use the
[built-in privacy plugin] to do it automatically.
Note that the usage data is based on global browser market share, so it could
in fact be entirely different for your target demographic. It's a good idea to
check the distribution of browser types and versions among your users.
[open an issue]: https://github.com/squidfunk/mkdocs-material/issues/new/choose
[caniuse.com]: https://caniuse.com/
[:is pseudo selector]: https://caniuse.com/css-matches-pseudo
2023-07-06 16:27:53 +03:00
[browser support]: #supported-browsers
[built-in privacy plugin]: setup/ensuring-data-privacy.md#built-in-privacy-plugin
## Other browsers
Albeit your site might not look as perfect as when viewed with a modern browser,
the following older browser versions might work with some additional effort:
- :fontawesome-brands-firefox: __Firefox 31-52__ icons will render as little
boxes due to missing support for [mask images]. While this cannot be
polyfilled, it might be mitigated by hiding the icons altogether.
- :fontawesome-brands-edge: __Edge 16-18__ the spacing of some elements might
be a little off due to missing support for the [:is pseudo selector], which
can be mitigated with some additional effort.
- :fontawesome-brands-internet-explorer: __Internet Explorer__ - no support,
mainly due to missing support for [custom properties]. The last version of
Material for MkDocs to support Internet Explorer is
[:octicons-tag-24: 4.6.3][IE support].
[IE support]: https://github.com/squidfunk/mkdocs-material/releases/tag/4.6.3