fix(cupang): 3열에서 ③ 카드 자체를 스크롤러로

카드 높이는 grid 행(1fr)으로 화면에 맞춰져 있으므로 카드에 overflow-y:auto
를 걸면 안쪽 구조와 무관하게 스크롤된다. 목록은 자연 높이로 두고 헤더는
sticky. JS 높이 계산 대상에서 ③ 제외(①② 만 유지).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-01 17:50:06 +09:00
parent 2608fd7f23
commit e49abc4b8c
7 changed files with 37 additions and 10 deletions
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260902a" />{% endblock %} {% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260902b" />{% endblock %}
{% block content %} {% block content %}
<section class="cpg"> <section class="cpg">
@@ -1067,16 +1067,16 @@
} }
// ── 스크롤 영역 높이 ────────────────────────────── // ── 스크롤 영역 높이 ──────────────────────────────
// 넓은 화면(3열): 카드 안쪽에서만 스크롤 → 카드 아래끝까지를 높이로 준다. // ①② 만 대상. ③ 센터 분배는 카드 자체가 스크롤러다(CSS).
// 은 화면(2열/1열): 카드가 세로로 쌓이므로 높이를 풀고 페이지가 스크롤. // 은 화면(3열): 카드 아래끝까지를 높이로 준다.
// 좁은 화면(2열/1열): 높이를 풀고 페이지가 스크롤.
var FRAME_MIN_WIDTH = 1501; var FRAME_MIN_WIDTH = 1501;
function fitScrollAreas() { function fitScrollAreas() {
var wide = window.innerWidth >= FRAME_MIN_WIDTH; var wide = window.innerWidth >= FRAME_MIN_WIDTH;
var panes = [ var panes = [
[".cpg-calc-card .erp-table-wrap", document.querySelector(".cpg-calc-card .erp-table-wrap")], [".cpg-calc-card .erp-table-wrap", document.querySelector(".cpg-calc-card .erp-table-wrap")],
[".cpg-sum-scroll", document.querySelector(".cpg-calc-sum .cpg-sum-scroll")], [".cpg-sum-scroll", document.querySelector(".cpg-calc-sum .cpg-sum-scroll")]
["#cpg-dist-list", distList]
]; ];
panes.forEach(function (pair) { panes.forEach(function (pair) {
var el = pair[1]; var el = pair[1];
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260902a" />{% endblock %} {% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260902b" />{% endblock %}
{% block content %} {% block content %}
<section class="cpg"> <section class="cpg">
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260902a" />{% endblock %} {% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260902b" />{% endblock %}
{% block content %} {% block content %}
<section class="cpg"> <section class="cpg">
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260902a" />{% endblock %} {% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260902b" />{% endblock %}
{% block content %} {% block content %}
<section class="cpg"> <section class="cpg">
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260902a" />{% endblock %} {% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260902b" />{% endblock %}
{% block content %} {% block content %}
<section class="cpg"> <section class="cpg">
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260902a" />{% endblock %} {% block head_extra %}<link rel="stylesheet" href="/static/cupang.css?v=20260902b" />{% endblock %}
{% block content %} {% block content %}
{# 출고 묶음 보기 — 상자 계산 화면과 같은 3열 구성. 읽기 전용(수정 없음). #} {# 출고 묶음 보기 — 상자 계산 화면과 같은 3열 구성. 읽기 전용(수정 없음). #}
+27
View File
@@ -1512,3 +1512,30 @@ body.cpg-dragging { cursor: grabbing; user-select: none; }
overflow: visible; overflow: visible;
} }
} }
/* ── 넓은 화면(3열): ③ 카드 자체가 스크롤러 ──
카드 높이는 그리드 행(1fr)로 화면에 맞춰져 있으므로, 카드에 스크롤을 걸면
안쪽 구조와 무관하게 항상 스크롤된다. 헤더는 위에 고정. */
@media (min-width: 1501px) {
.cpg-calc3 > .cpg-dist-card {
overflow-y: auto !important;
overflow-x: hidden !important;
scrollbar-gutter: stable;
}
.cpg-dist-card .cpg-card-head {
position: sticky; top: 0; z-index: 3;
background: var(--color-canvas-white);
padding-bottom: 8px;
}
/* 안쪽 목록은 자연 높이 — 스크롤은 카드가 담당 */
.cpg-dist-card .cpg-dist-list {
max-height: none !important;
overflow: visible !important;
flex: 0 0 auto;
}
.cpg-calc3 > .cpg-dist-card::-webkit-scrollbar { width: 10px; }
.cpg-calc3 > .cpg-dist-card::-webkit-scrollbar-thumb {
background: var(--color-subtle-ash); border-radius: 999px;
}
.cpg-calc3 > .cpg-dist-card::-webkit-scrollbar-thumb:hover { background: var(--color-midtone-gray); }
}