Recent Posts

Categories javascript

Workaround for DOM manipulation in Vue app

Post date March 11, 2021

I like writing javascript in a progressive enhancement manner – I assume there is some HTML (DOM) to work with and build my javascript magic around it. Autocomplete or validation for an input? Just grab that input and add event listeners to make users’ lives easier. Pagination without reloading the whole page? Intercept the click […]

Categories CSS javascript

Pixel-perfecting old layouts

Post date February 27, 2021

Once I got a task of upgrading an old website and making it responsive. Sounds common enough. Decision was made to migrate data to new CMS but keep the old layout, because the client liked it. And he liked it exactly the way it was – every single pixel of it. So the question is: […]

Categories javascript

Responsive vuetify carousel with multiple items per slide

Post date January 15, 2021

Today I’ll show you how I used vuetify‘s carousel element to get a result requested by a client. The requirements are defined as follows: images are grouped so that on desktop there are 4 visible at once, on tablet 3 visible at once and on mobile 2 visible at once when the user goes to […]

Categories javascript SVG

Writing interactive snowflake generator in plain javascript – Part 2

Post date December 31, 2020

This is a continuation of an article about generating snowflakes with plain javascript. In the first part we went through the process of creating a desired snowflake with SVG and ended up with a static result representing an example snowflake. Today we’ll write some javascript to make creating snowflakes interactive. As a reminder, here are […]

Categories CSS javascript

calculating coordinates for position:absolute

Post date December 17, 2020

You know what custom selects, dropdown menus and tooltips have in common? They all spawn elements, that may be overlapped by other elements if z-index management is done wrong. Why? Let’s have a look. z-index property There are CSS properties that are beginner friendly – like color or font-size. You can apply them to any […]

Categories CSS javascript

Different approaches to show/hide toggles

Post date November 10, 2020

Showing and hiding parts of DOM is one of those things, that you do with javascript on everyday basis. It is so basic, that most javascript frameworks have it built in from the very beginning. Toggling visibility usually means setting display: none to hide the element and display: block to show it again. Sometimes it […]

Categories javascript

WordPress-like action handling in javascript

Post date September 21, 2020

I really like the concept of events in javascript. How they can be dispatched and handled, how they bubble and how custom events can have additional details. However, at some point I needed to control the order, in which the handlers got executed. And I could not get it done with events, so I decided to implements a mini wodrpress-like system to handle that case.