MediaWiki talk:Mobile.css: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
Remembered a better solution in a place
(Created page with "== Various div#article-type issues == For context, this is the div that templates like Template:Rename, Template:Spoiler, etc. place on the page. === Text colour === Firstly, it's ''genuinely unclear'' to me why, in the snippet below, the color is set to <span style="white-space:nowrap;">--alt-</span>text-color. @media screen and (max-width: 720px) { div#article-type p { margin-left: 0; color: var(--alt-text-color); } div#art...")
Tags: Mobile edit Mobile web edit
 
(Remembered a better solution in a place)
Tags: Mobile edit Mobile web edit
 
Line 33: Line 33:
I propose replacing that line with something like this:
I propose replacing that line with something like this:
     min-width: 528.5px;
     min-width: 528.5px;
     min-width: min(528.5px,90vw);
     min-width: min(528.5px,100%);


This would still look the same with large viewport widths, but would work with smaller widths as well. The min() function is supported in most browsers only since around 2020, so I've included the first line to fall back to the current behaviour if a browser doesn't support it.
This would still look the same with large viewport widths, but would work with smaller widths as well. The min() function is supported in most browsers only since around 2020, so I've included the first line to fall back to the current behaviour if a browser doesn't support it.
582

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.