Classy and Cool Custom CSS Scrollbars: A Showcase

Category Image 091

In this article we will be diving into the world of scrollbars. I know, it doesn’t sound too glamorous, but trust me, a well-designed page goes hand-in-hand with a matching scrollbar. The old-fashioned chrome scrollbar just doesn’t fit in as much.

We will be looking into the nitty gritty details of a scrollbar and then look at some cool examples.

Components of a scrollbar

This is more of a refresher, really. There are a bunch of posts right here on CSS-Tricks that go into deep detail when it comes to custom scrollbar styling in CSS.

To style a scroll bar you need to be familiar with the anatomy of a scrollbar. Have a look at this illustration:

A webpage wireframe with a scrollbar highlighting the scrollbar thumb and scrollbar track.

The two main components to keep in mind here are:

  1. The track is the background beneath the bar.
  2. The thumb is the part that the user clicks and drags around.

We can change the properties of the complete scrollbar using the vendor-prefixed::-webkit-scrollbar selector. We can give the scroll bar a fixed width, background color, rounded corners… lots of things! If we’re customizing the main scrollbar of a page, then we can use ::-webkit-scrollbar directly on the HTML element:

html::-webkit-scrollbar {
  /* Style away! */
}

If we’re customizing a scroll box that’s the result of overflow: scroll, then we can use ::-webkit-scrollbar on that element instead:

.element::-webkit-scrollbar {
  /* Style away! */
}

Here’s a quick example that styles the HTML element’s scrollbar so that it is wide with a red background:

What if we only want to change the scrollbar’s thumb or track? You guessed it — we have special prefixed pseudo-elements for those two: ::-webkit-scrollbar-thumb and ::-webkit-scrollbar-track, respectively. Here’s an idea of what’s possible when we put all of these things together:

Enough brushing up! I want to show you three degrees of custom scrollbar styling, then open up a big ol’ showcase of examples pulled from across the web for inspiration.

Simple and classy scrollbars

A custom scrollbar can still be minimal. I put together a group of examples that subtly change the appearance, whether with a slight color change to the thumb or track, or some light styling to the background.

As you can see, we don’t have to go nuts when it comes to scrollbar styling. Sometimes a subtle change is all it takes to enhance the overall user experience with a scrollbar that matches the overall theme.

Cool eye-catching scrollbars

But let’s admit it: it’s fun to go a little overboard and exercise some creativity. Here are some weird and unique scrollbars that might be “too much” in some cases, but they sure are eye-catching.

One more…

How about we take the scrollbar for a spin in a train for the thumb and tracks for the, well, the track!


Classy and Cool Custom CSS Scrollbars: A Showcase originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

The Top 3 Challenges of AI-Powered Voice Technology

Featured Imgs 23

The promise of artificial intelligence (AI) that can generate human-like data has been talked about for decades. Yet, data scientists have tackled this problem with little success. Pinpointing effective strategies for creating such systems has presented challenges that run the gamut from technical to ethical and everywhere in between. However, generative AI has emerged as a bright spot to watch. 

At its most basic, generative AI enables machines to use elements such as audio files, text, and images to produce content from speech, to writing, to artistry. According to tech investor Sequoia Capital, “Generative AI is well on the way to becoming not just faster and cheaper, but better in some cases than what humans create by hand,” according to a recent Tech Monitor interview. 

Making a CodePen Embed Resizable is Easy!

Category Image 091

Just a little CSS. If you use the default recommended HTML embed code, the <iframe> that is ultimately the CodePen Embed itself is wrapped in a <div>:

<div class="cp_embed_wrapper">
  <iframe ... ></iframe>
</div>

That outer <div> gives you an opportunity to make embeds resizeable or do whatever other styling you might want. You could also put your own wrapper around it, whatever floats your boat.

The very easiest bit of CSS to apply to your page to make the embed resizble:

.cp_embed_wrapper {
    overflow: hidden;
    resize: horizontal;
}

Wanna resize both ways?

.cp_embed_wrapper {
    overflow: hidden;
    resize: both;
}
.cp_embed_wrapper > iframe {
    height: 100%;
}

Here’s a version that stays centered and has a little bonus styling. As an embed, so meta!

The post Making a CodePen Embed Resizable is Easy! appeared first on CodePen Blog.

Varchar vs Nvarchar Sql Server Difference (2022)

Featured Imgs 23
Varchar and Nvarchar are data types in SQL Server. The main difference between varchar and narchar is that the narchar is used for storing Unicode characters while varchar is used for storing Non-Unicode characters. Data storage is 1 byte per character in varchar while data storage in nvarchar is 2 bytes per character. In field […]

Gutenberg 14.5 Introduces New “Document Overview” Panel, Improves Block Spacing Controls

Category Image 091

Gutenberg 14.5 was released today with a modest set of enhancements and dozens of bug fixes and code quality improvements. The highlight of this release is the new “Document Overview” panel, which combines what was previously found under separate icons in the Editor toolbar under “List View” and “Details.” This popup was where information like words, characters, headings, time to read, paragraphs, and blocks used to be found:

Details view prior to Gutenberg 14.5

The new Document Outline panel can be opened using the List View icon in the toolbar. Characters, words, and “time to read” have been moved to the bottom of the panel. This makes the entire panel cleaner, as the document stats were overly prominent before and the details popup had become even more crowded after the addition of the “time to read” stats.

image credit: Gutenberg 14.5 release post

This release also improves block spacing controls to make them more visual so that users can immediately see how changing the controls will impact the surrounding blocks. Gutenberg contributor Nick Diego demonstrated this update in a video:

A few other notable additions to this release include the following:

Check out the release post for a more detailed list of all the bugs fixed, documentation updated, and code quality improvements in 14.5.

Saving Interesting Observability Data Using SLO-Based Retention Policy

Featured Imgs 23

In any data management policy, there are two extremes: save everything (just in case), and delete everything that ages out. The two extremes work hand in hand, as eventually, you decide that even if you want to save it all, the realities of storage costs have forced you to delete your data arbitrarily.

Ideally, you would retain "interesting” data that might be useful and delete the rest. Even better would be to not collect the data in the first place.

Devoxx Belgium 2022 Takeaways

Featured Imgs 23

In October 2022, I visited Devoxx Belgium after two cancelled editions due to COVID-19. I learned a lot and received quite some information which I do not want to withhold from you. In this blog, you can find my takeaways of Devoxx Belgium 2022!

1. Introduction

Devoxx Belgium is the largest Java conference in Europe. This year, it was already the 19th edition. As always, Devoxx is being held in the fantastic theatres of Kinepolis Antwerp. The past two editions were cancelled due to COVID-19. As a result, there was a rush on the tickets. The first batch of tickets was sold out in 5 minutes, the second batch in a few seconds. Reactions on Twitter mentioned that it looked like a ticket sale for Beyonce.

Create Realistic Lighting With DDGI

Featured Imgs 23

Why We Need DDGI

Of all the things that make a 3D game immersive, global illumination effects (including reflections, refractions, and shadows) are undoubtedly the jewel in the crown. Simply put, bad lighting can ruin an otherwise great game experience.

A technique for creating real-life lighting is known as dynamic diffuse global illumination (DDGI for short). This technique delivers real-time rendering for games, decorating game scenes with delicate and appealing visuals. In other words, DDGI brings out every color in a scene by dynamically changing the lighting, realizing the distinct relationship between objects and scene temperature, as well as enriching levels of representation for information in a scene.

List in C#: Implementation and Features

Featured Imgs 23

List is one of the most used collections in C#. Let's inspect the features of List and look at how some of its parts are implemented.

This article is about List<T> from the System.Collections.Generic namespace. More specifically, the article describes the internal implementation and some features of List<T>. This is the most used collection in C#, and it's not just my opinion — Andrew Troelsen, Philip Japikse, and Jon Skeet wrote the same in their books. And that's understandable: List<T> is easy to work with. It's quite flexible and thus covers most of the daily tasks for developers. It also has a large number of helpful methods. The collection's abilities are expanded even further with the help of LINQ.

User Funnels Are Vital to API Customer Experience

Featured Imgs 23

Happy Customer + Customer Loyalty = Brand Advocate

If you’re looking for ways to improve customer satisfaction, experience, and loyalty, you need to focus on how customers are using and adopting your product. For this, you’ll need to focus on your user funnel, sometimes referred to as a conversion funnel. In this article, we’ll show you seven ways that user funnels can improve some key areas of your business to boost all of the above!

User funnels are the defined path that your customers take as they interact with your product or service. This may track steps from when they first discover your product, sign up for it, and begin using specific features. By understanding and optimizing the user funnel, you can make targeted improvements to boost your customer satisfaction and loyalty. Here are seven ways that user funnels can help you do just that: