bitstorm.org

Weblog by Edwin Martin about frontend webdevelopment and related topics

Released today… BlendBlastCSS, the revolutionary new visual CSS color framework. Prepare to have your world ROCKED and your screens SIZZLED with the most electrifying CSS color framework to ever grace the digital universe! Say goodbye to boring old RGB and HEX codes. Who knows which colors #d2691e and rgb(153, 50, 204) are? Exactly: nobody! We’re taking CSS color to the NEXT LEVEL with our mind-bending, eye-popping, jaw-dropping CSS color system: BlendBlastCSS. BlendBlastCSS’s color system is s…

Should frontend web developers worry about security? A backend developer once told me that as a frontend developer I didn’t have to worry about security. All security would be handled on the backend. He did have a point. Topics such as injection, path traversal and DDoS attacks take place on the backend. If you look at the OWASP Top 10 Web Application Security Risks, you only see server side vulnerabilities. And also, a browser cannot be trusted. Someone’s computer may have been compromised or …

Developers often complain when they have to support time zones or daylight saving time. The time they want to show differs by one (or more) hours from the time in the data. Sometimes they solve this by adding the difference themselves, not knowing that this only made the problem worse and the time after the next summer-winter time change is probably incorrect again. While the solution is very simple. Always save time as GMT, so without time zone offset and without daylight saving time. You can …

Machine learning is a subfield of artificial intelligence that focuses on developing algorithms that are able to automatically learn and improve based on data. This technology can help front-end web developers by providing them with powerful tools and techniques to solve complex problems and improve and accelerate their work. There are several ways machine learning can help front-end developers. For example, machine learning algorithms can be used to analyze and predict data, which can help opt…

Web components is a W3C web standard that allows you, simply put, to create your own HTML tags. Adding a map to your web page can be as simple as adding this tag: <g-map latitude="52.3812258" longitude="4.9001255"></g-map> With web components, you can work in a component-based way without needing a JavaScript framework like Angular, React, or Vue. However, the tag needs to be made available on the page using JavaScript. We’ll come back to this later. According to Wikipedia, web components…

This summer, I’ve been working on updating my Game of Life site. I looked at several JavaScript frameworks, but was not satisfied with the performance of any of them. I could’ve used my own miq lilbrary, but that mimicks the jQuery API too much. When you write in native DOM, you probably use document.querySelectorAll(selector) a lot. After a while, you probably write a helper function like this: const $ = (selector, dom) => Array.from((dom || document).querySelectorAll(sele…

In HTML and JavaScript, you can easily apply some styling with the style attribute or property. But if you just want to pass a value, like a color, style falls short. Fortunately, there is a solution for this, which has now been adopted by all modern browsers: CSS Custom Properties for Cascading Variables, or CSS variables for short. How do CSS variables work? Let’s start with an example in CSS: :root { --warning-color: orange; } .warning { color: var(--warning-color, red); border: 1px s…

Before the year 2000, people who made websites did it all: designing, programming, deployment, SEO et cetera. It didn’t take long to figure out that programmers weren’t great designers and designers weren’t great programmers. Some people where great at both, but they where rare and a statistical coincidence. So the design and programming of websites where assigned to different roles. Around 2007 a new role emerged: the front-end developer. For a long time, front-end was thought of as easy, some…

With HTML, CSS and JavaScript, it’s not prescribed how to format your code. Everything on one line or not, lots of spaces, tabs or everything packed together, for the computer it doesn’t really matter. The result is that everybody will develop its own style. On itself, that isn’t bad, but when multiple developers with their own styles will work on the same code, it will become a bit harder. With different styles, the code will become harder to read and changes to the style will pollute the vers…

A while ago I was working on several websites in a Vagrant container. The problem was that we couldn’t test the sites on mobile devices. The IP address of the Vagrant box was known inside my computer, but not outside, on other devices. I could use a proxy like Squid, but it was too big, had to be configured and couldn’t be installed with npm, like the other tools. I wrote a simple tool in Node to provide the necessary functionality. Now, I have complete rewritten the tool, named it testproxy an…