4 ms·
Using JS over CSS for sizing elements rarely is a 'better solution', mostly because of flashes of unstyled content - especially on mobile where it might take lo
by jariz 7y ago
Using JS over CSS for sizing elements rarely is a 'better solution', mostly because of flashes of unstyled content - especially on mobile where it might take longer for the JS to fully initialise.
Like other comments on here say, just use height: 100% instead.