Don’t Make This Silly Mistake With Your resize-observer-polyfill

In the same way that a polyfill is used to make the CSS and JavaScript code in this post simpler and faster, I have created a polyfill that I use to fill the gap between the DOM elements and the CSS stylesheets. I have used this to make the CSS in this post much faster and easier to read.

The thing that makes polyfills great is they can fill in gaps that you don’t know exist, but in this case I assumed that there was no gap between the CSS and the DOM.

The reason why you don’t know what you’re looking for is because when you need to show the image in your head, the images are not there. Instead of saying, “Hello, my name is” and using the same code, I have used the same code to show the image of the current page and to show the image of the current page on the previous page.

The issue is that polyfills arent the best tool for filling in gaps, they tend to be overkill for that. In this case Im sure you could use a js polyfill like

Theres no problem in using a polyfill on a page, but theres a problem when you use it on a page that doesnt exist. Imagine you have a page that has a gap in the background image. This wouldnt be a big deal in the context of a polyfill though. If you dont specify the height of the page, it will use the background image and fill the gap.

I use polyfill because its more efficient than theres we do use its much faster to implement on a page that doesnt have a background image.


How would this work for a game? You could use it to draw a circle around an object and then move around it. By making this circle move around, you can also draw your object in various positions. But you could also draw a circle around the object and move around it.

Yep. The big thing to think about with this is what it means to “draw around” an object. If you draw a circle around the object, that means you are drawing a full circle around it, not just a part of it. So if you wanted to make a circle around your car, you would draw a circle around the car and then rotate your entire car.

This is an interesting solution that you could use to make a circle around something. But it is a little tricky because you would have to think of something to offset the position of the circle, which might not be obvious.

Leave a comment