打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

MediaWiki:Common.css

MediaWiki界面页面

注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的更改的影响。

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
/* 由 御坂秋生 于 2024-02-09 14:00 开始编写,参考 StarCitizen Wiki、HydCraft Wiki 排版及 CSS 样式 */
/* 首页 */
.page-首页 .mw-body-header,
.page-首页 .previewnote,
.page-首页 .page-info {
	display: none;
}

.page-首页 .header-image {
	background-image: linear-gradient(to top,var(--color-surface-0),transparent 150%),url(https://wiki.hokubu.cn/w/images/3/3d/Xujiang2.jpeg);
	background-size: cover;
	background-position: top center;
	height: 46vh;
	margin-bottom: -42vh;
}

@media (max-width: 720px) {
	.page-首页 .header-image {
		background-position: top;
		height: 36vh;
		margin-bottom: -32vh;
	}
}

.skin-citizen-dark .adaptive-img img {
	filter: invert(1)!important;
}

/* Powered By HydCraft Wiki and Aurora_Lemon */
:root {
	--box-shadow-plist: 0 3px 10px rgb(0 0 0 / 4%), 0 -3px 10px rgb(0 0 0 / 4%);
	--homecard-box-shadow: 0 3px 6px rgba(0,0,0,0.04), 0 3px 6px rgba(0,0,0,0.0575);
	--box-shadow-cardhover: 0 10px 20px rgba(0,0,0,0.0475), 0 6px 6px rgba(0,0,0,0.0575);
}



/* 评论相关:完全对齐首页风格(卡片覆盖按钮+默认蓝色#3366cc) */
/* 1. 评论区整体卡片 */
.comments-body {
    margin: 1.5rem 0;
    padding: 15px; /* 复用首页卡片内边距 */
    background: var(--color-surface-1); /* 复用首页卡片背景色 */
    border-radius: 15px !important; /* 强制用首页15px圆角 */
    box-shadow: var(--homecard-box-shadow) !important; /* 强制用首页卡片阴影 */
}

/* 2. 单条评论卡片:扩大范围,完整覆盖按钮(关键修改) */
.c-item.full {
    margin-top: 1rem;
    padding: 15px; /* 卡片内边距,确保内容不贴边 */
    padding-bottom: 20px !important; /* 底部额外加 padding,容纳按钮 */
    background: var(--color-surface-1) !important; /* 强制卡片背景,覆盖扩展默认 */
    border-radius: 15px !important; /* 15px圆角,和首页一致 */
    box-shadow: var(--homecard-box-shadow) !important; /* 首页同款阴影 */
    border: none !important; /* 去掉扩展默认边框 */
    display: flex !important; /* 用flex布局,确保头像和内容区对齐 */
    flex-wrap: wrap !important; /* 自适应换行,避免挤压 */
    gap: 12px !important; /* 头像和内容区的间距 */
}
/* 确保卡片内所有子元素都在卡片范围内 */
.c-item.full .c-avatar,
.c-item.full .c-container {
    flex-shrink: 0 !important; /* 防止元素被挤压出卡片 */
}
/* 评论内容容器:占满剩余宽度,避免按钮换行出卡片 */
.c-item.full .c-container {
    width: calc(100% - 62px) !important; /* 宽度=卡片宽-头像宽-间距,确保按钮在一行 */
}

/* 3. 评论输入框区域 */
.comments-body textarea#comment {
    padding: 12px;
    border-radius: 15px !important; /* 输入框15px圆角 */
    border: 1px solid var(--border-color-base) !important; /* 复用首页边框色 */
    background: var(--color-surface-0) !important; /* 浅一度背景,区分层级 */
}

/* 4. 评论提交/预览按钮:默认蓝色#3366cc */
.c-form-button {
    margin-top: 1rem;
    padding: 8px 0;
}
.c-form-button .site-button {
    padding: 8px 20px;
    border-radius: 15px !important; /* 按钮15px圆角 */
    background: #3366cc !important; /* 默认蓝色#3366cc */
    color: #fff !important; /* 白色文字 */
    border: none !important;
}
.c-form-button .site-button:hover {
    background: #2855aa !important; /*  hover加深色(#3366cc深一度) */
    opacity: 1 !important; /* 取消透明,保持纯色hover */
}

/* 5. 评论排序下拉框 */
.c-order-select select {
    padding: 5px 10px;
    border-radius: 15px !important; /* 下拉框15px圆角 */
    border: 1px solid var(--border-color-base) !important;
    background: var(--color-surface-0) !important;
}

/* 6. 评论自动刷新按钮:默认蓝色#3366cc,恢复默认位置 */
.c-spy a {
    display: inline-block !important;
    padding: 8px 16px !important; /* 首页按钮同款内边距 */
    background: #3366cc !important; /* 默认蓝色#3366cc */
    color: white !important;
    border-radius: 8px !important; /* 8px圆角 */
    box-shadow: var(--homecard-box-shadow) !important; /* 首页卡片阴影 */
    text-decoration: none !important;
    font-weight: 600 !important; /* 字体加粗 */
    transition: background 0.3s ease !important;
    margin-top: 0 !important; /* 恢复默认位置,不额外上移 */
}
.c-spy a:hover {
    background: #2855aa !important; /*  hover加深色(#3366cc深一度) */
    transform: none !important;
    opacity: 1 !important;
}

/* 7. 评论操作区(固定链接+回复按钮):默认蓝色#3366cc,确保在卡片内 */
.c-actions {
    margin-top: 10px !important; /* 恢复正常间距,在评论内容下方 */
    margin-left: 0 !important; /* 取消左移,避免超出卡片 */
}
/* 固定链接:默认蓝色#3366cc,和回复按钮统一 */
.c-actions a[rel="nofollow"]:not(.comments-reply-to) {
    display: inline-block !important;
    padding: 8px 16px !important; /* 和回复按钮同内边距 */
    background: #3366cc !important; /* 默认蓝色#3366cc */
    color: white !important; /* 白色文字 */
    border-radius: 8px !important; /* 8px圆角 */
    box-shadow: var(--homecard-box-shadow) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: background 0.3s ease !important;
    margin-right: 8px !important; /* 和回复按钮保持间距 */
}
.c-actions a[rel="nofollow"]:not(.comments-reply-to):hover {
    background: #2855aa !important; /*  hover加深色(#3366cc深一度) */
}
/* 回复按钮:默认蓝色#3366cc,恢复默认位置 */
.c-actions a.comments-reply-to {
    display: inline-block !important;
    padding: 8px 16px !important; /* 同固定链接内边距 */
    background: #3366cc !important; /* 默认蓝色#3366cc */
    color: white !important;
    border-radius: 8px !important; /* 8px圆角 */
    box-shadow: var(--homecard-box-shadow) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: background 0.3s ease !important;
    margin-top: 0 !important; /* 恢复默认位置,不额外调整 */
}
.c-actions a.comments-reply-to:hover {
    background: #2855aa !important; /*  hover加深色(#3366cc深一度) */
    transform: none !important;
    opacity: 1 !important;
}

/* 8. 评论头像:15px圆角,适配卡片 */
.c-avatar img {
    width: 50px !important; /* 头像宽度(可按需改) */
    height: 50px !important; /* 正方形,避免变形 */
    border-radius: 15px !important; /* 15px圆角,按需求调整 */
    box-shadow: var(--homecard-box-shadow) !important;
    border: 2px solid var(--color-surface-0) !important; /* 贴合卡片背景 */
}

/* 9. 暗色模式适配:默认蓝色#3366cc的深色版 */
html.skin-citizen-dark .c-spy a,
html.skin-citizen-dark .c-actions a[rel="nofollow"]:not(.comments-reply-to),
html.skin-citizen-dark .c-actions a.comments-reply-to,
html.skin-citizen-dark .c-form-button .site-button {
    background: #4a7edb !important; /* #3366cc的暗色模式适配色(稍亮,确保对比度) */
}
html.skin-citizen-dark .c-spy a:hover,
html.skin-citizen-dark .c-actions a[rel="nofollow"]:not(.comments-reply-to):hover,
html.skin-citizen-dark .c-actions a.comments-reply-to:hover,
html.skin-citizen-dark .c-form-button .site-button:hover {
    background: #3a6bc8 !important; /* 暗色模式hover加深色 */
}
html.skin-citizen-dark .c-item.full {
    background: #1e1e2e !important; /* 暗色模式下卡片背景 */
}
html.skin-citizen-dark .c-avatar img {
    border-color: #1e1e2e !important; /* 暗色模式下头像边框用卡片背景色 */
}