MediaWiki:Common.css: Difference between revisions
Appearance
No edit summary |
No edit summary Tag: Reverted |
||
| Line 105: | Line 105: | ||
} | } | ||
/* Toggle container — | /* Toggle container — đủ rộng, center */ | ||
.vector-main-menu .CategoryTreeToggle, | .vector-main-menu .CategoryTreeToggle, | ||
.CategoryTreeToggle { | .CategoryTreeToggle { | ||
| Line 114: | Line 114: | ||
height: 20px !important; | height: 20px !important; | ||
background: none !important; | background: none !important; | ||
text-indent: | text-indent: 0 !important; | ||
font-size: 0 !important; | font-size: 0 !important; | ||
position: relative !important; | position: relative !important; | ||
| Line 122: | Line 122: | ||
padding: 0 !important; | padding: 0 !important; | ||
overflow: visible !important; | overflow: visible !important; | ||
line-height: 1 !important; | |||
} | } | ||
/* Ẩn content gốc */ | /* Ẩn content gốc của toggle (text [+]/[-] mặc định) */ | ||
.CategoryTreeToggle * { | .CategoryTreeToggle > * { | ||
display: none !important; | display: none !important; | ||
} | } | ||
/* Chevron | /* Chevron ❯ — Unicode character, mặc định chỉ PHẢI */ | ||
.CategoryTreeToggle::before { | .CategoryTreeToggle::before { | ||
content: | content: "\276F" !important; /* mã hex cho ❯ */ | ||
display: block !important; | display: inline-block !important; | ||
color: #2c3993 !important; | |||
font-size: 14px !important; | |||
font-weight: bold !important; | |||
line-height: 1 !important; | |||
font-family: Arial, "Helvetica Neue", sans-serif !important; | |||
text-decoration: none !important; | |||
transition: transform 0.25s ease !important; | |||
transform: rotate(0deg) !important; | |||
background: transparent !important; | background: transparent !important; | ||
} | } | ||
/* | /* Khi expanded — quay 90° xuống */ | ||
.CategoryTreeToggle[aria-expanded="true"]::before { | .CategoryTreeToggle[aria-expanded="true"]::before { | ||
transform: | transform: rotate(90deg) !important; | ||
} | } | ||
Revision as of 04:37, 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 container — đủ rộng, center */
.vector-main-menu .CategoryTreeToggle,
.CategoryTreeToggle {
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
width: 20px !important;
height: 20px !important;
background: none !important;
text-indent: 0 !important;
font-size: 0 !important;
position: relative !important;
cursor: pointer !important;
text-decoration: none !important;
margin: 0 !important;
padding: 0 !important;
overflow: visible !important;
line-height: 1 !important;
}
/* Ẩn content gốc của toggle (text [+]/[-] mặc định) */
.CategoryTreeToggle > * {
display: none !important;
}
/* Chevron ❯ — Unicode character, mặc định chỉ PHẢI */
.CategoryTreeToggle::before {
content: "\276F" !important; /* mã hex cho ❯ */
display: inline-block !important;
color: #2c3993 !important;
font-size: 14px !important;
font-weight: bold !important;
line-height: 1 !important;
font-family: Arial, "Helvetica Neue", sans-serif !important;
text-decoration: none !important;
transition: transform 0.25s ease !important;
transform: rotate(0deg) !important;
background: transparent !important;
}
/* Khi expanded — quay 90° xuống */
.CategoryTreeToggle[aria-expanded="true"]::before {
transform: rotate(90deg) !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;
}