Skip to content

Instantly share code, notes, and snippets.

@garrett
Created February 2, 2023 21:53
Show Gist options
  • Save garrett/837967d812de46d8ac15e8ef31b4ccd2 to your computer and use it in GitHub Desktop.
Save garrett/837967d812de46d8ac15e8ef31b4ccd2 to your computer and use it in GitHub Desktop.
Daring Fireball mobile fix
@media screen and (max-width: 900px) {
body {
font-size: max(16px, 3.5vmin);
min-width: revert;
}
#Box {
width: auto;
padding: 0 1.5rem;
overflow: hidden;
}
#Main {
margin: 0;
position: static;
width: auto;
}
#Sidebar {
position: revert;
display: flex;
width: revert;
flex-flow: column;
}
#Sidebar ul {
display: flex;
gap: 1em;
flex-flow: row wrap;
margin: 0;
padding: 0;
justify-content: center;
}
#Sidebar p {
text-align: center;
margin: 0 0 2rem;
}
#Banner {
width: revert;
text-align: center;
margin: 1rem;
}
#Banner img {
height: auto;
width: 11rem;
}
hr.ookiaks {
margin: 0;
}
}
@garrett
Copy link
Author

garrett commented Feb 2, 2023

License: CC0. Have fun.

@garrett
Copy link
Author

garrett commented Feb 2, 2023

If you're using it in the Stylish extension (at least in Firefox, but I think it's the same for other browsers too) wrap it with:

@-moz-document domain("daringfireball.net") {

and

}

Ideally, John Gruber will use this as inspiration or a starting point. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment