MediaWiki:Comment.css

来自互联网一战博物馆

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

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
/* ===============================
   让 Comments 扩展变成 Fandom 风
   =============================== */

/* 1. 整个评论区容器 */
#mw-comments {
    max-width: 1060px;          /* Fandom 默认宽度 */
    margin: 24px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #3a3a3a;
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

/* 2. 标题栏(“发表评论”/“XX 条评论”) */
#mw-comments-title {
    background: #f6f8fa;
    padding: 12px 16px;
    border-bottom: 1px solid #e1e8ed;
    font-weight: 600;
    font-size: 15px;
}

/* 3. 单条评论 */
.mw-comment {
    position: relative;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    border-bottom: 1px solid #eaecf0;
}

/* 4. 头像 */
.mw-comment-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eaecf0;
    object-fit: cover;
    flex-shrink: 0;
}

/* 5. 内容区 */
.mw-comment-content {
    margin-left: 12px;
    flex: 1;
}

/* 6. 用户名 + 时间戳 */
.mw-comment-header {
    font-size: 13px;
    line-height: 1.3;
    margin-bottom: 4px;
}

.mw-comment-header a {
    font-weight: 600;
    color: #0645ad;
    text-decoration: none;
}

.mw-comment-header a:hover {
    text-decoration: underline;
}

.mw-comment-time {
    color: #6e6e6e;
    margin-left: 6px;
}

/* 7. 评论正文 */
.mw-comment-body {
    line-height: 1.5;
    word-wrap: break-word;
    color: #111;
}

/* 8. 工具链接(回复、感谢、编辑、删除……) */
.mw-comment-actions {
    margin-top: 6px;
    font-size: 12px;
}

.mw-comment-actions a {
    color: #6e6e6e;
    margin-right: 12px;
    text-decoration: none;
}

.mw-comment-actions a:hover {
    color: #0645ad;
    text-decoration: underline;
}

/* 9. 回复框(输入区) */
#mw-comments-new {
    padding: 16px;
    background: #fafbfc;
    border-top: 1px solid #eaecf0;
}

#mw-comments-new textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px 10px;
    border: 1px solid #c8ccd1;
    border-radius: 2px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

#mw-comments-new textarea:focus {
    border-color: #0645ad;
    outline: none;
}

#mw-comments-submit {
    margin-top: 8px;
    padding: 6px 16px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
}

#mw-comments-submit:hover {
    background: #1967d2;
}

/* 10. 嵌套回复(缩进) */
.mw-comment-replies {
    margin-left: 44px;
    border-left: 2px solid #eaecf0;
}

/* 11. 移动端适配 */
@media screen and (max-width: 720px) {
    #mw-comments {
        margin: 12px;
    }
    .mw-comment {
        padding: 12px;
    }
    .mw-comment-avatar img {
        width: 24px;
        height: 24px;
    }
    .mw-comment-content {
        margin-left: 8px;
    }
    .mw-comment-replies {
        margin-left: 32px;
    }
}