Greeksock Pinning Creates Cumulative Layout Shift - gsap

My website pin 100% width and 100vh height body sections to the page using ScrollTrigger.
When scrolling down the page, when pinning initiates it causes core web vitals cumulative layout shift scores to rise to failing levels.
Is this expected with Gsap pinning or does it suggest a structure issue?

Related

How do you scale images/sprites properly in Godot?

I'm trying to create a 2D cross-platform game (primarily for android & ios in portrait mode, however compatibility with a tablet/desktop would be a bonus) and I'm trying to wrap my head around scaling of my sprites.
I've looked online, and I've ended up setting the following in my Project Settings > Stretch
'Mode' : 2D
'Aspect' : keep-height.
According to https://www.mydevice.io the viewport of my android phone is 360 x 640px (the standard 16:9 ratio for mobiles). But obviously phones/tablet screens come in all sorts of dimensions.
If I wanted to create a sprite with a width exactly 1/3rd of that of my screen/viewport, how should I go about doing this? Should I be creating multiple sprites of various dimensions (in say, GraphicsGale) to account for different screen sizes, or should I be purely doing this scaling in Godot?
I know there's a 'scale' property in Godot, but I can't see a way of setting my image width and height via pixels or by a percentage of the viewport.
Have you tried setting the sprite size depending on the viewport height and width ?
$sprite.size.x = get_viewport().size.x * 0.33
$sprite.size.y = get_viewport().size.y * 0.33
You can check out this reddit post if this is not working.

How do I maintain my app's background while a website is being displayed?

When my app redirects to a web page the background (particularly the stuff near the top) becomes very condensed and I don't know why. It's almost as if the screen is pushing everything closer to the top in order to make room for the website view. How do I avoid this? Right now I have a center border on the website view.
ex: website.add(BorderLayout.CENTER, browser);
I suggest you read about peer components which indicate some of the limitations of peers. Even though we are are revisiting this the core concepts and limits still apply.
Things get pushed because of layout and separation of scrolling behavior. If you stick stuff in the NORTH you will have the website and the content competing for the same space.

Increase bootstrap grid width beyond 1170px

Is there a way to increase the width of the Bootstrap 3 grid to beyond 1170? My users often use devices that support 1920 x 1080 resolution. I want to maintain the responsiveness (in case the window is not maximized) but whenever the window is > 1600px in width, I want the grid system to be as wide as 1600px.
Is there a way to add another "step" to the grid system for windows wider than 1600px? Preferably without using LESS, just by adding some Custom CSS to override original Bootstrap rules?
Allow me to answer the question myself. I needed to change my search keywords to find the answer. It was mentioned in this issue on Bootstrap's GitHub issue tracker (last comment). It is a CSS file called BootstrapXL which basically adds a new "x-large" grid level to Bootstrap 3 for devices beyond 1600 px in width (i.e. Full HD monitors with the window maximized).

High resolution display give incorrect viewport when snapping (Surface Pro)

I just got to test IE10 on a Surface Pro with 1920*1080 display resolution where "make text and other items larger or smaller" has been set to Large.
On my website I have added the CSS+JS viewport fix in addition to the viewport meta tag, all asking for width: device-width (plus I added a "min-width: 320px;" to the #-ms-viewport definition to ensure it never gets smaller than that).
I added some javascript to display the value of window.screen.width and $(window).width to see what the browser ended up using for viewport in IE10, and to my surprise the screen size of a 1920*1080 resolution display was reported as 1280x720!
Now, I can live with with that (just like small phone screens report 320px width no matter their actual resolution, since it is a good size to make stuff human readable across devices for the same font size), but when the 'Metro IE10' is snapped to the side of the screen, the problem comes: IE10 tries to make a 320px rendering of the website, but it zooms in so the right side of it is hidden.
I tried Microsofts own test page: http://ie.microsoft.com/testdrive/Graphics/MakeItSnappy/
It does the same thing - on the Surface Pro the right side is hidden, and you need to drag left/right to see it, and you cannot even zoom out to view the full width!
But when trying the same thing on my laptop with a 'normal' 1366x768 display (rendered as 100%), the snapped IE10 display has the perfect size.
Ok, I guess this is a Microsoft Windows scaling bug - but my question is: Has anybody else experimented with changing the "make text and other items larger or smaller" to 125% or 150% and making websites adapt correctly?
Check out this fix from developer Matt Stow
http://mattstow.com/responsive-design-in-ie10-on-windows-phone-8.html

What's hardware-accelerated besides -webkit-transform on mobile safari (webkit)?

I'm building an application using Sencha Touch that's targeting iPads. The only way to achieve a smooth animation that I know is to use -webkit-transform css property. That works for moving things around with translate3d and scaling them, however I'm looking to change elements' dimensions (width and height). Imagine an element that grows in size to accomodate for a new child - that's what I'm after
You won't have any luck with width and height, as any transitions for these properties won't be hardware accelerated. What you'll get instead in Safari is a jerky animation that isn't even scaled properly. In my tests, the browser would first transition the height, then the width would snap into place abruptly, or vice versa. If all you want to do is scale an element (change its dimensions) then you should us -webkit-transform: scale(x, y).