docs(styles): explain canvas and workspace layout and interaction states
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
/* EditableTitle 的只读标题/输入框切换样式;壳体作为错误提示的定位参照,网络和提交状态由组件控制。 */
|
||||
/* 相对定位保留标题所在行,绝对定位错误框不会把工具栏向下撑开。 */
|
||||
.shell { position: relative; display: flex; align-items: center; }
|
||||
/* 两种状态共用高度、字体和透明边框,降低进入编辑时的尺寸跳变。 */
|
||||
.title, .input { box-sizing: border-box; min-width: 0; max-width: 100%; height: 32px; padding: 0 6px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: inherit; font: inherit; line-height: 30px; }
|
||||
/* 非编辑标题单行省略;悬停仅作用于可用按钮,选中态由 data-selected 控制。 */
|
||||
.title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: left; }
|
||||
.title:hover:not(:disabled) { background: #f0ece6; }
|
||||
.title[data-selected="true"] { background: #ede5dc; border-color: #d3c0b2; }
|
||||
.title:disabled { cursor: default; }
|
||||
/* 编辑态给定目标宽度但受上方 max-width 限制,readonly 时降低透明度。 */
|
||||
.input { width: 220px; border-color: #a47764; background: white; outline: none; }
|
||||
.input[readonly] { opacity: 0.65; }
|
||||
/* 错误框显示在标题下方,并以视口宽度限制最大宽度;长说明允许换行。 */
|
||||
.error { position: absolute; top: calc(100% + 10px); left: 0; width: 260px; max-width: calc(100vw - 40px); padding: 8px 10px; border: 1px solid #e5c7b8; border-radius: 7px; background: #fff9f3; color: #a25439; font-size: 12px; line-height: 1.6; white-space: normal; box-shadow: 0 4px 12px #32251a0a; }
|
||||
|
||||
Reference in New Issue
Block a user