MediaWiki:Common.css: Difference between revisions
Appearance
Blanked the page Tags: Blanking Manual revert Reverted |
No edit summary Tag: Reverted |
||
| Line 1: | Line 1: | ||
/* ========================================= | |||
Sidebar Category Tree — style giống Teltonika | |||
========================================= */ | |||
/* Container */ | |||
.vector-main-menu #p-CATEGORIES, | |||
.mw-portlet-CATEGORIES { | |||
padding: 8px 0; | |||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; | |||
} | |||
/* Section wrapper — viền dưới mỗi item top-level */ | |||
.vector-main-menu .CategoryTreeSection { | |||
list-style: none; | |||
} | |||
/* Item row — flex để mũi tên qua phải */ | |||
.vector-main-menu .CategoryTreeItem, | |||
#p-CATEGORIES .CategoryTreeItem { | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
padding: 9px 12px; | |||
border-radius: 4px; | |||
transition: background-color 0.15s; | |||
} | |||
.vector-main-menu .CategoryTreeItem:hover, | |||
#p-CATEGORIES .CategoryTreeItem:hover { | |||
background-color: #f5f7fb; | |||
} | |||
/* Text label — bên trái, chiếm phần lớn không gian */ | |||
.vector-main-menu .CategoryTreeItem > bdi, | |||
#p-CATEGORIES .CategoryTreeItem > bdi { | |||
flex: 1; | |||
order: 1; | |||
min-width: 0; | |||
} | |||
.vector-main-menu .CategoryTreeItem > bdi a, | |||
#p-CATEGORIES .CategoryTreeItem > bdi a { | |||
color: #2c3993; | |||
text-decoration: none; | |||
font-size: 14px; | |||
font-weight: 500; | |||
line-height: 1.4; | |||
display: block; | |||
word-wrap: break-word; | |||
} | |||
.vector-main-menu .CategoryTreeItem > bdi a:hover, | |||
#p-CATEGORIES .CategoryTreeItem > bdi a:hover { | |||
color: #1f2a73; | |||
text-decoration: none; | |||
} | |||
/* Bullet (chứa mũi tên) — qua bên phải */ | |||
.vector-main-menu .CategoryTreeBullet, | |||
#p-CATEGORIES .CategoryTreeBullet { | |||
order: 2; | |||
margin-left: 12px; | |||
flex-shrink: 0; | |||
line-height: 0; | |||
} | |||
/* Mũi tên chevron — tự vẽ bằng border */ | |||
.vector-main-menu .CategoryTreeToggle, | |||
#p-CATEGORIES .CategoryTreeToggle { | |||
display: inline-block; | |||
width: 16px; | |||
height: 16px; | |||
background: none !important; | |||
text-indent: 0 !important; | |||
font-size: 0; | |||
position: relative; | |||
cursor: pointer; | |||
text-decoration: none !important; | |||
} | |||
.vector-main-menu .CategoryTreeToggle::before, | |||
#p-CATEGORIES .CategoryTreeToggle::before { | |||
content: ''; | |||
position: absolute; | |||
top: 50%; | |||
left: 50%; | |||
width: 7px; | |||
height: 7px; | |||
border-right: 2px solid #2c3993; | |||
border-bottom: 2px solid #2c3993; | |||
transform: translate(-65%, -75%) rotate(-45deg); | |||
transition: transform 0.2s ease; | |||
} | |||
/* Expanded — quay chevron xuống */ | |||
.vector-main-menu .CategoryTreeToggle[aria-expanded="true"]::before, | |||
#p-CATEGORIES .CategoryTreeToggle[aria-expanded="true"]::before { | |||
transform: translate(-50%, -75%) rotate(45deg); | |||
} | |||
/* Children container — indent + đường kẻ trái mảnh */ | |||
.vector-main-menu .CategoryTreeChildren, | |||
#p-CATEGORIES .CategoryTreeChildren { | |||
margin-left: 8px; | |||
padding-left: 16px; | |||
border-left: 1px solid #e3e7f0; | |||
} | |||
/* Cấp 3 trở xuống — text nhỏ hơn chút (giống Teltonika leaf) */ | |||
.vector-main-menu .CategoryTreeChildren .CategoryTreeChildren .CategoryTreeItem > bdi a, | |||
#p-CATEGORIES .CategoryTreeChildren .CategoryTreeChildren .CategoryTreeItem > bdi a { | |||
font-size: 13px; | |||
font-weight: 400; | |||
line-height: 1.5; | |||
} | |||
/* Leaf page (không có mũi tên) — căn padding tương đương */ | |||
.vector-main-menu .CategoryTreeItem:not(:has(.CategoryTreeBullet)), | |||
#p-CATEGORIES .CategoryTreeItem:not(:has(.CategoryTreeBullet)) { | |||
padding-right: 28px; | |||
} | |||
Revision as of 04:10, 11 May 2026
/* =========================================
Sidebar Category Tree — style giống Teltonika
========================================= */
/* Container */
.vector-main-menu #p-CATEGORIES,
.mw-portlet-CATEGORIES {
padding: 8px 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
/* Section wrapper — viền dưới mỗi item top-level */
.vector-main-menu .CategoryTreeSection {
list-style: none;
}
/* Item row — flex để mũi tên qua phải */
.vector-main-menu .CategoryTreeItem,
#p-CATEGORIES .CategoryTreeItem {
display: flex;
align-items: center;
justify-content: space-between;
padding: 9px 12px;
border-radius: 4px;
transition: background-color 0.15s;
}
.vector-main-menu .CategoryTreeItem:hover,
#p-CATEGORIES .CategoryTreeItem:hover {
background-color: #f5f7fb;
}
/* Text label — bên trái, chiếm phần lớn không gian */
.vector-main-menu .CategoryTreeItem > bdi,
#p-CATEGORIES .CategoryTreeItem > bdi {
flex: 1;
order: 1;
min-width: 0;
}
.vector-main-menu .CategoryTreeItem > bdi a,
#p-CATEGORIES .CategoryTreeItem > bdi a {
color: #2c3993;
text-decoration: none;
font-size: 14px;
font-weight: 500;
line-height: 1.4;
display: block;
word-wrap: break-word;
}
.vector-main-menu .CategoryTreeItem > bdi a:hover,
#p-CATEGORIES .CategoryTreeItem > bdi a:hover {
color: #1f2a73;
text-decoration: none;
}
/* Bullet (chứa mũi tên) — qua bên phải */
.vector-main-menu .CategoryTreeBullet,
#p-CATEGORIES .CategoryTreeBullet {
order: 2;
margin-left: 12px;
flex-shrink: 0;
line-height: 0;
}
/* Mũi tên chevron — tự vẽ bằng border */
.vector-main-menu .CategoryTreeToggle,
#p-CATEGORIES .CategoryTreeToggle {
display: inline-block;
width: 16px;
height: 16px;
background: none !important;
text-indent: 0 !important;
font-size: 0;
position: relative;
cursor: pointer;
text-decoration: none !important;
}
.vector-main-menu .CategoryTreeToggle::before,
#p-CATEGORIES .CategoryTreeToggle::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 7px;
height: 7px;
border-right: 2px solid #2c3993;
border-bottom: 2px solid #2c3993;
transform: translate(-65%, -75%) rotate(-45deg);
transition: transform 0.2s ease;
}
/* Expanded — quay chevron xuống */
.vector-main-menu .CategoryTreeToggle[aria-expanded="true"]::before,
#p-CATEGORIES .CategoryTreeToggle[aria-expanded="true"]::before {
transform: translate(-50%, -75%) rotate(45deg);
}
/* Children container — indent + đường kẻ trái mảnh */
.vector-main-menu .CategoryTreeChildren,
#p-CATEGORIES .CategoryTreeChildren {
margin-left: 8px;
padding-left: 16px;
border-left: 1px solid #e3e7f0;
}
/* Cấp 3 trở xuống — text nhỏ hơn chút (giống Teltonika leaf) */
.vector-main-menu .CategoryTreeChildren .CategoryTreeChildren .CategoryTreeItem > bdi a,
#p-CATEGORIES .CategoryTreeChildren .CategoryTreeChildren .CategoryTreeItem > bdi a {
font-size: 13px;
font-weight: 400;
line-height: 1.5;
}
/* Leaf page (không có mũi tên) — căn padding tương đương */
.vector-main-menu .CategoryTreeItem:not(:has(.CategoryTreeBullet)),
#p-CATEGORIES .CategoryTreeItem:not(:has(.CategoryTreeBullet)) {
padding-right: 28px;
}