CSSence, to CSS
@CSSence@mas.to avatar

I guess you know that the new range syntax allows media queries to be more concise. But IMO this isn’t even the best part. Let me explain:
https://cssence.com/2024/superior-range-syntax/

Also, if you ever wanted to do music selection based on viewport size 🤨, this article is for you.

skyfaller, to webdev
@skyfaller@jawns.club avatar

Since the mobile web era began, web pages have included this #HTML boilerplate to indicate they've accounted for smartphone screens, so phones shouldn't zoom the #viewport weirdly:

<meta name="viewport" content="width=device-width, initial-scale=1">

Is this whole incantation still necessary on every web page? MDN says the initial-scale attribute has "Default: 1": https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag#initial-scale

Does that mean we can skip that attribute? Paging @j9t

Stackoverflow fail: https://stackoverflow.com/questions/74384622/is-initial-scale-1-necessary-to-be-included-in-meta-viewport-tag

iamdtms, to CSS
@iamdtms@mas.to avatar

--subtitle: calc(1.1rem + 1vw);  
iamdtms, to CSS
@iamdtms@mas.to avatar
paul, to random
@paul@status.kinlan.me avatar

Is viewport-fit attributes in the <meta name='viewport'> used by Safari spec'ed anywhere?

cheeaun,
@cheeaun@mastodon.social avatar
nhoizey, to random French
@nhoizey@mamot.fr avatar
stephaniewalter, to random
@stephaniewalter@front-end.social avatar

The ideal viewport doesn’t exist:https://viewports.fyi/
You can’t make design decisions based on user’s viewport, instead, go beyond, structure your content, make sure it works at different sizes, with different user conditions, etc.

nhoizey, to random French
@nhoizey@mamot.fr avatar
pablolarah, to CSS
@pablolarah@mastodon.social avatar

🟡🔵 The ideal viewport doesn’t exist
By Leanne Renard @leannecodes , Liridon Hasani liridon.dev and Andy Bell @belldotbz @andy , for Set Studios
@setstudiotweets

https://viewports.fyi/

Meyerweb, to random
@Meyerweb@mastodon.social avatar

This week I’m messing about with scroll-linked animations, and I’m having trouble figuring out a way to do a specific pattern. Easier to show it than to describe it, but I’ll try: The animation starts in its timeline according to how much of the element has been revealed, and proceeds from there to 100% as the end of the element approaches the view. In effect, “the furthest point in the element you can see is this much from the beginning of the element.” Any clever clogs care to cogitate?

video/mp4

bramus,
@bramus@front-end.social avatar

@simevidas @kizu @Meyerweb I think what was meant is "when the viewport needs to scroll" instead of a literal interpretation.

In https://drafts.csswg.org/css2/#viewport it says “UAs for continuous media generally offer users a viewport [...] When the viewport is smaller than the area of the canvas on which the document is rendered, the UA should offer a scrolling mechanism”

This mechanism is not named in the spec but I've heard/used the terms root scroller or document scroller.

simevidas, (edited ) to random
@simevidas@mastodon.social avatar

CSS spec:

> The viewport-percentage lengths are relative to the size of the initial containing block

https://drafts.csswg.org/css-values/#viewport-relative-lengths

If that is true, then why does 100vw overflow when a classic scrollbar is present? Classic scrollbars shrink the ICB, so 100vw should decrease, but it doesn’t, so the spec text is wrong or what?

edit: The answer is that the CSS spec lives in an imaginary world where classic scrollbars don’t exist, so the ICB is never shrunk by such a scrollbar.

jrefior, to webdev
@jrefior@hachyderm.io avatar

What's the lowest viewport resolution you're committed to supporting?

jrefior, (edited ) to CSS
@jrefior@hachyderm.io avatar

Ran into this problem testing on my mom's iPad. Can't rely on pure CSS for viewport height
https://chanind.github.io/javascript/2019/09/28/avoid-100vh-on-mobile-web.html

Update: thanks for the info/correction! I'm trying out the new units (replacing 100vh)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • modclub
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • InstantRegret
  • Durango
  • Youngstown
  • slotface
  • thenastyranch
  • love
  • kavyap
  • GTA5RPClips
  • normalnudes
  • tester
  • khanakhh
  • ngwrru68w68
  • everett
  • osvaldo12
  • rosin
  • ethstaker
  • Leos
  • anitta
  • cubers
  • tacticalgear
  • cisconetworking
  • provamag3
  • JUstTest
  • All magazines