mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-23 23:21:00 +01:00
Replaced use of flat() and max() math function for compatibility
This commit is contained in:
parent
c45265d860
commit
0a25f757f4
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -34,7 +34,7 @@
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block styles %}
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.4aa5fe16.min.css' | url }}">
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.43b2f457.min.css' | url }}">
|
||||
{% if config.theme.palette %}
|
||||
{% set palette = config.theme.palette %}
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.e6a45f82.min.css' | url }}">
|
||||
@ -213,7 +213,7 @@
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/bundle.a59c8768.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.9e2e17ab.min.js' | url }}"></script>
|
||||
{% for path in config["extra_javascript"] %}
|
||||
<script src="{{ path | url }}"></script>
|
||||
{% endfor %}
|
||||
|
@ -27,6 +27,7 @@ import {
|
||||
SearchResultItem
|
||||
} from "~/integrations/search"
|
||||
import { h, truncate } from "~/utilities"
|
||||
import { ComponentChild, ComponentChildren } from "preact"
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Helper types
|
||||
@ -61,8 +62,9 @@ function renderSearchDocument(
|
||||
/* Render missing query terms */
|
||||
const missing = Object.keys(document.terms)
|
||||
.filter(key => !document.terms[key])
|
||||
.map(key => [<del>{key}</del>, " "])
|
||||
.flat()
|
||||
.reduce<ComponentChild[]>((list, key) => [
|
||||
...list, <del>{key}</del>, " "
|
||||
], [])
|
||||
.slice(0, -1)
|
||||
|
||||
/* Assemble query string for highlighting */
|
||||
|
@ -172,6 +172,9 @@
|
||||
top: 0.025em;
|
||||
left: -0.126em;
|
||||
z-index: -1;
|
||||
// Hack: the first property is used as a fallback for older browsers
|
||||
// which don't support the min/max/clamp math functions.
|
||||
width: calc(100% + 1.2ch);
|
||||
width: max(2.2ch, 100% + 1.2ch);
|
||||
height: 2.2ch;
|
||||
margin: 0 -0.4ch;
|
||||
|
Loading…
Reference in New Issue
Block a user