미디어위키:Mobile.css: 두 판 사이의 차이

    CABAL WIKI
    편집 요약 없음
    편집 요약 없음
     
    (같은 사용자의 중간 판 6개는 보이지 않습니다)
    1번째 줄: 1번째 줄:
    /* ===================== */
    /* 📱 Timeless 모바일 최적화 패키지 */
    /* 위치: MediaWiki:Mobile.css */
    /* ===================== */
    @media screen and (max-width: 768px) {
    @media screen and (max-width: 768px) {


      /* 📌 본문 여백 최소화 */
       /* 📌 목차 스타일 정리 */
      .mw-body, .mw-body-content, .mw-parser-output {
        padding: 10px !important;
        margin: 0 !important;
      }
     
       /* 📌 목차 스타일 */
       #toc, .toc {
       #toc, .toc {
         float: none !important;
         float: none !important;
         position: relative !important;
         clear: both !important;
         display: block !important;
         display: block !important;
         clear: both !important;
         position: relative !important; /* z-index가 작동하도록 설정 */
         width: 100% !important;
         width: 100% !important;
        max-width: 100% !important;
         margin: 1.5em 0 !important;
         margin: 1em 0 !important;
         padding: 12px !important;
         padding: 12px !important;
         background: #f8f8f8 !important;
         background: #f9f9f9 !important;
         border: 1px solid #ccc !important;
         border: 1px solid #ccc !important;
        font-size: 14px !important;
         box-sizing: border-box !important;
         box-sizing: border-box !important;
         z-index: 1 !important;
         z-index: 9999 !important; /* 목차가 다른 모든 요소 위에 확실히 오도록 매우 높은 값 설정 */
       }
       }


       /* 📌 목차 아래 첫 문단 강제 띄우기 (두 가지 선택자 모두 필요) */
       /* 📌 목차 다음 요소 강제 clear 처리 및 스태킹 컨텍스트 설정 */
      /* 목차 바로 다음에 오는 모든 요소들이 목차 아래에 위치하도록 강제합니다. */
       .mw-parser-output > #toc + *,
       .mw-parser-output > #toc + *,
       .mw-parser-output > .toc + * {
       .mw-parser-output > .toc + * {
         margin-top: 1em !important;
         margin-top: 1em !important;
         clear: both !important;
         clear: both !important; /* 이전 float 요소를 확실히 정리 */
         display: block !important;
         display: block !important;
        position: relative !important; /* z-index를 위해 필요 */
        z-index: 1 !important; /* 목차보다 낮은 z-index (목차는 9999) */
       }
       }


       /* 📌 목차 안 리스트 줄바꿈 */
       /* 📌 infobox, 썸네일, 네비게이션 박스 등 콘텐츠 float 제거 및 블록화 */
      #toc li, .toc li {
       /* 모바일에서 레이아웃 겹침을 유발할 수 있는 모든 float 요소를 제거하고 블록 요소로 만듭니다. */
        line-height: 1.6em;
        word-break: break-word;
      }
     
       /* 📌 infobox, 표, 이미지, navbox 줄바꿈 */
       .infobox, table.infobox,
       .infobox, table.infobox,
       .thumb, .navbox, .wikitable, table {
       .thumb, .navbox, .wikitable, table,
        width: 100% !important;
      .floatleft, .floatright, /* floatleft, floatright 클래스도 추가하여 겹침 방지 */
      .mw-halign-left, .mw-halign-right /* 미디어위키에서 사용될 수 있는 정렬 클래스 */
      {
         float: none !important;
         float: none !important;
         clear: both !important;
         clear: both !important; /* 모든 float를 확실히 정리 */
         display: block !important;
         display: block !important;
         margin: 1em 0 !important;
        width: 100% !important; /* 너비를 100%로 설정하여 가로 스크롤 방지 */
         box-sizing: border-box;
         margin: 1.5em 0 !important; /* 상하 여백 확보 */
         box-sizing: border-box !important;
       }
       }


       /* 📌 리스트 들여쓰기 */
       /* 📌 전체 본문 padding 및 스태킹 컨텍스트 설정 */
       ul, ol {
       /* 본문 영역 전체의 패딩을 설정하고, z-index를 위한 스태킹 컨텍스트를 제공합니다. */
         padding-left: 1.2em !important;
      .mw-parser-output {
         padding: 0 10px !important;
        position: relative !important; /* 자식 요소의 z-index 기준이 됨 */
        z-index: 1 !important; /* 다른 콘텐츠보다 낮게 설정 (목차는 9999) */
       }
       }
       li {
     
         line-height: 1.6em !important;
      /* 📌 사이드바, 패널, 언어 링크 제거 */
        word-break: break-word;
      /* 모바일에서 불필요한 사이드바, 패널, 언어 링크를 숨깁니다. */
      #mw-panel, #site-navigation, .sidebar, #p-lang, /* 언어 링크 패널도 추가 */
       #mw-head-base, #mw-navigation { /* 상단 헤더 및 내비게이션 일부도 필요시 숨김 */
         display: none !important;
       }
       }


       /* 📌 전체 폰트 크기 축소 */
       /* 📌 기본 폰트 크기 조정 */
       body {
       body {
         font-size: 14px !important;
         font-size: 14px !important;
       }
       }


       /* 📌 사이드바 감추기 */
       /* 📌 목록 들여쓰기 조정 */
       #mw-panel, #site-navigation, .sidebar {
       ul, ol {
         display: none !important;
        padding-left: 1.2em !important;
      }
     
      /* 📌 목록 항목 줄 높이 및 단어 줄바꿈 */
      li {
         line-height: 1.6em !important;
        word-break: break-word; /* 긴 단어가 줄바꿈되도록 설정 */
       }
       }
    }
    }

    2025년 7월 25일 (금) 15:49 기준 최신판

    @media screen and (max-width: 768px) {
    
      /* 📌 목차 스타일 정리 */
      #toc, .toc {
        float: none !important;
        clear: both !important;
        display: block !important;
        position: relative !important; /* z-index가 작동하도록 설정 */
        width: 100% !important;
        margin: 1.5em 0 !important;
        padding: 12px !important;
        background: #f9f9f9 !important;
        border: 1px solid #ccc !important;
        box-sizing: border-box !important;
        z-index: 9999 !important; /* 목차가 다른 모든 요소 위에 확실히 오도록 매우 높은 값 설정 */
      }
    
      /* 📌 목차 다음 요소 강제 clear 처리 및 스태킹 컨텍스트 설정 */
      /* 목차 바로 다음에 오는 모든 요소들이 목차 아래에 위치하도록 강제합니다. */
      .mw-parser-output > #toc + *,
      .mw-parser-output > .toc + * {
        margin-top: 1em !important;
        clear: both !important; /* 이전 float 요소를 확실히 정리 */
        display: block !important;
        position: relative !important; /* z-index를 위해 필요 */
        z-index: 1 !important; /* 목차보다 낮은 z-index (목차는 9999) */
      }
    
      /* 📌 infobox, 썸네일, 네비게이션 박스 등 콘텐츠 float 제거 및 블록화 */
      /* 모바일에서 레이아웃 겹침을 유발할 수 있는 모든 float 요소를 제거하고 블록 요소로 만듭니다. */
      .infobox, table.infobox,
      .thumb, .navbox, .wikitable, table,
      .floatleft, .floatright, /* floatleft, floatright 클래스도 추가하여 겹침 방지 */
      .mw-halign-left, .mw-halign-right /* 미디어위키에서 사용될 수 있는 정렬 클래스 */
      {
        float: none !important;
        clear: both !important; /* 모든 float를 확실히 정리 */
        display: block !important;
        width: 100% !important; /* 너비를 100%로 설정하여 가로 스크롤 방지 */
        margin: 1.5em 0 !important; /* 상하 여백 확보 */
        box-sizing: border-box !important;
      }
    
      /* 📌 전체 본문 padding 및 스태킹 컨텍스트 설정 */
      /* 본문 영역 전체의 패딩을 설정하고, z-index를 위한 스태킹 컨텍스트를 제공합니다. */
      .mw-parser-output {
        padding: 0 10px !important;
        position: relative !important; /* 자식 요소의 z-index 기준이 됨 */
        z-index: 1 !important; /* 다른 콘텐츠보다 낮게 설정 (목차는 9999) */
      }
    
      /* 📌 사이드바, 패널, 언어 링크 제거 */
      /* 모바일에서 불필요한 사이드바, 패널, 언어 링크를 숨깁니다. */
      #mw-panel, #site-navigation, .sidebar, #p-lang, /* 언어 링크 패널도 추가 */
      #mw-head-base, #mw-navigation { /* 상단 헤더 및 내비게이션 일부도 필요시 숨김 */
        display: none !important;
      }
    
      /* 📌 기본 폰트 크기 조정 */
      body {
        font-size: 14px !important;
      }
    
      /* 📌 목록 들여쓰기 조정 */
      ul, ol {
        padding-left: 1.2em !important;
      }
    
      /* 📌 목록 항목 줄 높이 및 단어 줄바꿈 */
      li {
        line-height: 1.6em !important;
        word-break: break-word; /* 긴 단어가 줄바꿈되도록 설정 */
      }
    }