Files
Aislo/B07_DesignDetail/openwebcad/src/App.css
T
eomsangdonandClaude Opus 5.5 5d28a22832 fix(557-1): B07 · CAD 작은 흠 셋 — 토적도 설정 창 제목 말줄임 · 주석 리본 문자 스타일 칸 겹침 · 넘침 메뉴 왼쪽 판 뒤 가림
- ⚙ 설정 모달 폭 360 → 400 — 「토적도(유토곡선) 설정」 제목 148px 이 124px 칸에 잘리던 것 다 보임(B07 설정 모달만 · 공용 모달 머리 꼴 그대로)
- 주석 › 문자 스타일 칸 다섯 = 다섯 줄(102px)이 리본 높이 66 넘어 묶음 이름과 겹침 → 세 줄(글꼴 / 크기 · 색상 / 굵게 · 기울임) · 묶음 폭 · 다른 묶음 자리 그대로
- 리본(position: fixed)이 쌓임 맥락이라 넘침 메뉴 z 20 이 왼쪽 판(z 3) 밑 → 메뉴 연 동안 리본 z 10
- 지킴 시험 test_557_1_b07_cad_fixes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 10:31:39 +09:00

403 lines
9.7 KiB
CSS

@import "tailwindcss";
/* 색 토큰의 정의처는 앱과 같은 파일 하나 — 여기서 색을 새로 정하지 않는다. */
@import "../../../ui_template/ui_template_theme.css";
:root {
/* 제목줄 없음(요구 280-6) — 칸들이 이 변수로 자리 잡아 0 으로 둠 */
--cad-title-height: 0px;
/* 116px 에서는 리본 줄의 내용(85px)이 보이는 높이(81px)를 넘어 세로 스크롤바가
생겼다(2026-09-04 실측) — 모자란 4px + 여유 2px 를 더한다. */
--cad-ribbon-height: 122px;
/* 명령행 높이 — 상태막대의 [명령행] 토글이 0px로 바꾼다 */
--cad-command-height: 86px;
--cad-status-height: 28px;
/* 도면층 한 행에 아이콘 6개와 이름이 함께 들어가는 폭. 248px에서는 이름 몫이
21px밖에 남지 않아 글자가 뭉개졌다(2026-09-01 실측). */
--cad-panel-width: 300px;
font-family: var(--font-body);
color: var(--color-text-body);
background: var(--color-bg);
/* CAD 표면 단계 — 앱 토큰을 CAD 골격(툴바·리본·패널)에 이름만 붙여 쓴다. */
--cad-chrome: var(--color-surface);
--cad-chrome-raised: var(--color-surface-raised);
--cad-chrome-sunken: var(--color-bg);
--cad-line: var(--color-border);
--cad-text: var(--color-text-body);
--cad-text-dim: var(--color-text-secondary);
--cad-text-muted: var(--color-text-muted);
--cad-accent: var(--color-accent);
/* 마우스 바탕 = 부품 상자와 같은 값 · 켜짐 바탕은 --color-accent-soft */
--cad-hover: var(--color-hover);
--cad-canvas: var(--draw-canvas);
}
* {
box-sizing: border-box;
}
html,
body,
#root {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
}
button,
input {
font: inherit;
}
button {
color: inherit;
}
.cad-app {
position: fixed;
inset: 0;
z-index: 2;
pointer-events: none;
}
.cad-bare {
--cad-status-height: 0px;
}
.controls {
pointer-events: auto;
}
body > canvas[data-id="canvas"] {
position: fixed;
z-index: 1;
top: calc(var(--cad-title-height) + var(--cad-ribbon-height));
right: 0;
bottom: calc(var(--cad-command-height) + var(--cad-status-height));
left: var(--cad-panel-width);
width: calc(100vw - var(--cad-panel-width));
height: calc(
100dvh -
var(--cad-title-height) -
var(--cad-ribbon-height) -
var(--cad-command-height) -
var(--cad-status-height)
);
background: var(--cad-canvas);
cursor: none;
}
.cad-ribbon {
position: fixed;
top: var(--cad-title-height);
right: 0;
left: 0;
height: var(--cad-ribbon-height);
display: flex;
flex-direction: column;
background: var(--cad-chrome-raised);
border-bottom: 1px solid var(--cad-line);
transition: height 120ms ease;
}
/* 접힘 모드에서 탭으로 잠깐 펼침 — 도면 자리는 그대로 두고 위에 겹쳐 뜸(122px = 펼친 리본 높이) */
.cad-ribbon[data-peek="true"] {
z-index: 10;
height: 122px;
box-shadow: var(--shadow-lg);
}
.cad-ribbon-tabs {
display: flex;
gap: 2px;
height: 26px;
padding: 0 8px;
border-bottom: 1px solid var(--color-smoke);
}
.cad-ribbon-tabs__slot {
flex: 1;
min-width: 0;
}
/* 접기 단추 = 아이콘 단추 부품(단 20) · 여기는 자리만 */
.cad-ribbon-tabs__collapse {
align-self: center;
}
/* 리본 탭 = CAD 고유 꼴 그대로(토큰만) */
.cad-ribbon-tabs > button:not(.ui-icon-btn) {
padding: 0 14px;
border: 1px solid transparent;
border-bottom: 0;
border-radius: 4px 4px 0 0;
background: transparent;
color: var(--cad-text-dim);
font-size: 12px;
}
.cad-ribbon-tabs > button:not(.ui-icon-btn):hover {
background: var(--cad-hover);
}
.cad-ribbon-tabs > button[data-active="true"] {
background: var(--cad-chrome);
border-color: var(--cad-line);
color: var(--color-text);
}
.cad-ribbon-panels {
display: flex;
flex: 1;
align-items: stretch;
padding: 4px 8px 2px;
overflow-x: auto;
overflow-y: visible;
}
.cad-ribbon-group {
position: relative;
display: flex;
flex-direction: column;
min-width: max-content;
padding: 0 9px;
border-right: 1px solid var(--cad-line);
}
.cad-ribbon-tools {
display: flex;
gap: 3px;
align-items: flex-start;
height: 66px;
}
.cad-ribbon-tools__grid {
display: grid;
grid-template-rows: 1fr 1fr;
grid-auto-flow: column;
gap: 1px;
}
.cad-ribbon-group__label {
margin-top: auto;
padding: 0;
border: 0;
background: transparent;
color: var(--cad-text-muted);
font-size: 10px;
text-align: center;
}
.cad-ribbon-group__label[data-expandable="true"] {
cursor: pointer;
}
.cad-ribbon-group__label[data-expandable="true"]:hover {
color: var(--cad-accent);
}
/* 꼴 = 메뉴 부품(`ui-ctx-menu`) · 여기는 자리만 */
.cad-ribbon-overflow {
/* 리본 패널 줄이 가로 스크롤 상자라 그 안에서는 잘린다 — 화면 좌표로 띄운다 */
position: fixed;
z-index: 20;
min-width: 170px;
max-height: 72vh;
}
/* 리본(position: fixed)이 쌓임 맥락이라 메뉴 z 가 그 안에 갇힘 — 메뉴 연 동안 리본을 왼쪽 판(3) 위로(557-1) */
.cad-ribbon:has(.cad-ribbon-overflow) {
z-index: 10;
}
.cad-ribbon-overflow > .ui-ctx-menu__item {
display: flex;
gap: 8px;
align-items: center;
}
/* ↶ ↷ = 아이콘 단추 부품(단 20) · 여기는 자리만 */
.cad-quick-access {
display: flex;
gap: 2px;
align-self: center;
}
.cad-ribbon-props {
display: flex;
flex-direction: column;
gap: 3px;
align-items: stretch;
justify-content: flex-start;
}
/* 한 줄에 칸 둘(557-1 · 문자 스타일) — 뒤 칸 라벨은 글 폭만 */
.cad-prop-row {
display: flex;
gap: 8px;
align-items: center;
}
.cad-prop-row > .cad-prop + .cad-prop > span {
width: auto;
}
/* 위젯 패널은 한 줄에 라벨+입력을 놓고 세로로 쌓는다 (리본 높이 안에 들어가야 한다) */
.cad-prop {
display: flex;
flex-direction: row;
gap: 6px;
align-items: center;
font-size: 10px;
color: var(--cad-text-muted);
}
.cad-prop > span {
width: 52px;
text-align: left;
}
/* 리본 안 칸 = CAD 고유 꼴(토큰만) · 높이 = 크기 단 18 · 둥글기 4 */
.cad-prop select,
.cad-prop input[type="number"] {
height: 18px;
min-width: 78px;
padding: 0 3px;
color: var(--cad-text);
background: var(--cad-chrome-sunken);
border: 1px solid var(--cad-line);
border-radius: 4px;
font-size: 11px;
}
.cad-prop input[type="number"] {
min-width: 52px;
width: 52px;
}
.cad-prop input[type="color"] {
height: 18px;
width: 44px;
padding: 1px;
background: var(--cad-chrome-sunken);
/* 흰색을 골라도 스와치 자리가 보이게 테두리를 진하게 준다 (2026-09-01) */
border: 1px solid var(--cad-text-muted);
border-radius: 4px;
cursor: pointer;
}
/* 고른 것들 색이 다름(488) — 빈 견본(투명 · 점선 테두리) */
input[type="color"][data-mixed="true"]::-webkit-color-swatch { background: transparent !important; border: 1px dashed var(--cad-text-muted); }
/* 위젯 패널 안의 작은 명령 버튼은 한 줄 높이에 맞춘다 */
.cad-ribbon-props .cad-tool[data-size="small"] {
height: 22px;
min-width: 0;
}
.cad-tool {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 2px;
min-width: 48px;
padding: 3px 6px;
border: 1px solid transparent;
border-radius: 3px;
background: transparent;
font-size: 10px;
white-space: nowrap;
}
.cad-tool[data-size="big"] {
min-width: 58px;
height: 66px;
}
.cad-tool[data-size="big"] .cad-tool__glyph {
height: 32px;
font-size: 26px;
line-height: 32px;
}
.cad-tool[data-size="small"] {
flex-direction: row;
justify-content: flex-start;
gap: 4px;
min-width: 78px;
height: 32px;
padding: 0 5px;
}
.cad-tool[data-size="small"] .cad-tool__glyph {
height: auto;
font-size: 15px;
line-height: 1;
}
/* 켜짐 = 테두리 + 바탕 + 밑줄 · 스침 = 바탕만(마우스 기기만) — 켜진 단추가 늘 하나로 보이게(487) */
@media (hover: hover) {
.cad-tool:hover:not(:disabled) {
background: var(--cad-hover);
}
}
.cad-tool[data-active="true"] {
border-color: var(--cad-accent);
background: var(--color-accent-soft);
box-shadow: inset 0 -2px var(--cad-accent);
}
.cad-tool:disabled {
color: var(--color-smoke);
cursor: not-allowed;
}
.cad-tool__glyph {
height: 27px;
color: var(--cad-accent);
font-size: 22px;
line-height: 27px;
}
.cad-tool:disabled .cad-tool__glyph {
color: var(--color-smoke);
}
.cad-inspector {
position: fixed;
z-index: 3;
top: calc(var(--cad-title-height) + var(--cad-ribbon-height));
/* 좌측 팔레트가 상위 — 명령행 토글에 높이가 흔들리지 않게 상태막대까지 내린다 */
bottom: var(--cad-status-height);
left: 0;
width: var(--cad-panel-width);
background: var(--cad-chrome);
border-right: 1px solid var(--cad-line);
transition: width 120ms ease;
}
.cad-inspector[data-collapsed="true"] {
width: 0;
}
.cad-inspector__collapse {
position: absolute;
z-index: 4;
top: 10px;
left: 100%;
width: 20px;
height: 38px;
border: 1px solid var(--cad-line);
border-left: 0;
border-radius: 0 4px 4px 0;
background: var(--cad-chrome-raised);
color: var(--cad-text-dim);
}
/* 꼴 = 탭 부품(`ui-tabs`) · 여기는 칸 둘이 폭을 나누는 배치만 */
.cad-inspector-tabs {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0;
}
.cad-inspector-tabs > .ui-tabs__tab {
justify-content: center;
}
.cad-properties {
padding: 14px 12px;
}
.cad-properties h2 {
margin: 0 0 14px;
color: var(--color-text);
font-size: 13px;
font-weight: 600;
}
.cad-properties dl {
margin: 0;
border-top: 1px solid var(--cad-line);
}
.cad-properties dl div {
display: grid;
grid-template-columns: 92px 1fr;
padding: 8px 0;
border-bottom: 1px solid var(--cad-line);
font-size: 11px;
}
.cad-properties dt {
color: var(--cad-text-dim);
}
.cad-properties dd {
margin: 0;
overflow: hidden;
color: var(--cad-text);
text-overflow: ellipsis;
}
.cad-layer-manager {
max-height: calc(100dvh - 250px);
padding: 9px;
overflow-y: auto;
overflow-x: hidden;
}
.cad-layer-manager button {
min-height: 36px;
padding-top: 6px;
padding-bottom: 6px;
}