DEV Community

Cover image for Fixing Rounded Borders for Blog Previews: A Journey Through CSS and HTML
madhur Saluja
madhur Saluja

Posted on

Fixing Rounded Borders for Blog Previews: A Journey Through CSS and HTML

Issue #110: Round the Left Border of Blog Previews

Pull Request #123

First off, a quick apology for the delay in getting this blog post out! This little task of rounding off a few borders took me on a grand tour through the codebase of OpenElements’ website. What started as a “simple” visual tweak quickly turned into a full-blown exploration. But hey, no challenge left unrounded, right?

The Issue: Smooth and Rounded, All the Way Around

Here’s the scoop: the blog previews on OpenElements are supposed to look neat and consistent, with rounded borders on all sides. But there was a hitch—the left border was stubbornly squared off! It may sound like a tiny detail, but design is all about the little things. So I rolled up my sleeves and dived in.

The Journey: CSS, HTML, and the Quest for the Perfect Border

To start, I combed through the style.css file where most of the site’s styling lives. Since this wasn’t my usual haunt, I had to carefully review each class, container, and style that could possibly impact the blog previews’ borders. Think of it as a game of hide-and-seek, but with almost 5000 lines of code!

The main challenge? Figuring out exactly where the left border styling was controlled. This meant cross-referencing and analyzing not only the CSS but also the HTML files like list.html and single.html that handled blog layouts. It was a code detective’s dream—or maybe nightmare—situation.

The Solution: A Border Makeover

After some back-and-forth, I pinpointed the right container and style that needed tweaking. It was just a small change in style.css, but it made all the difference, ensuring the left border would finally match its rounded friends on the right.

Testing the Waters

With the change in place, I hit refresh on every blog preview I could find to confirm everything was working as it should. Sure enough, the borders were finally rounded on all sides, giving the blog previews a smoother, more polished look. Mission accomplished!

Lessons Learned

The big takeaway here? Even minor design adjustments can take you through a deep dive of a codebase, especially when it’s someone else’s project! This pull request gave me a chance to untangle and understand OpenElements’ styling setup, one line at a time. It’s all about getting the details just right, even if it takes a little extra time.

Check out the full Pull Request here to see the updates in action!

Top comments (0)