Open nfagerlund opened 5 years ago
An implementation wrinkle that can come up: once a container has been set to overflow: auto
(in either dimension), it will clip and hide any relatively positioned children that get pushed outside its boundaries. And that can be a problem if you're trying to use position: relative (or a negative margin-top, which works similarly) to nudge the userpic up out of the body content area and into the header area.
The fix seems to be to set the parent of the scrollable container to position: relative, then use position: absolute (which ends up being relative to that parent) to put the userpic into place. That makes it so you can't float the userpic, but a ::before pseudo-element of the same size makes a good floatable substitute.
Most of the built-in S2 layouts have one or more of the following issues, especially on mobile:
overflow-x: auto
, so that if worst comes to worst they can scroll independently without trashing an entire page.overflow-wrap: break-word
.This isn’t a “fix it, done” issue; it’s more just a space to talk about what’s worth doing in service of being a Mobile Friend, and a thing to reference when making edits that serve this goal without addressing some other issue.
I turned on responsive design mode, set it to 320px wide (the venerable iPhone SE size), and previewed every single built-in layout on dreamwidth.org (except Tabula Rasa). This wasn't a deep dive; it was just a scroll down a fairly ordinary "recent entries" page. Here's what I learned:
In Excellent Condition
These actually look pretty dece. We can do some preventative maintenance and send them on their way.
For all of these, we need to at least check the amount of indentantion on blockquotes and list items (the defaults are usually too aggressive) and protect against overflows (with
overflow-wrap: break-word
in headers/metadata, andoverflow-x: auto
in content).Needs Simple, Straightforward Adjustments
Like the previous group, these need overflow checks and list item / blockquote indent adjustments. They also have some other issues, usually overly wide margins. But otherwise, they're in fairly decent shape.
Needs Extensive Adjustments, but Salvageable
These all make a tremendous mess on mobile. The fixes aren't immediately obvious and might require design decisions, but they don't seem intractible.
#primary > .inner
???). This one could have maybe gone in the previous section, but untangling its weird decisions about padding will take a bit longer than those.Entirely Screwed and Needs Extensive Redesign
These styles are so bad on mobile that they might need to be re-thought from the ground up. (Or hey, maybe not, if we're lucky.) Some of them are bad enough that I need someone else to make the argument for even trying.