Whitespace tolerance (#237)

* Use flexbox for centering image blocks

* Fix tab display

* Make tag list wrappable and HTML whitespace tolerant

* Make header navigation HTML whitespace tolerant
This commit is contained in:
liamwhite 2024-04-27 22:19:57 -04:00 committed by GitHub
parent ba87c1679e
commit b1a23292fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 16 additions and 12 deletions

View file

@ -124,6 +124,7 @@ a.block__header--single-item, .block__header a {
.block__header--js-tabbed { .block__header--js-tabbed {
@extend .block__header--light; @extend .block__header--light;
background: transparent; background: transparent;
display: flex;
border-bottom: $border; border-bottom: $border;
a { a {

View file

@ -23,6 +23,11 @@
padding-left: 6px; padding-left: 6px;
} }
.header__navigation {
display: flex;
flex-wrap: wrap;
}
a.header__link { a.header__link {
display: inline-block; display: inline-block;
padding: 0 $header_spacing; padding: 0 $header_spacing;

View file

@ -92,12 +92,6 @@ div.image-container {
overflow: hidden; overflow: hidden;
/* prevent .media-box__overlay from overflowing the container */ /* prevent .media-box__overlay from overflowing the container */
text-align: center; text-align: center;
a::before {
content: "";
display: inline-block;
height: 100%;
vertical-align: middle;
}
img, img,
video { video {
vertical-align: middle; vertical-align: middle;
@ -105,12 +99,12 @@ div.image-container {
max-height: 100%; max-height: 100%;
} }
/* Make the link cover the whole container if the image is oblong */ /* Make the link cover the whole container if the image is oblong */
a { a, picture, video {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: inline-block; display: inline-flex;
text-align: center; align-items: center;
vertical-align: middle; justify-content: center;
} }
} }

View file

@ -70,7 +70,11 @@
.tag > span { .tag > span {
padding: 5px; padding: 5px;
display: table-cell; display: table-cell;
white-space: pre; }
.tag-list {
display: flex;
flex-wrap: wrap;
} }
.tag a { .tag a {

View file

@ -1,4 +1,4 @@
.hide-mobile .hide-mobile.header__navigation
.dropdown.header__dropdown .dropdown.header__dropdown
a.header__link href="/images" a.header__link href="/images"
| Images | Images