User:魔琴/gadgets/legacy-2022/personal.css

注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google ChromeFirefoxMicrosoft EdgeSafari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。

/* 覆写下拉菜单的样式 */
#vector-user-links-dropdown > .vector-dropdown-content {
    position: inherit;
    top: 0;
    left: 0;
    opacity: inherit;
    height: inherit;
    visibility: visible;
    overflow: initial;
    margin: 0;
    padding: 0;
    z-index: 0;
    background-color: transparent;
    border: none;
    box-shadow: none;
    transition-property: none;
    width: inherit;
    max-width: none;
}

#p-personal {
	border-bottom: none;
}

/* 用的是旧vector的样式 */
.p-personal-legacy {
    display: flex;
    flex-wrap: wrap;
    flex-grow: 1;
    justify-content: flex-end;
    align-items: baseline;
}

/* 取消flex */
.mw-header .vector-header-end {
	display: initial;
	margin-left: 20px; /* 保证logo自然显示 */
}

/* 隐藏无用的DOM */
.p-personal-legacy .vector-icon,
#vector-user-links-dropdown-checkbox,
#vector-user-links-dropdown-label {
	display: none;
}

/* 调整p-personal的样式 */
#p-personal .p-personal-legacy li {
	margin-left: 0.75em;
	font-size: 0.875rem;
}
#p-personal .p-personal-legacy li a {
	padding: 0;
}
#p-personal .p-personal-legacy li a span{
	margin: 0;
}

/* 调整右侧空白 */
.vector-user-links #vector-user-links-dropdown {
	margin-right: 0;
}
.skin-vector-2022 .vector-header-container {
	padding-right: 13.2px; /* 原本字号0.75em放大为0.875rem,放大了1/6。故将间隔12px放大到14px,再减掉自带0.8px */
}

/* 调整左侧空白 */
.mw-logo {
	min-width: 105px;
}

/* 低宽度下logo常驻 */
@media screen and (max-width: 999px) {
	.mw-header.vector-header-search-toggled .vector-header-start {
		display: flex; 
	}
}

/* 优化搜索框样式 */
#p-search {
	float: right;
	margin-right: 0;
	min-height: 44px;
	display: flex;
}
#p-search .cdx-text-input__input {
	padding-left: 60px;
}
#p-search .cdx-text-input__start-icon {
	left: 22px;
}

/* 搜索框的空白 */
#p-search .cdx-typeahead-search {
	margin-left: 0;
}
#p-search .vector-typeahead-search-container {
	margin: auto;
}

/* 全部向上對齊 */
.vector-header-end .vector-user-links,
.vector-header-container .mw-header {
	align-items: flex-start;
}

/* 不知道怎么修sticky header的bug,干脆把它隐藏掉 */
.vector-sticky-header-icon-end .vector-user-links {
	display: none;
}

/* 用户名链接和监视列表不要乱动 */ 
#pt-userpage-2,
#pt-watchlist {
	display: inherit;
}

#pt-userpage,
#pt-watchlist-2 {
	display: none;
}

/* 页面通知位置重设 */
#pt-talk-alert {
	top: 44px;
	right: unset;
	z-index: 1; /*防止被搜索栏覆盖*/
}