미디어위키:Common.css: 두 판 사이의 차이
둘러보기로 이동
검색으로 이동
편집 요약 없음 |
편집 요약 없음 |
||
| 292번째 줄: | 292번째 줄: | ||
} | } | ||
/* =============================== | /* ========================================= | ||
레거시 Vector: TOC | 레거시 Vector: TOC / 인포박스 상단 라인 정렬 | ||
=============================== */ | ========================================= */ | ||
/* | /* TOC 기본 위쪽 여백 제거 */ | ||
body.skin-vector:not(.skin-vector-2022) #toc.toc { | body.skin-vector:not(.skin-vector-2022) #toc.toc { | ||
margin-top: 0; /* 핵심 */ | |||
padding-top: 0; | |||
margin: | |||
} | } | ||
/* | /* TOC 제목 영역(toctitle)도 위 여백 제거 */ | ||
body.skin-vector:not(.skin-vector-2022) . | body.skin-vector:not(.skin-vector-2022) #toc.toc > .toctitle { | ||
body.skin-vector:not(.skin-vector-2022) | margin-top: 0; | ||
padding-top: 0; | |||
margin- | } | ||
/* TOC 제목(h2)의 기본 margin 제거 */ | |||
body.skin-vector:not(.skin-vector-2022) #toc.toc > .toctitle h2 { | |||
margin-top: 0; | |||
} | } | ||
/* | /* 인포박스 상단 기준선 통일 */ | ||
body.skin-vector:not(.skin-vector-2022) . | body.skin-vector:not(.skin-vector-2022) table.wikitable[style*="float:right"] { | ||
margin-top: 0; /* TOC와 정확히 같은 시작점 */ | |||
} | } | ||
2026년 1월 14일 (수) 06:02 판
/* 이 CSS 설정은 모든 스킨에 적용됩니다 */
/* ===============================
Google Fonts: Inter
=============================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
/* 본문 */
.mw-parser-output {
font-family: 'Inter', -apple-system, BlinkMacSystemFont,
'Apple SD Gothic Neo', 'Noto Sans KR',
system-ui, sans-serif;
}
/* 문서 제목 + 섹션 제목 */
#firstHeading,
.mw-parser-output h2,
.mw-parser-output h3,
.mw-parser-output h4 {
font-family: 'Inter', -apple-system, BlinkMacSystemFont,
'Apple SD Gothic Neo', 'Noto Sans KR',
system-ui, sans-serif;
}
/* ===============================
Heading 번호 매기기 (h2 ~ h4)
1.
1.1
1.1.1
=============================== */
/* h2 기준 카운터 초기화 */
.mw-parser-output {
counter-reset: h2;
}
/* ---------- h2 ---------- */
.mw-parser-output h2 {
counter-reset: h3;
font-size: 27px;
font-weight: 500;
}
.mw-parser-output h2 .mw-headline::before {
counter-increment: h2;
content: counter(h2) ". ";
margin-right: 2px;
font-size: 27px;
font-weight: 500;
}
/* ---------- h3 ---------- */
.mw-parser-output h3 {
counter-reset: h4;
font-size: 24px;
font-weight: 500;
}
.mw-parser-output h3 .mw-headline::before {
counter-increment: h3;
content: counter(h2) "." counter(h3) " ";
margin-right: 2px;
font-size: 24px;
font-weight: 500;
}
/* ---------- h4 ---------- */
.mw-parser-output h4 {
font-size: 24px;
font-weight: 500;
}
.mw-parser-output h4 .mw-headline::before {
counter-increment: h4;
content: counter(h2) "." counter(h3) "." counter(h4) " ";
margin-right: 2px;
font-size: 24px;
font-weight: 500;
}
/* ===============================
Heading 하단 구분선 (h2 ~ h4 통일)
=============================== */
.mw-parser-output h2,
.mw-parser-output h3,
.mw-parser-output h4 {
border-bottom: 1px solid #ccc;
padding-bottom: 6px;
margin-bottom: 16px;
}
/* ===============================
Heading 제목 ↔ 편집 링크 양끝 정렬
(h2, h3 공통)
=============================== */
.mw-parser-output h2,
.mw-parser-output h3,
.mw-parser-output h4 {
display: flex;
align-items: center;
justify-content: space-between;
}
/* 제목 텍스트는 왼쪽 고정 */
.mw-parser-output .mw-headline {
flex: 1 1 auto;
}
/* [편집 | 원본 편집]은 오른쪽 */
.mw-parser-output .mw-editsection {
flex: 0 0 auto;
font-size: 12px;
white-space: nowrap;
}
/* 편집 링크가 없을 때(편집 모드 등) 제목이 벌어지지 않게 */
.mw-parser-output h2:not(:has(.mw-editsection)),
.mw-parser-output h3:not(:has(.mw-editsection)),
.mw-parser-output h4:not(:has(.mw-editsection)) {
justify-content: flex-start;
}
/* ===============================
TOC(목차)에도 제목 번호 표시
Vector 2022(.vector-toc) + 구 TOC(#toc) 모두 지원
=============================== */
/* ---- Vector 2022 TOC ---- */
.vector-toc {
counter-reset: toc1;
}
.vector-toc .vector-toc-level-1 {
counter-reset: toc2;
}
.vector-toc .vector-toc-level-2 {
counter-reset: toc3;
}
/* 1단계 */
.vector-toc .vector-toc-level-1 > a .vector-toc-text::before {
counter-increment: toc1;
content: counter(toc1) ". ";
margin-right: 2px;
}
/* 2단계 */
.vector-toc .vector-toc-level-2 > a .vector-toc-text::before {
counter-increment: toc2;
content: counter(toc1) "." counter(toc2) " ";
margin-right: 2px;
}
/* 3단계(필요 시) */
.vector-toc .vector-toc-level-3 > a .vector-toc-text::before {
counter-increment: toc3;
content: counter(toc1) "." counter(toc2) "." counter(toc3) " ";
margin-right: 2px;
}
/* ---- 구형 TOC(#toc) ---- */
#toc,
.toc {
counter-reset: toc1;
}
#toc .toclevel-1,
.toc .toclevel-1 {
counter-reset: toc2;
}
#toc .toclevel-2,
.toc .toclevel-2 {
counter-reset: toc3;
}
/* 1단계 */
#toc .toclevel-1 > a .toctext::before,
.toc .toclevel-1 > a .toctext::before {
counter-increment: toc1;
content: counter(toc1) ". ";
margin-right: 2px;
}
/* 2단계 */
#toc .toclevel-2 > a .toctext::before,
.toc .toclevel-2 > a .toctext::before {
counter-increment: toc2;
content: counter(toc1) "." counter(toc2) " ";
margin-right: 2px;
}
/* 3단계(필요 시) */
#toc .toclevel-3 > a .toctext::before,
.toc .toclevel-3 > a .toctext::before {
counter-increment: toc3;
content: counter(toc1) "." counter(toc2) "." counter(toc3) " ";
margin-right: 2px;
}
/* =========================================================
Vector 2022 사이드 TOC 번호 (h2~h4와 동일)
- 1 / 1.1 / 1.1.1 규칙
- '처음 위치(Top)' 항목 제외
- 중복 숫자(기본 tocnumber) 숨김
========================================================= */
/* 0) 혹시 구형 TOC 숫자가 같이 보이면(중복 방지) */
#toc .tocnumber,
.toc .tocnumber {
display: none;
}
/* 1) Vector 2022 TOC: Top(처음 위치) 항목은 숨김 (가장 안정적) */
.vector-toc a[href="#top"],
.vector-toc a[href="#mw-head"],
.vector-toc a[href^="#mw-head"],
.vector-toc a[rel="mw:PageProp/TOC"] {
display: none !important;
}
/* 2) 카운터 초기화: TOC 전체에서 1단계(h2) 번호를 카운트 */
.vector-toc {
counter-reset: toc2;
}
/* 3) TOC 레벨별 카운터 리셋 */
.vector-toc .vector-toc-level-1 { /* == (h2) */
counter-reset: toc3;
}
.vector-toc .vector-toc-level-2 { /* === (h3) */
counter-reset: toc4;
}
/* 4) 레벨1: 1. (h2) */
.vector-toc .vector-toc-level-1 > a .vector-toc-text::before {
counter-increment: toc2;
content: counter(toc2) ". ";
margin-right: 2px;
font-weight: 600;
}
/* 5) 레벨2: 1.1 (h3) */
.vector-toc .vector-toc-level-2 > a .vector-toc-text::before {
counter-increment: toc3;
content: counter(toc2) "." counter(toc3) " ";
margin-right: 2px;
font-weight: 500;
}
/* 6) 레벨3: 1.1.1 (h4) */
.vector-toc .vector-toc-level-3 > a .vector-toc-text::before {
counter-increment: toc4;
content: counter(toc2) "." counter(toc3) "." counter(toc4) " ";
margin-right: 2px;
font-weight: 400;
}
/* 최상위(=h2 레벨)에서 첫 항목(처음 위치)만 숨김 */
.vector-toc li.vector-toc-level-1:first-child {
display: none !important;
}
/* ===============================
[편집 | 원본편집] → [편집]
=============================== */
/* '원본 편집' 링크 숨김 */
.mw-editsection a:last-of-type {
display: none;
}
/* 구분자(|) 숨김 */
.mw-editsection .mw-editsection-divider {
display: none;
}
/* 스크롤 시 나타나는 Sticky header의 제목(문서명) 폰트를 Inter로 고정 */
.vector-sticky-header-context-bar-primary,
.vector-sticky-header-context-bar-primary a,
.vector-sticky-header-context-bar-primary span {
font-family: 'Inter', -apple-system, BlinkMacSystemFont,
'Apple SD Gothic Neo', 'Noto Sans KR',
system-ui, sans-serif !important;
}
/* =========================================
레거시 Vector: TOC / 인포박스 상단 라인 정렬
========================================= */
/* TOC 기본 위쪽 여백 제거 */
body.skin-vector:not(.skin-vector-2022) #toc.toc {
margin-top: 0; /* 핵심 */
padding-top: 0;
}
/* TOC 제목 영역(toctitle)도 위 여백 제거 */
body.skin-vector:not(.skin-vector-2022) #toc.toc > .toctitle {
margin-top: 0;
padding-top: 0;
}
/* TOC 제목(h2)의 기본 margin 제거 */
body.skin-vector:not(.skin-vector-2022) #toc.toc > .toctitle h2 {
margin-top: 0;
}
/* 인포박스 상단 기준선 통일 */
body.skin-vector:not(.skin-vector-2022) table.wikitable[style*="float:right"] {
margin-top: 0; /* TOC와 정확히 같은 시작점 */
}
span.toctogglespan{display: none}
h2#mw-toc-heading{margin: 4px 0px 8px 0px}