MediaWiki:Common.css: Difference between revisions
Appearance
No edit summary Tags: Manual revert Reverted |
No edit summary Tag: Manual revert |
||
| Line 1: | Line 1: | ||
/* ========================================= | |||
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; | |||
} | } | ||
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;
}