A Practical Guide To Naming Things

2026年10月6日

AI 摘要 AI 生成,可能有误

本文是一份精选的设计与开发命名实用指南,汇集了为 HTML 类名、颜色、图层、设计令牌、UI 组件、功能、变量和产品命名的资源与最佳实践。文中重点介绍了 Classnames、Component Gallery、Intuit 的设计令牌分类体系、英国沃达丰(Vodafone UK)的变量分类图谱,以及 Onym 等工具。其核心观点是:好的名称应当简短、有意义、能被团队和用户广泛理解,并植根于用户自己的语言,从而减少困惑并改善协作。

Naming is hard. The language we use shapes the way we think about things, but also the conversation we have about it. That’s why we have so much confusion about colors, icons, UI components, features — and that’s why we struggle to name design tokens, HTML classes, and variables.

Sometimes, the names we choose are too generic, so it’s difficult to understand what exactly is meant. And sometimes they are too specific, leaving little room for flexibility and reuse. How do we choose the right names? And which naming conventions work best? Let’s take a closer look.

How To Name Things

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 Smashing Magazine

Building A Personal Cross-Browser Testing Checklist From Hard-Won Mistakes

AI 摘要The article explains how to build an effective cross-browser testing checklist from real production bugs rather than generic categories, illustrating with concrete examples how features like date parsing, 100vh/100vw viewport units, Chrome's device mode, user-agent detection, third-party cookies, and performance metrics behave inconsistently across Chrome, Edge, Firefox, and Safari on desktop and real mobile devices. It argues that useful checklist entries specify a browser/device, a condition, and an observable result, and that teams should add new entries each time a cross-browser bug escapes to production. Finally, it shows how to automate each check through CI jobs, visual regression testing, lint rules, and testing on real devices.

A Little Magic In December’s Hustle (2026 Wallpapers Edition)

AI 摘要As part of a monthly tradition running for more than 15 years, this post presents a collection of December 2026 desktop wallpapers created by artists and designers from around the world, available in a wide range of screen resolutions and in versions with or without a calendar. The wallpapers cover festive and wintry themes such as gingerbread houses, snowy walks, and Christmas traditions, with each artist given full creative freedom over their design. The post invites readers to contribute their own creations for future editions.

Meet AI 2027 Conference (Dec 1)

AI 摘要SmashingConf is hosting AI 2027, a live online half-day conference on December 1, 2026, focused on how AI can improve workflows for UX designers, front-end engineers, and design system teams, without the hype. The event features practical sessions from experts including Vitaly Friedman, Anna Arteeva, Christine Vallaure, TJ Pitre, Brad Frost, and Luke Murphy, covering topics like designing AI experiences, prototyping AI functionality, Figma MCPs, AI-ready design systems, and documentation for coding agents, followed by moderated breakout rooms. Tickets cost $55 for individuals and $44 per person for teams of four or more.

AI Sped Up The Build: How Can Accessibility Testing Keep Up?

AI 摘要The article, drawing on Level Access's 2026 State of Digital Accessibility Report, argues that AI has dramatically accelerated planning, design, and development in the software lifecycle while accessibility testing has lagged behind, creating a two-speed workflow. Survey data shows that AI adoption alone isn't the differentiator—organizations with mature accessibility practices (training, culture, communication) benefit most, using AI as an amplifier rather than a solution. The author recommends embedding human judgment at three checkpoints—finding issues early (via design handoffs, CI/CD gates, and assigned ownership), fixing issues while context is fresh, and documenting evidence—integrated into existing workflows so accessibility keeps pace with AI-driven development speed.

Should You Actually Add AI To That? A Four-Question Audit For Product Teams

AI 摘要The article proposes a four-question audit that helps product teams decide whether an AI feature earns its place by weighing what it returns users (removed effort, caught errors, consistency) against the attention and identity costs it imposes, framed as a 'break-even line.' The four questions ask whether the feature reduces total task effort for a specific user segment, whether it beats the user's current method, whether users can realistically catch errors, and whether users will retain the judgment to detect AI mistakes after a year of use. Each question yields a concrete design condition, such as scoping features to the users they serve, adding provenance displays for low-visibility high-consequence errors, and building verification mechanisms like blind review into workflows.