Skip to content

Commit

Permalink
style: Improve responsive image and text layout with container and me…
Browse files Browse the repository at this point in the history
…dia queries
  • Loading branch information
sanity committed Nov 30, 2024
1 parent f8105ae commit 87da5c4
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions hugo-site/themes/freenet/assets/css/freenet.css
Original file line number Diff line number Diff line change
Expand Up @@ -319,19 +319,27 @@ p.page-end-spacer {
}

/* Mobile image handling */
@media screen and (max-width: 480px),
(min-width: 481px) and (max-width: 800px) and (min-content-width: < 200px) {
@container (max-width: 800px) {
div[style*="float: right"] {
float: none !important;
margin: 0 auto 20px auto;
display: block;
}

div[style*="float: right"] + p {
min-width: 200px; /* Ensures at least ~10 words can fit */
}

@media screen and (max-width: 480px) {
div[style*="float: right"] {
float: none !important;
margin: 0 auto 20px auto;
display: block;
}
}

/* Ensure minimum text width next to floating images */
div[style*="float: right"] + p {
min-width: 200px; /* Ensures at least ~10 words can fit */
}

.navbar-item.ghost-key:hover {
opacity: 0.8;
}
Expand Down

0 comments on commit 87da5c4

Please sign in to comment.