跳转到内容
打开/关闭菜单
  • 1 条目
  • 2 文件
  • 8 用户
  • 591 编辑
ANACHRONISM
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

模板:标识符/styles.css:修订间差异

来自ANACHRONISM
Ancimen​(留言 | 贡献)
无编辑摘要
Ancimen​(留言 | 贡献)
无编辑摘要
第1行: 第1行:
/* ============================================
/* ============================================
   标识符通用样式
   标识符条:Template:标识符 的专属样式
   ============================================ */
   ============================================ */


.identifier {
.id-tag {
    /* 容器:宽度跟随父元素,高度由内容决定 */
    position: relative;
    display: block;
    width: 100%;
    margin: 0.75rem 0;
    padding: 0.7rem 2rem;
    box-sizing: border-box;
 
    /* 渐变底色 */
    background: linear-gradient(
        90deg,
        #8b1a2b 0%,
        #56000d 50%,
        #8b1a2b 100%
    );
    border-radius: 4px;
    color: #fff;
 
    /* 隐藏溢出,让四角箭头被裁到容器边缘 */
    overflow: hidden;
}
 
/* 文字内容:横向 flex,居中,保持单行 */
.id-tag__content {
     display: flex;
     display: flex;
    justify-content: space-between;
     align-items: center;
     align-items: center;
     box-sizing: border-box;
     justify-content: center;
     position: relative;             /* 供四角绝对定位 */
     gap: 0.75rem;
     width: 100%;
     white-space: nowrap;
    padding: 14px 24px;             /* 内边距加大,给角字符留空间 */
     overflow: hidden;
     gap: 12px;
     font-size: 0.9rem;
     font-size: 1rem;
     line-height: 1.4;
     line-height: 1.4;
    border-radius: 4px;
    margin: 6px 0;
}
}


/* ===== 四角符号 ===== */
/* 说明文字:占据剩余空间,超出显示省略号 */
.identifier__corner {
.id-tag__desc {
     position: absolute;
     flex: 1 1 auto;
     font-size: 1.5em;
     min-width: 0;
     line-height: 1;
     overflow: hidden;
     font-weight: 300;
     text-overflow: ellipsis;
     color: currentColor;
     text-align: center;
    opacity: 0.55;
}
    /* 等宽字体让四个角形状更规整 */
 
     font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
/* 左右两侧的分隔符:不参与收缩 */
     /* 稍微拉长纵向,视觉上更"框住" */
.id-tag__sep {
    transform: scaleY(1.25);
     flex: 0 0 auto;
     transform-origin: center;
     color: rgba(255, 255, 255, 0.6);
     text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
     font-weight: bold;
     letter-spacing: -0.05em;
}
}


.identifier__corner--tl {
/* 类型链接:不收缩 */
     top: 3px;
.id-tag__type,
     left: 6px;
.id-tag__author {
     flex: 0 0 auto;
    color: #fff;
     text-decoration: none;
}
}
.identifier__corner--tr {
 
     top: 3px;
.id-tag__author {
     right: 6px;
     font-size: 0.85rem;
     opacity: 0.85;
}
}
.identifier__corner--bl {
 
     bottom: 3px;
/* 链接悬停 */
     left: 6px;
.id-tag a {
     color: #fff;
    text-decoration: none;
     border-bottom: 1px dotted rgba(255, 255, 255, 0.45);
}
}
.identifier__corner--br {
.id-tag a:hover {
     bottom: 3px;
     border-bottom-style: solid;
     right: 6px;
     border-bottom-color: #fff;
}
}


/* ===== 左侧:标识符名称 ===== */
/* ============================================
.identifier__left {
  四角装饰箭头 ⇱
     font-weight: 800;
 
     flex: 0 1 auto;
  ⇱ 的形态:箭头指向左上角,直角在左上。
     min-width: 0;
  通过镜像变换生成其余三个角。
  定位到容器角落后,直角点正好对准容器顶角。
  ============================================ */
 
.id-tag__arrow {
    position: absolute;
    color: rgba(255, 255, 255, 0.5);
     font-size: 0.85rem;
     line-height: 1;
     user-select: none;
}
 
.id-tag__arrow--tl {
    top: 2px;
    left: 2px;
}
 
.id-tag__arrow--tr {
    top: 2px;
    right: 2px;
    transform: scaleX(-1);
}
}


.identifier__left a {
.id-tag__arrow--bl {
     color: inherit;
     bottom: 2px;
     text-decoration: none;
     left: 2px;
    transform: scaleY(-1);
}
}


.identifier__left a:hover {
.id-tag__arrow--br {
     text-decoration: underline;
    bottom: 2px;
    right: 2px;
     transform: scale(-1, -1);
}
}


/* ===== 右侧:描述 + 作者 ===== */
/* ============================================
.identifier__right {
  主题色:通过传入 theme 参数切换
    font-size: 0.6em;
  ============================================ */
    display: flex;
 
    align-items: center;
/* 默认:暗红(二创作者) */
    gap: 6px;
 
    flex: 1 1 auto;
/* 收编作者:深蓝 */
    justify-content: flex-end;
.id-tag--official {
     text-align: right;
     background: linear-gradient(90deg, #1a3d5c 0%, #0d2440 50%, #1a3d5c 100%);
    min-width: 0;
}
}


.identifier__author {
/* 测试:橙金 */
     font-size: 1.8em;
.id-tag--test {
    font-weight: bold;
     background: linear-gradient(90deg, #8b5a1a 0%, #5c3a0d 50%, #8b5a1a 100%);
    white-space: nowrap;
}
}


.identifier__author a {
/* 草稿:深灰 */
     color: inherit;
.id-tag--draft {
    text-decoration: none;
     background: linear-gradient(90deg, #555 0%, #333 50%, #555 100%);
}
}


.identifier__author a:hover {
/* 创意:紫 */
     text-decoration: underline;
.id-tag--idea {
     background: linear-gradient(90deg, #5c1a5c 0%, #3a0d3a 50%, #5c1a5c 100%);
}
}


/* ===== 窄屏:改为两行 ===== */
/* ============================================
  窄屏适配
  ============================================ */
@media (max-width: 700px) {
@media (max-width: 700px) {
     .identifier {
     .id-tag {
        flex-direction: column;
         padding: 0.6rem 1.5rem;
        align-items: flex-start;
        gap: 6px;
         padding: 12px 20px;
     }
     }
     .identifier__right {
     .id-tag__content {
         justify-content: flex-start;
         font-size: 0.8rem;
         text-align: left;
         gap: 0.4rem;
     }
     }
    .id-tag__arrow {
        font-size: 0.7rem;
    }
}
/* ============================================
  夜间模式:底色加深
  ============================================ */
html.skin-theme-clientpref-night .id-tag {
    filter: brightness(0.85);
}
}

2026年9月29日 (二) 20:48的版本

/* ============================================
   标识符条:Template:标识符 的专属样式
   ============================================ */

.id-tag {
    /* 容器:宽度跟随父元素,高度由内容决定 */
    position: relative;
    display: block;
    width: 100%;
    margin: 0.75rem 0;
    padding: 0.7rem 2rem;
    box-sizing: border-box;

    /* 渐变底色 */
    background: linear-gradient(
        90deg,
        #8b1a2b 0%,
        #56000d 50%,
        #8b1a2b 100%
    );
    border-radius: 4px;
    color: #fff;

    /* 隐藏溢出,让四角箭头被裁到容器边缘 */
    overflow: hidden;
}

/* 文字内容:横向 flex,居中,保持单行 */
.id-tag__content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* 说明文字:占据剩余空间,超出显示省略号 */
.id-tag__desc {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

/* 左右两侧的分隔符:不参与收缩 */
.id-tag__sep {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.6);
    font-weight: bold;
    letter-spacing: -0.05em;
}

/* 类型链接:不收缩 */
.id-tag__type,
.id-tag__author {
    flex: 0 0 auto;
    color: #fff;
    text-decoration: none;
}

.id-tag__author {
    font-size: 0.85rem;
    opacity: 0.85;
}

/* 链接悬停 */
.id-tag a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.45);
}
.id-tag a:hover {
    border-bottom-style: solid;
    border-bottom-color: #fff;
}

/* ============================================
   四角装饰箭头 ⇱
   
   ⇱ 的形态:箭头指向左上角,直角在左上。
   通过镜像变换生成其余三个角。
   定位到容器角落后,直角点正好对准容器顶角。
   ============================================ */

.id-tag__arrow {
    position: absolute;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    line-height: 1;
    user-select: none;
}

.id-tag__arrow--tl {
    top: 2px;
    left: 2px;
}

.id-tag__arrow--tr {
    top: 2px;
    right: 2px;
    transform: scaleX(-1);
}

.id-tag__arrow--bl {
    bottom: 2px;
    left: 2px;
    transform: scaleY(-1);
}

.id-tag__arrow--br {
    bottom: 2px;
    right: 2px;
    transform: scale(-1, -1);
}

/* ============================================
   主题色:通过传入 theme 参数切换
   ============================================ */

/* 默认:暗红(二创作者) */

/* 收编作者:深蓝 */
.id-tag--official {
    background: linear-gradient(90deg, #1a3d5c 0%, #0d2440 50%, #1a3d5c 100%);
}

/* 测试:橙金 */
.id-tag--test {
    background: linear-gradient(90deg, #8b5a1a 0%, #5c3a0d 50%, #8b5a1a 100%);
}

/* 草稿:深灰 */
.id-tag--draft {
    background: linear-gradient(90deg, #555 0%, #333 50%, #555 100%);
}

/* 创意:紫 */
.id-tag--idea {
    background: linear-gradient(90deg, #5c1a5c 0%, #3a0d3a 50%, #5c1a5c 100%);
}

/* ============================================
   窄屏适配
   ============================================ */
@media (max-width: 700px) {
    .id-tag {
        padding: 0.6rem 1.5rem;
    }
    .id-tag__content {
        font-size: 0.8rem;
        gap: 0.4rem;
    }
    .id-tag__arrow {
        font-size: 0.7rem;
    }
}

/* ============================================
   夜间模式:底色加深
   ============================================ */
html.skin-theme-clientpref-night .id-tag {
    filter: brightness(0.85);
}