:Has Selector

Exploring the New :has Pseudo Selector and Its Uses

Lawrence Chabela CSS & HTML, Design, Development Technologies Leave a Comment

Through the years, we were told a parent selector would be an engineering feat that could not be achieved due to the way browsers render a page and apply computed styles to elements as a stream, one element after the other. When the browser paints a parent and inevitably its children, reevaluating this already-painted DOM to evaluate parents for children containing a particular context would be too expensive of a task.

As the years moved on, we all applied different hacks or strategies, either reworking our DOM to avoid the issue altogether or using various JavaScript techniques to select parents and add CSS classes to use instead. We were just waiting for something to save us…

Preventing Layout Shift

Using CSS Grid to Prevent Page Jank

Lawrence Chabela CSS & HTML, Design, JavaScript, Programming, Tutorial Leave a Comment

Layout shifts, or page jank as I like to call it, rears its ugly head when a visible element changes position or dimensions, causing the position or dimensions of content around it to be changed.

There are too many possible reasons behind a layout shift to cover in one post, so I’ve narrowed it down to one in particular for the sake of brevity. In this article, we will discuss this scenario: a component changing its height due to its state being changed from user interaction.

I know that this is a relatively isolated example, especially in the grand scheme of things. However, I think this proves an important point. Solving a layout shift doesn’t always have to be a tedious and complicated process to fix. Sometimes, scenarios like this can easily be solved using the CSS we already have at our disposal.

JavaScript Optional Chaining – An Introduction

Lawrence Chabela CSS & HTML, Development Technologies, JavaScript 1 Comment

There is a new exciting feature coming to JavaScript in the not-so-far future. That feature is Optional Chaining. At this moment, Optional Chaining is in Stage 3 of the TC39 process, so it’s in late stages of the process and will be here soonish.

In general terms, Optional Chaining is an approach to simplify JavaScript expressions for accessing deeply nested values, array items, and methods when there is a possibility that a reference may be missing.

In this blog, we give an introduction to Optional Chaining in JavaScript. We discuss what problems Optional Chaining solves, the various ways you can use it, and relatable code examples.

C# On The Client Side With Blazor

Clayton Terry .NET, CSS & HTML, Development Technologies Leave a Comment

With the introduction of .Net Core 3.0, Microsoft has built its own web UI framework.

Introducing Blazor: Microsoft’s fully C# client-side framework. With the help of its Razor platform, Microsoft is attempting to put its hat in the ring with the likes of Angular, React, and Vue.

Blazor allows developers to fully design and execute web pages purely with C# — it is meant to eliminate the need for JavaScript. The goal is also to hopefully limit the number of vulnerabilities found in front-end UI work.

In this post, we give an introduction to Blazor and a quick tutorial for getting started.

Part 3: Using Node​ and Markdown​ + the Package Showdown

Chris Berry JavaScript, Node.js, Single-Page Application, solidfoundationsseries, Tutorial, Vue.js Leave a Comment

This is an in-depth learning series focused on a specific application: a JavaScript-based suite of single-page applications optimized for use in a microservice environment. We focus on telling the story of “why” and “how” it was built. 

In Part 2 of our Solid Foundations Learning Series, we covered quite a bit of ground surrounding the discovery of Handlebars files, creating navigation based off of those files, and the routing back to the server based on those files.

Now we’re going to dive back into the Handlebars pages and find out how we’re getting content into the pages when they’re rendered by the server.