Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions docs/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/stylesheets/brand.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ body {
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
height: auto;
width: 4.85rem;
width: 5.4rem;
}
.md-header__button.md-logo {
margin-right: 0.25rem;
Expand Down
11 changes: 8 additions & 3 deletions tests/test_brand_styles.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import re
import xml.etree.ElementTree as ET
from pathlib import Path


Expand Down Expand Up @@ -91,9 +92,13 @@ def test_docs_actions_and_logo_match_the_ink_on_paper_chrome() -> None:
CSS,
re.DOTALL,
)
assert 'fill="#23281F"' in LOGO
assert ">Open</text>" in LOGO
assert ">Adapt</text>" in LOGO
logo = ET.fromstring(LOGO)
view_box = [float(value) for value in logo.attrib["viewBox"].split()]
assert view_box[2] / view_box[3] >= 4.5
assert all(
"textLength" not in element.attrib and "lengthAdjust" not in element.attrib
for element in logo.iter()
)
assert 'content: "Docs"' in CSS
assert "instead of reducing it to “Docs”" in CSS
assert "filter: brightness(0) invert(1)" in CSS