Component styles

← 开发理念

文章目前提供英语和俄语版本。以下显示英语版本。

Keep presentation local

Use component-local styles and existing design tokens. CSS Modules prevent accidental selector coupling, but do not define an architectural owner. A domain interface keeps its styles with its domain.

Avoid broad global overrides for a local feature. Responsive behavior belongs to the component that owns the layout. Verify long content, code blocks and narrow screens rather than only a desktop screenshot.

Extract shared styling when it represents an actual reusable visual contract. Do not create a universal style utility for a single element.