Hello, I'm Stanko, a software engineer in Belgrade, making digital products and generative art.

Change to position fixed on iOS Safari while scrolling


If you ever had to fix element on scroll, you probably had an issue on iOS Safari (and other mobile devices). Element will usually flicker, and disappear until scrolling has stopped completely.

Just force GPU acceleration by adding transform: translate3d(0,0,0); to your element.

You will have something like this:

.Element-header {
  transform: translate3d(0,0,0);

.Element-header--fixed {
  top: 0;
  position: fixed;

Enjoy ¯\_(ツ)_/¯

Update, if the element inside fixed one flickers

In the comments Matt made a great tip, so I’m adding it here as well:

If you are styling the element within fixed element, you need to apply the translate3d hack to the nested element in order for it to not flicker/disappear.

Thanks Matt!

Highlight variables in Atom, Babel template strings

Atom Babel plugin doesn’t highlight variables in ES6 (ES2015) template strings.

You’ll need to add this snippet to your Atom’s style.less

atom-text-editor::shadow .variable.js {
  color: #F8F8F2;

ES6 template string with variable highlighted in Atom

In general, you can just inspect stuff in Atom, find out what classes element are using, and then style it via CSS (LESS). Just don’t forget to add atom-text-editor::shadow before your rules.

If anyone is interested, I’m using Monokai Seti theme.

Switching to Atom, this time for good

I’m a big fan of Sublime Text editor, which I was using for years now. Minimal, fast, reliable. But there is one big problem with it. Only one man is working on it’s development and community really slowed down. JavaScript ecosystem is going forward at incredible speed, and I’m not sure if Sublime will be able to keep up.

Even bus factor comes to mind.

That’s why I tried couple of alternatives. When comes to bigger IDEs JetBrains is really good, but it is not as snappy as I would like. Logical move was to try GitHub’s Atom editor again.

Atom editor

Read more

Null Object Tech Meetup Vol 2

Two days ago, we held the second Tech Meetup. There were two speakers including myself, and Nemanja Nićiforović, our CEO. Nemanja spoke How to Freelance, and I covered Intro to React.

Grab slides:

We are very thankful to our friends at Zaokret where meetup took place. There were around 60 people and we hope even more people will come to the next one. Hopefully, we are not going to make a year long pause like we did between this and the last one.

Null Object tech meetup atmosphere

Stanko Tadic talking at tech meetup

Null Object tech meetup audience

HTML canvas video player

This is the one of my most popular repos. Once client asked for inline video that works on iPhone too. As Apple doesn’t allow that (all videos are full screen in native player, and autoplay is not supported),. There was no easy solution, so this player was born.

It uses HTML video and canvas. Script picks up the frame from the video and draws it on the canvas. For sound, there is audio element using video files (you can provide different audio file for it).

HTML canvas video player - Demo

Play, pause, jump to time and autoplay are all supported. But please check the documentation and demo.

You shouldn’t use this on any device that supports HTML video natively, but as a fallback.

Grab the code on GitHub.