Jump to content

MediaWiki:Common.css: Difference between revisions

From SOJI ELECTRONICS
No edit summary
Tags: Manual revert Reverted
No edit summary
Tag: Manual revert
Line 1: Line 1:
@import url('https://fonts.googleapis.com/css?family=Open+Sans|Oswald:400,700');
/* =========================================
  SIDEBAR CATEGORY TREE
  ========================================= */


body { font-family: "Open Sans", "Oswald", sans-serif; }
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');


@media screen and (max-width: 800px) {
/* Font cho toàn tree */
    table.main-table {
.vector-main-menu #p-CATEGORIES,
        width:100% !important;
.vector-main-menu .CategoryTreeTag,
        display: table !important;
.mw-portlet-CATEGORIES,
        padding: 0px !important;
.CategoryTreeTag {
    }
    font-family: 'Inter', -apple-system, "Segoe UI", Roboto, sans-serif !important;
    padding: 4px 0;
}
.vector-main-menu .CategoryTreeTag *,
.CategoryTreeTag * {
    font-family: 'Inter', -apple-system, "Segoe UI", Roboto, sans-serif !important;
}


    .main-table td {
/* Parent — không clip */
        text-align: center;
.vector-main-menu,
        display: block;
.vector-main-menu .mw-portlet-body,
        margin-top: 10px
.mw-portlet-CATEGORIES,
    }
.mw-portlet-CATEGORIES .mw-portlet-body,
    table.main-table.w-100 td {
#p-CATEGORIES {
        display: inline-block;
    overflow: visible !important;
        width: 49.5% !important;
}
    }
    table.main-table.w-100 table {
        display: table;
    }
    table.main-table.w-100 table td {
        display: block;
        width: 100% !important;
    }
    .main-table td:nth-child(2n) {
        margin-bottom: 20px
    }


    #p-cactions-label {
/* Section */
        outline: 0
.vector-main-menu .CategoryTreeSection,
     }
.CategoryTreeSection {
    list-style: none;
    padding: 0;
     margin: 0;
}


    #p-logo {
/* Item — flex row, mũi tên qua phải */
        position: relative !important;
.vector-main-menu .CategoryTreeItem,
        top: 0px !important;
#p-CATEGORIES .CategoryTreeItem,
        left: 0
.CategoryTreeItem {
     }
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    padding: 6px 12px 6px 0 !important;
    margin: 0 !important;
     overflow: visible !important;
}


    .mw-body {
/* Không highlight nền khi hover */
        margin-left: 0 !important
.vector-main-menu .CategoryTreeItem:hover,
    }
.CategoryTreeItem:hover {
    background-color: transparent !important;
}


/* Text label */
.vector-main-menu .CategoryTreeItem > bdi,
.CategoryTreeItem > bdi {
    flex: 1 !important;
    order: 1 !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}
.vector-main-menu .CategoryTreeItem > bdi a,
.CategoryTreeItem > bdi a {
    color: #2c3993 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.45 !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    word-wrap: break-word;
}


     #left-navigation {
/* Hover — gạch dưới text */
        margin-left: 0 !important
.CategoryTreeItem > bdi a:hover {
    }
     color: #2c3993 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
}


    #p-personal ul {
/* Active page — gạch dưới */
        padding-left: 50px !important
.CategoryTreeItem > bdi a.selflink,
    }
.CategoryTreeItem > bdi a.mw-selflink {
 
     text-decoration: underline !important;
    div#footer {
     text-underline-offset: 3px !important;
        margin-left: 0
     font-weight: 400 !important;
    }
}
 
     #p-views {
        display: none !important
    }
 
    #p-cactions .menu ul {
        -moz-transform: rotate(180deg);
        -webkit-transform: rotate(180deg);
        transform: rotate(180deg)
     }
 
    #p-cactions .menu ul > li {
        -moz-transform: rotate(-180deg);
        -webkit-transform: rotate(-180deg);
        transform: rotate(-180deg)
     }
 
    #p-cactions .menu ul > li:nth-last-child(2),#p-cactions .menu ul > li:last-child {
        display: none !important
    }


/* Bullet container */
.vector-main-menu .CategoryTreeBullet,
.CategoryTreeBullet {
    order: 2 !important;
    margin-left: 8px !important;
    flex-shrink: 0 !important;
    width: 20px !important;
    height: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    position: relative !important;
}


    div.thumb.tright {
/* Toggle */
        float: none;
.vector-main-menu .CategoryTreeToggle,
        display: block;
.CategoryTreeToggle {
        width: 100%;
    display: inline-block !important;
        max-width: 250px;
    width: 20px !important;
        margin: 0 !important;
    height: 20px !important;
     }
    background: none !important;
 
     text-indent: -9999px !important;
    #mw-imagepage-section-filehistory table{
    font-size: 0 !important;
        overflow: auto;
    position: relative !important;
        border: 0;
     cursor: pointer !important;
        display: block;
     text-decoration: none !important;
     }
    margin: 0 !important;
 
     padding: 0 !important;
.fullImageLink img {
     overflow: visible !important;
        width:100%;
        height: auto
     }
 
    p img {
        width: 100%;
        height: auto;
        margin: 0
     }
 
    div.thumbinner {
        width: 100% !important
     }
 
    div.thumbinner img {
        width: 100%;
        height: auto
    }
 
}
}


 
/* Ẩn content gốc */
@media screen and (max-width: 500px) {
.CategoryTreeToggle * {
     table.main-table.w-100 td {
     display: none !important;
        display: block;
        width: 100% !important;
    }
}
}


@media screen and (max-width: 450px) {
/* Chevron > — collapsed: chỉ sang phải */
    #mw_metadata {
.CategoryTreeToggle::before {
        width: 100% !important
    content: '' !important;
     }
    display: block !important;
 
    position: absolute !important;
     #p-namespaces #ca-talk {
    top: 50% !important;
        display: none !important
    left: 50% !important;
     }
     width: 7px !important;
 
    height: 7px !important;
     #p-cactions .menu ul > li:nth-last-child(1) {
     border-right: 2px solid #2c3993 !important;
        display: block !important
    border-bottom: 2px solid #2c3993 !important;
    }
    background: transparent !important;
     box-sizing: border-box !important;
     transform: translate(-65%, -50%) rotate(-45deg) !important;
    transition: transform 0.2s ease !important;
}
}


@media screen and (min-width: 801px) {
/* Chevron v — expanded: chỉ xuống */
     #p-cactions .menu li:nth-child(10),#p-cactions .menu li:nth-child(5),#p-cactions .menu li:nth-child(6),#p-cactions .menu li:nth-child(7),#p-cactions .menu li:nth-child(8),#p-cactions .menu li:nth-child(9) {
.CategoryTreeToggle[aria-expanded="true"]::before {
        display:none !important
     transform: translate(-50%, -65%) rotate(45deg) !important;
    }
}
}


@media screen and (max-width: 350px) {
/* Children — indent + viền trái */
     #left-navigation #p-namespaces ul li:first-of-type a:first-of-type {
.vector-main-menu .CategoryTreeChildren,
        display:none !important
.CategoryTreeChildren {
     }
     margin-left: 0 !important;
    padding-left: 8px !important;
    padding-right: 0 !important;
    border-left: 1px solid #d4dae8 !important;
     overflow: visible !important;
}
}


@media screen and (min-width: 351px) {
/* Cấp sâu — chữ size đều, không nhỏ đi */
     #left-navigation #p-namespaces ul li:first-of-type a:last-of-type {
.CategoryTreeChildren .CategoryTreeChildren .CategoryTreeItem > bdi a {
        display:none !important
     font-size: 14px !important;
    }
    font-weight: 400 !important;
}
}
#ca-talk { display: none !important; }

Revision as of 04:33, 11 May 2026

/* =========================================
   SIDEBAR CATEGORY TREE
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* Font cho toàn tree */
.vector-main-menu #p-CATEGORIES,
.vector-main-menu .CategoryTreeTag,
.mw-portlet-CATEGORIES,
.CategoryTreeTag {
    font-family: 'Inter', -apple-system, "Segoe UI", Roboto, sans-serif !important;
    padding: 4px 0;
}
.vector-main-menu .CategoryTreeTag *,
.CategoryTreeTag * {
    font-family: 'Inter', -apple-system, "Segoe UI", Roboto, sans-serif !important;
}

/* Parent — không clip */
.vector-main-menu,
.vector-main-menu .mw-portlet-body,
.mw-portlet-CATEGORIES,
.mw-portlet-CATEGORIES .mw-portlet-body,
#p-CATEGORIES {
    overflow: visible !important;
}

/* Section */
.vector-main-menu .CategoryTreeSection,
.CategoryTreeSection {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Item — flex row, mũi tên qua phải */
.vector-main-menu .CategoryTreeItem,
#p-CATEGORIES .CategoryTreeItem,
.CategoryTreeItem {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    padding: 6px 12px 6px 0 !important;
    margin: 0 !important;
    overflow: visible !important;
}

/* Không highlight nền khi hover */
.vector-main-menu .CategoryTreeItem:hover,
.CategoryTreeItem:hover {
    background-color: transparent !important;
}

/* Text label */
.vector-main-menu .CategoryTreeItem > bdi,
.CategoryTreeItem > bdi {
    flex: 1 !important;
    order: 1 !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}
.vector-main-menu .CategoryTreeItem > bdi a,
.CategoryTreeItem > bdi a {
    color: #2c3993 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.45 !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    word-wrap: break-word;
}

/* Hover — gạch dưới text */
.CategoryTreeItem > bdi a:hover {
    color: #2c3993 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
}

/* Active page — gạch dưới */
.CategoryTreeItem > bdi a.selflink,
.CategoryTreeItem > bdi a.mw-selflink {
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    font-weight: 400 !important;
}

/* Bullet container */
.vector-main-menu .CategoryTreeBullet,
.CategoryTreeBullet {
    order: 2 !important;
    margin-left: 8px !important;
    flex-shrink: 0 !important;
    width: 20px !important;
    height: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    position: relative !important;
}

/* Toggle */
.vector-main-menu .CategoryTreeToggle,
.CategoryTreeToggle {
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    background: none !important;
    text-indent: -9999px !important;
    font-size: 0 !important;
    position: relative !important;
    cursor: pointer !important;
    text-decoration: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

/* Ẩn content gốc */
.CategoryTreeToggle * {
    display: none !important;
}

/* Chevron > — collapsed: chỉ sang phải */
.CategoryTreeToggle::before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 7px !important;
    height: 7px !important;
    border-right: 2px solid #2c3993 !important;
    border-bottom: 2px solid #2c3993 !important;
    background: transparent !important;
    box-sizing: border-box !important;
    transform: translate(-65%, -50%) rotate(-45deg) !important;
    transition: transform 0.2s ease !important;
}

/* Chevron v — expanded: chỉ xuống */
.CategoryTreeToggle[aria-expanded="true"]::before {
    transform: translate(-50%, -65%) rotate(45deg) !important;
}

/* Children — indent + viền trái */
.vector-main-menu .CategoryTreeChildren,
.CategoryTreeChildren {
    margin-left: 0 !important;
    padding-left: 8px !important;
    padding-right: 0 !important;
    border-left: 1px solid #d4dae8 !important;
    overflow: visible !important;
}

/* Cấp sâu — chữ size đều, không nhỏ đi */
.CategoryTreeChildren .CategoryTreeChildren .CategoryTreeItem > bdi a {
    font-size: 14px !important;
    font-weight: 400 !important;
}
SOJI Electronics