Skip to content

Commit 8f6175a

Browse files
committed
SoC-2024: improve positioning of logo in small screens
We could align the image to right only on bigger screens as it looks good only when the space on the left is enough for some decent amount of content to be shown. On smaller screens, we could just place the image on its one chunk of space (default behaviour when including images in Markdown) and let the content follow it. Tweak the styles to accordingly for this.
1 parent 08ab1dd commit 8f6175a

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

SoC-2024-Ideas.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: default
33
title: SoC 2024 Ideas
44
---
55

6-
<img style="float: right;" src="https://git-scm.com/images/logos/downloads/Git-Logo-2Color.svg">
6+
![git logo >](https://git-scm.com/images/logos/downloads/Git-Logo-2Color.svg)
77

88
This is the idea page for Summer of Code 2024 for Git.
99

css/main.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2062,3 +2062,30 @@ img {
20622062
padding-left: 2em;
20632063
text-indent: -2em;
20642064
}
2065+
2066+
@media screen and (min-width: 800px) {
2067+
img[alt$=">"] {
2068+
float: right;
2069+
}
2070+
2071+
/*
2072+
* Below styles could be useful when we position
2073+
* images to left / center. They're commented now
2074+
* since we don't use images in our site much.
2075+
*
2076+
* Ref: https://stackoverflow.com/a/39614958/5614968
2077+
*/
2078+
/*
2079+
img[alt$="<"] {
2080+
float: left;
2081+
}
2082+
2083+
img[alt$="><"] {
2084+
display: block;
2085+
max-width: 100%;
2086+
height: auto;
2087+
margin: auto;
2088+
float: none!important;
2089+
}
2090+
*/
2091+
}

0 commit comments

Comments
 (0)