For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/v0.4.0/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/v0.4.0/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/v0.4.0/foundations/spacing.md.

间距

A3S UI 以 4px 为基础单位。紧密关系使用 4、6、8、12 与 16px;区域关系使用 24、32、48、64 与 96px。标题上方留白大于下方,不能靠额外卡片制造分组。

实时预览
4px微间距
8px相邻控件
12px组件内部
16px表面内边距
24px分区间距
32px页面区域

布局基准

角色默认值说明
标准控件36px按钮、字段与组合控件
紧凑控件28pxRibbon 与明确的紧凑环境
粗指针目标44px触摸与粗指针最小命中区域
顶栏56px文档与工作区标题栏
文档侧栏248px持久文档导航
阅读列752px约 65–75 个字符
文档外壳1440px最大内容宽度

手机、平板与桌面的页面内边距分别为 16px、24px 与 32–48px。900px 以下将次要检查器转为浮层;768px 以下将持久导航转为可关闭侧栏;520px 以下保留身份和关键操作,并保护底部安全区。

应用参数

变量默认值组件
--a3s-control-height2.25rem标准控件
--a3s-control-height-sm1.75rem紧凑控件
--a3s-touch-target2.75rem粗指针命中目标
--a3s-task-navigation-size15.5remApp Shell 与任务导航
--a3s-task-reading-size47.5rem任务记录与输入器
--a3s-task-inspector-size21rem任务检查器
--a3s-activity-rail-size2.875rem折叠导航轨
--a3s-workspace-header-height3.5remWorkspace Header
--a3s-toolbar-height2.6875rem独立 Toolbar 行
--a3s-toolbar-control-height1.8125remToolbar 命令
--a3s-ribbon-tabs-height2.25remRibbon 标签栏
--a3s-ribbon-panel-height4.625remRibbon 命令区
--a3s-status-height1.75remStatus Bar

优先覆盖公开变量,不要覆盖组件内部网格选择器。调整密度时保持 4px 基线,并同时验证桌面、320px 宽度、200% 缩放和粗指针环境。