Files
wordpress-theme-aksrt/assets/css/frontend/base.css
T

219 lines
5.2 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* AKSRT Main v5 — 博客/个人站完整前端
*/
/* 防止 hero 等使用 100vw / full-bleed 时产生横向滚动条 */
html,
body {
overflow-x: clip;
}
@supports not (overflow-x: clip) {
html,
body {
overflow-x: hidden;
}
}
/* ========== 阅读进度条(单篇文章顶 fixed)========== */
.reading-progress-bar {
position: fixed;
top: 0;
left: 0;
height: 3px;
width: 0%;
z-index: 9999;
pointer-events: none;
background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
transition: width 0.1s ease-out;
}
/* 折叠 body 内注入的 BOM / 空白文本节点,防止产生多余行高间距 */
body {
font-family: var(--font-body);
font-size: var(--text-base);
line-height: var(--leading-normal);
color: var(--color-ink-2);
background-color: var(--surface-page);
}
/* zibll compat: global link composite transition */
a[href] {
transition: color 0.2s, background 0.3s, opacity 0.3s, box-shadow 0.3s, transform 0.3s;
}
.skip-link {
position: absolute;
left: 16px;
top: 12px;
z-index: 1100;
padding: 10px 14px;
border-radius: 999px;
background: var(--color-primary);
color: #fff;
transform: translateY(-140%);
transition: transform 0.2s ease;
}
.skip-link:focus {
transform: translateY(0);
}
/* ========== 站点外壳 ========== */
.site-wrapper {
min-height: 100vh;
display: flex;
flex-direction: column;
font-size: var(--text-base);
line-height: var(--leading-normal);
}
.site-main {
flex: 1;
}
/* Zibll dual-column float math expects a padding-free main.container.
* Bootstrap 5 also defines .container (max-width ladder + padding-x).
* Force Zibll geometry after Bootstrap so negative-margin sidebars land correctly. */
.container,
main.container,
.site-main.container {
width: 100%;
max-width: var(--container, var(--mian-max-width, 1200px));
margin-right: auto;
margin-left: auto;
padding-right: 0;
padding-left: 0;
/* Kill Bootstrap 5 --bs-gutter-x padding model on site shells */
--bs-gutter-x: 0;
--bs-gutter-y: 0;
}
/* Header multifunc icon cards need horizontal gutter (zibll content rows).
* Global .container padding is 0 for dual-column float math. */
.header-slider-card.container,
.header-components-card.container {
padding-left: 15px;
padding-right: 15px;
box-sizing: border-box;
}
@media (min-width: 576px) {
.container,
main.container {
max-width: var(--container, var(--mian-max-width, 1200px));
}
}
@media (min-width: 768px) {
.container,
main.container {
max-width: var(--container, var(--mian-max-width, 1200px));
}
}
@media (min-width: 992px) {
.container,
main.container {
max-width: var(--container, var(--mian-max-width, 1200px));
}
}
@media (min-width: 1200px) {
.container,
main.container {
max-width: var(--container, var(--mian-max-width, 1200px));
}
}
@media (min-width: 1240px) {
.container,
main.container,
.fluid-widget-wrap .widget-container {
width: auto;
max-width: var(--container, var(--mian-max-width, 1200px));
}
}
@media (min-width: 1400px) {
.container,
main.container {
max-width: var(--container, var(--mian-max-width, 1200px));
}
}
/* Soft pad only when the float dual-column is collapsed.
* Match Zibll bootstrap container pad (15px) rather than 10px. */
@media (max-width: 991.98px) {
.container,
main.container {
padding-right: 15px;
padding-left: 15px;
}
}
@media (max-width: 767px) {
.container,
main.container {
width: 100%;
max-width: 100%;
padding-right: 15px;
padding-left: 15px;
}
}
/* ========== User identity inline icons ==========
* Level / medal icons ride inline to the right of a username. Centralized here
* so every route (header panel, user center, author hero, single, comments,
* widgets) renders the same compact badge instead of the raw intrinsic PNG size.
*
* Mirrors zibll `.img-icon { height: 1.1em; display: inline-block; vertical-align: -.15em }`
* — sizes to the surrounding line height, never dominates the row. Localized
* exceptions (UC level hero, admin column) override `height` per context.
*/
.aksrt-user-level-icon,
.aksrt-identity-medal,
.aksrt-identity-certification-icon {
display: inline-block;
width: auto;
height: 1.1em;
max-width: 6em;
object-fit: contain;
vertical-align: -.15em;
flex: 0 0 auto;
}
/* Comment context: a touch smaller to fit the 14px author line. */
.aksrt-identity-medal--comment,
.aksrt-user-level-icon--comment {
height: 1em;
vertical-align: -.12em;
}
/* No-wrap inline name rows — keep the level icon on the same line as the name.
* The non-standard <name> element (zibll compat) plus .user-name / author-hero /
* uc-header name rows must not flex-wrap, or the badge drops to a new line.
* The comment header may still wrap (avatar + name + like can overflow on
* narrow viewports), so it keeps flex-wrap but the inner <name> never does. */
.article-avatar name,
.article-avatar .name,
.user-name,
.aksrt-author-hero__name,
.uc-header__name,
.aksrt-header-badges {
flex-wrap: nowrap;
white-space: nowrap;
}
.aksrt-author-hero__name,
.uc-header__name {
display: inline-flex;
align-items: center;
gap: 4px;
}
/* ========== 通用空状态 ========== */
.no-results {
padding: 48px 20px;
text-align: center;
color: var(--color-ink-3);
}