From 2d1da2886db9569524f8063a3d6612d8f4731f6e Mon Sep 17 00:00:00 2001 From: ThePetrovich Date: Tue, 18 Aug 2026 14:05:28 +0800 Subject: [PATCH] revert padding fixes --- .gitignore | 155 +++++++++++++++++++++++++++++++ yksa_web/static/yksa/css/kit.css | 41 +++----- 2 files changed, 169 insertions(+), 27 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5e70718 --- /dev/null +++ b/.gitignore @@ -0,0 +1,155 @@ + +# Created by https://www.toptal.com/developers/gitignore/api/python +# Edit at https://www.toptal.com/developers/gitignore?templates=python + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +pytestdebug.log + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ +doc/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +pythonenv* + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# profiling data +.prof + +# Db and static files +*.sqlite3 +/media +/static +/postgres +/EXAMPLE_* + +# Docker +docker-compose.override.yml +docker-compose.override + +# End of https://www.toptal.com/developers/gitignore/api/python diff --git a/yksa_web/static/yksa/css/kit.css b/yksa_web/static/yksa/css/kit.css index 4acad01..f92e7eb 100644 --- a/yksa_web/static/yksa/css/kit.css +++ b/yksa_web/static/yksa/css/kit.css @@ -65,42 +65,35 @@ } /* Nav links fill the bar's height and butt against one another, so the active - item reads as a selected tab rather than a highlighted word. - - The height comes from the chain below, not from padding. It used to come from a - hard-coded `padding-top: 12px` on top of a text line box, which meant any item - whose content was not text -- the language flag -- came out short. */ + item reads as a selected tab rather than a highlighted word. */ .nav-full-height { display: flex; align-items: center; height: 100%; } +/* The top padding is deliberately larger than the bottom: it is what sits the link + text on the same optical line as the wordmark in the brand block. Do not + symmetrise it -- the alignment is the reason it is here. */ .nav-full-height.nav-link { color: inherit; padding-left: 1rem !important; padding-right: 1rem !important; - padding-top: 0; - padding-bottom: 0; + padding-top: 12px; background-color: var(--bs-body-bg); margin-right: -1px; } -@media (min-width: 992px) { - /* Give `height: 100%` above something definite to resolve against: the bar's - height has to reach the through the container, the collapse and the -
  • , or it resolves to `auto` and the rule does nothing. */ - .custom-navbar > .container, - .custom-navbar > .container-fluid, - .custom-navbar .navbar-collapse, - .custom-navbar .navbar-nav, - .custom-navbar .nav-item { - height: 100%; - } +/* The locale item's only content is a flag image. Because the link is a flex + container, an image child gives it no text line box to take its height from, so + the item came out ~9px shorter than every neighbour. Reserve the height one line + of body text would have occupied and letterbox the flag inside it: same box as + its neighbours, flag unscaled and undistorted. - .custom-navbar .navbar-nav { - align-items: stretch; - } + Scoped to .nav-link so the brand block's wordmark is untouched. */ +.nav-full-height.nav-link > img { + min-height: calc(1em * var(--bs-body-line-height)); + object-fit: contain; } .nav-full-height.nav-link:hover, @@ -329,12 +322,6 @@ padding-top: 0.5rem; padding-bottom: 0.5rem; } - - /* Stacked, the rows size to their own content again. */ - .custom-navbar .navbar-nav, - .custom-navbar .nav-item { - height: auto; - } } /* -----------------------------------------------------------------------------