Khác biệt giữa bản sửa đổi của “MediaWiki:Timeless.css”

Từ Wiki Du học Nga
Không có tóm lược sửa đổi
Thẻ: Đã bị lùi lại
Không có tóm lược sửa đổi
Thẻ: Lùi lại thủ công
 
(không hiển thị 3 phiên bản ở giữa của cùng người dùng)
Dòng 34: Dòng 34:
#toc.sticky-toc {
#toc.sticky-toc {
     position: fixed !important;
     position: fixed !important;
     top: 80px !important; /* Điều chỉnh theo chiều cao header */
     top: 80px; /* Điều chỉnh theo chiều cao header */
     left: 10px !important;
     left: 10px;
     width: 220px !important;
     width: 220px;
     max-height: 80vh !important;
     max-height: 80vh;
     background-color: #f8f9fa !important;
     background-color: #f8f9fa;
     border: 1px solid #a2a9b1 !important;
     border: 1px solid #a2a9b1;
     border-radius: 4px !important;
     border-radius: 4px;
     z-index: 1000 !important;
     z-index: 1000;
     display: flex !important;
     display: flex;
     flex-direction: column !important;
     flex-direction: column;
     overflow: hidden !important; /* Ẩn scroll ngoài, chỉ scroll nội dung */
     overflow: hidden; /* Ẩn scroll ngoài, chỉ scroll nội dung */
}
}


/* Scroll riêng phần danh sách trong TOC */
/* Scroll riêng phần danh sách trong TOC */
#toc.sticky-toc > ul {
#toc.sticky-toc > ul {
     overflow-y: auto !important;
     overflow-y: auto;
     max-height: calc(80vh - 3em) !important; /* Giảm chiều cao phần tiêu đề */
     max-height: calc(80vh - 3em); /* Giảm chiều cao phần tiêu đề */
     padding-right: 0.5em !important; /* Để không che nội dung với scrollbar */
     padding-right: 0.5em; /* Để không che nội dung với scrollbar */
}
 
/* Đảm bảo TOC nằm trong #mw-site-navigation */
#mw-site-navigation {
    position: relative !important; /* Đảm bảo khu vực này có thể chứa TOC */
}
}


Dòng 84: Dòng 79:
         margin-left: 0 !important;
         margin-left: 0 !important;
     }
     }
}
/* Đảm bảo #mw-content-container có position relative */
#mw-content-container {
    position: relative !important; /* Giúp TOC bám vào vị trí chính xác trong nội dung */
}
/* Cập nhật #mw-content-wrapper để tạo không gian cho TOC */
#mw-content-wrapper {
    display: flex !important; /* Dùng flexbox để bố trí TOC và nội dung */
    flex-wrap: wrap !important; /* Cho phép phần tử linh hoạt trong không gian */
}
#mw-content {
    flex: 1 !important; /* Nội dung chính chiếm toàn bộ không gian còn lại */
}
}

Bản mới nhất lúc 17:48, ngày 21 tháng 4 năm 2025

/* Tất cả mã CSS tại đây sẽ được tải khi người dùng sử dụng giao diện Vượt thời gian */
/* Tăng kích thước logo cho skin Timeless */
#p-logo a {
    display: block;
    max-width: none;
    height: auto;
}

#p-logo img {
    max-height: 200px; /* Hoặc 80px, tuỳ bạn */
    width: auto;
}

/* Ẩn infobox trên điện thoại */
@media (max-width: 768px) {
    .infobox {
        display: none !important;
    }
}

/* Floating TOC on the left for Timeless skin */
/* Tùy chỉnh mục lục để nằm trong sidebar */
#toc {
    position: relative;
    margin-top: 1em;
    padding: 0.5em;
    background-color: #f8f9fa;
    border: 1px solid #a2a9b1;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Khi được sticky, sẽ có lớp này thêm vào */
#toc.sticky-toc {
    position: fixed !important;
    top: 80px; /* Điều chỉnh theo chiều cao header */
    left: 10px;
    width: 220px;
    max-height: 80vh;
    background-color: #f8f9fa;
    border: 1px solid #a2a9b1;
    border-radius: 4px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Ẩn scroll ngoài, chỉ scroll nội dung */
}

/* Scroll riêng phần danh sách trong TOC */
#toc.sticky-toc > ul {
    overflow-y: auto;
    max-height: calc(80vh - 3em); /* Giảm chiều cao phần tiêu đề */
    padding-right: 0.5em; /* Để không che nội dung với scrollbar */
}

/* Khi màn hình nhỏ: TOC về lại đầu nội dung */
@media (max-width: 1000px) {
    #toc {
        position: relative !important;
        width: auto !important;
        max-height: none !important;
        overflow: visible !important;
        margin: 1em auto !important;
        left: auto !important;
        top: auto !important;
    }

    #toc.sticky-toc {
        position: relative !important;
        display: block !important;
    }

    #toc > ul {
        max-height: none !important;
        overflow: visible !important;
    }

    #mw-content {
        margin-left: 0 !important;
    }
}