I got the opportunity to proofread Ahmad Shadeed’s latest article on CSS Grid Areas before its release. It inspired me to refactor the code on my site to use grid-template-areas.
Testing HTML With Modern CSS
Wow! Who knew you could use modern CSS to test HTML? Well, Heydon certainly did!
Styling Tables the Modern CSS Way - Piccalilli
This article by Michelle Barker for Piccalilli is a great read. I learned about a bunch of new CSS properties that I didn’t know existed.
Blinded By the Light DOM – Eric’s Archived Thoughts
Eric Meyer describes his journey of learning about and implementing fully-Light-DOM web components.
You just take some normal HTML markup, wrap it with a custom element, and then write some JS to add capabilities which you can then style with regular CSS! Everything’s of the Light Side of the Web. No need to pierce the Vale of Shadows or whatever.
Adactio: Journal—HTML web components
Jeremy Keith discusses what makes a custom element an HTML web component.
If your custom element is empty, it’s not an HTML web component. But if you’re using a custom element to extend existing markup, that’s an HTML web component.
React encouraged a mindset of replacement: “forgot [sic] what browsers can do; do everything in a React component instead, even if you’re reinventing the wheel.”
HTML web components encourage a mindset of augmentation instead.
You Want border-color: transparent, Not border: none – Frontend Masters Blog
In this article, Dave Rupert explains how testing in forced colors mode improves accessibility for users and reveals design flaws, such as excessive reliance on color cues.
Digging Into The Display Property: The Two Values Of Display — Smashing Magazine
In Level 3 of the Display specification, the value of
displayis defined as two keywords. These keywords define the outer value of display, which will beinlineorblockand therefore define how the element behaves in the layout alongside other elements. They also define the inner value of the element — or how the direct children of that element behave.This means that when you say
display: grid, what you are really saying isdisplay: block grid. You are asking for a block level grid container. An element that will have all of the block attributes — you can give it height and width, margin and padding, and it will stretch to fill the container. The children of that container, however, have been given the inner value ofgridso they become grid items. How those grid items behave is defined in the CSS Grid Specification: thedisplayspec gives us a way to tell the browser that this is the layout method we want to use.As simply put by Rachel:
When you define layout on a box in CSS, you are defining what happens to this box in terms of how it behaves in relation to all of the other boxes in the layout. You are also defining how the children of that box behave.
Transparent borders
In web development, small design decisions can have a significant impact on accessibility and user experience. One such decision is how we handle borders on interactive elements.
The problem with border: none
When styling interactive elements like buttons, it’s common practice to remove default borders using
border: none. However, this approach can lead to accessibility issues, especially in high contrast mode. As demonstrated in the image below, removing the border entirely can cause buttons to appear as floating text on the page, making it difficult for users with low vision to distinguish interactive elements.
Dave Rupert explains the importance of the default border and why it exists:
In the case of interactive form controls (inputs, textareas, buttons, etc.), those pesky borders were put there because they have an accessibility benefit when using High Contrast Mode, a feature used by 30.6% of low-vision users.
The transparent border solution
To address this issue, Dave recommends making the border or outline transparent instead of removing it entirely. This can be achieved with the following CSS:
button { border-color: transparent; }As demonstrated in the image below, this approach is effective for several reasons. First, sighted users will not notice the difference. Second, as Kilian Valkhof explains, in forced color mode, the border color or outline color “will be overwritten with the current text color, making it nicely visible again without needing any special adaption or re-styling for forced color mode.”

User experience benefits
Using transparent borders offers additional benefits for user experience. Consider hover effects, for example.
button { border: none; } button:hover { border: 2px solid navy; }In such situations, applying a visible border on hover can inadvertently change the element’s dimensions. This change in size can result in a jarring visual effect.
By setting a transparent border in the default state, we ensure smooth transitions and consistent element sizes across different states.
<div> <button class="no-border-btn">Button with no border</button> <button class="transparent-border-btn">Button with transparent border</button> </div>.no-border-btn { border: none; &:hover { border: 2px solid navy; } } .transparent-border-btn { border: 2px solid transparent; &:hover { border-color: navy; } }Implications for design systems
Transparent borders are also valuable in the context of themeable design systems. Brad Frost elaborates:
When supporting multiple theme, it can be common for some themes to use borders while others don’t. This flexibility is great! Each brand is able to express themselves how they see fit. But if implemented using different border widths, shifts in the box model happen.
By using
border-color: transparentfor themes without visible borders, designers and developers can maintain consistent element sizes across different variants and themes. This approach provides the flexibility to adapt the visual design while preserving the underlying structure and layout of the components.Conclusion
Implementing transparent borders in your CSS addresses crucial accessibility concerns, enhances user experience across different display modes, and provides the flexibility needed for robust, adaptable design systems.
Embrace the Platform – Bram.us
If there’s one thing you can do to make your websites better, it is to embrace what the web platform gives you: HTML, CSS, and JavaScript — in that order. Apply the Rule of Least Power. Build with progressive enhancement in mind. You’ll be a happier developer. Your visitors will be happier, too, as things work as expected.
The Case For Design Engineers, Pt. II - Jim Nielsen’s Blog
Jim Nielsen makes the case for design engineers as professionals who do design work with code. He also emphasizes the limitations of traditional design tools, which often produce static images that don’t fully capture the dynamic nature of web interactions, and advocates for designing in the browser instead.
You need someone who can do design work with code.
That’s right: design work with code.
Pixels of an interface from a GUI tool are a static representations of a dynamic form. It’s the difference between a picture of me and the living, breathing, moving me.
Design engineers don’t just push pixels around in a GUI tool, they do it in a web browser — the medium of delivery — designing not just the visuals but the interactions that make sense for a living, breathing, moving interface.
Note - Posted on
Thanks to Kevin Powell, today I learned that the
text-underline-offsetproperty is named so because it only applies to underlines and not othertext-decoration-linevalues likeoverlineandline-through.<a href="https://example.com">Example</a>a { text-decoration-line: underline overline; /* We can set multiple line-decoration properties at once */ text-underline-offset: 16px; /* Only impacts underline */ }