|
|
| (未显示同一用户的6个中间版本) |
| 第1行: |
第1行: |
| /* === TYZX opt-in Comments theme: BEGIN ===
| |
| * Scope: pages that explicitly transclude 模板:访客评论.
| |
| * Rollback: remove this complete BEGIN/END block.
| |
| */
| |
| .tyzx-comments {
| |
| --tyzx-comments-border: var(--border-color-subtle, #a2a9b1);
| |
| --tyzx-comments-card: var(--background-color-neutral-subtle, #f8f9fa);
| |
| --tyzx-comments-text: var(--color-base, #202122);
| |
| --tyzx-comments-muted: var(--color-subtle, #54595d);
| |
| --tyzx-comments-link: var(--color-progressive, #36c);
| |
| --tyzx-comments-danger: var(--color-destructive, #b32424);
| |
| --tyzx-comments-radius: var(--border-radius-base, 2px);
| |
| box-sizing: border-box;
| |
| width: 100%;
| |
| max-width: 100%;
| |
| margin-block-start: 2rem;
| |
| padding-block-start: 1rem;
| |
| border-block-start: 1px solid var(--tyzx-comments-border);
| |
| color: var(--tyzx-comments-text);
| |
| font-family: var(--font-family-system-sans, sans-serif);
| |
| }
| |
|
| |
| .tyzx-comments *,
| |
| .tyzx-comments *::before,
| |
| .tyzx-comments *::after {
| |
| box-sizing: border-box;
| |
| }
| |
|
| |
| .tyzx-comments__heading {
| |
| margin: 0;
| |
| color: var(--tyzx-comments-text);
| |
| font-size: 1.35rem;
| |
| font-weight: 600;
| |
| line-height: 1.3;
| |
| }
| |
|
| |
| .tyzx-comments__notice {
| |
| margin-block: 0.35rem 1rem;
| |
| color: var(--tyzx-comments-muted);
| |
| font-size: 0.875rem;
| |
| line-height: 1.6;
| |
| }
| |
|
| |
| .tyzx-comments #comments-body,
| |
| .tyzx-comments .full,
| |
| .tyzx-comments textarea#comment,
| |
| .tyzx-comments .c-form-message {
| |
| width: 100%;
| |
| max-width: 100%;
| |
| }
| |
|
| |
| .tyzx-comments .c-item {
| |
| display: grid;
| |
| grid-template-columns: 40px minmax(0, 1fr);
| |
| gap: 0.75rem;
| |
| width: 100%;
| |
| max-width: 100%;
| |
| margin: 0 0 0.75rem;
| |
| padding: 0.75rem;
| |
| overflow: hidden;
| |
| border: 1px solid var(--tyzx-comments-border);
| |
| border-radius: var(--tyzx-comments-radius);
| |
| background: var(--tyzx-comments-card);
| |
| }
| |
|
| |
| .tyzx-comments .c-item.reply {
| |
| width: auto;
| |
| max-width: calc(100% - 1.5rem);
| |
| margin-inline-start: 1.5rem !important;
| |
| }
| |
|
| |
| .tyzx-comments .c-avatar {
| |
| position: static;
| |
| width: 40px;
| |
| height: 40px;
| |
| }
| |
|
| |
| .tyzx-comments .c-avatar img {
| |
| display: block;
| |
| width: 40px;
| |
| height: 40px;
| |
| padding: 0;
| |
| object-fit: cover;
| |
| border: 1px solid var(--tyzx-comments-border);
| |
| border-radius: 50%;
| |
| background: var(--background-color-base, #fff);
| |
| }
| |
|
| |
| .tyzx-comments .c-container {
| |
| position: static;
| |
| min-width: 0;
| |
| margin: 0;
| |
| }
| |
|
| |
| .tyzx-comments .c-user {
| |
| display: flex;
| |
| flex-wrap: wrap;
| |
| gap: 0.15rem 0.5rem;
| |
| align-items: baseline;
| |
| margin: 0 0 0.4rem;
| |
| color: var(--tyzx-comments-text);
| |
| font-weight: 600;
| |
| }
| |
|
| |
| .tyzx-comments .c-user a {
| |
| color: var(--tyzx-comments-link);
| |
| font-size: 0.95rem;
| |
| }
| |
|
| |
| .tyzx-comments .c-time,
| |
| .tyzx-comments .c-user-level {
| |
| margin: 0;
| |
| color: var(--tyzx-comments-muted);
| |
| font-size: 0.75rem;
| |
| font-weight: 400;
| |
| line-height: 1.4 !important;
| |
| }
| |
|
| |
| .tyzx-comments .c-score {
| |
| position: static;
| |
| margin-inline-start: auto;
| |
| padding: 0;
| |
| color: var(--tyzx-comments-muted);
| |
| font-size: 0.75rem;
| |
| }
| |
|
| |
| .tyzx-comments .c-comment,
| |
| .tyzx-comments .f-message,
| |
| .tyzx-comments .r-message {
| |
| width: auto;
| |
| max-width: 100%;
| |
| min-width: 0;
| |
| overflow-wrap: anywhere;
| |
| word-break: break-word;
| |
| color: var(--tyzx-comments-text);
| |
| font-size: 0.95rem;
| |
| line-height: 1.6;
| |
| }
| |
|
| |
| .tyzx-comments .c-actions {
| |
| display: flex;
| |
| flex-wrap: wrap;
| |
| gap: 0.35rem 0.7rem;
| |
| justify-content: flex-end;
| |
| float: none;
| |
| margin-block-start: 0.6rem;
| |
| color: var(--tyzx-comments-muted);
| |
| font-size: 0.8rem;
| |
| }
| |
|
| |
| .tyzx-comments a,
| |
| .tyzx-comments .c-actions a {
| |
| color: var(--tyzx-comments-link);
| |
| }
| |
|
| |
| .tyzx-comments .c-delete a {
| |
| color: var(--tyzx-comments-danger) !important;
| |
| }
| |
|
| |
| .tyzx-comments textarea#comment,
| |
| .tyzx-comments .c-comment-edit-form textarea {
| |
| display: block;
| |
| min-height: 7rem;
| |
| padding: 0.6rem 0.7rem;
| |
| resize: vertical;
| |
| border: 1px solid var(--tyzx-comments-border);
| |
| border-radius: var(--tyzx-comments-radius);
| |
| background: var(--background-color-base, #fff);
| |
| color: var(--tyzx-comments-text);
| |
| font: inherit;
| |
| line-height: 1.5;
| |
| }
| |
|
| |
| .tyzx-comments .site-button,
| |
| .tyzx-comments .c-comment-edit-form button {
| |
| min-height: 2.25rem;
| |
| margin: 0.25rem 0.35rem 0.25rem 0;
| |
| padding: 0.4rem 0.75rem;
| |
| border: 1px solid var(--tyzx-comments-link);
| |
| border-radius: var(--tyzx-comments-radius);
| |
| background: var(--background-color-base, #fff);
| |
| color: var(--tyzx-comments-link);
| |
| font: inherit;
| |
| font-weight: 600;
| |
| cursor: pointer;
| |
| }
| |
|
| |
| .tyzx-comments a:focus-visible,
| |
| .tyzx-comments button:focus-visible,
| |
| .tyzx-comments input:focus-visible,
| |
| .tyzx-comments select:focus-visible,
| |
| .tyzx-comments textarea:focus-visible {
| |
| outline: 3px solid var(--tyzx-comments-link);
| |
| outline-offset: 2px;
| |
| }
| |
|
| |
| @media screen and (max-width: 640px) {
| |
| .tyzx-comments {
| |
| margin-block-start: 1.5rem;
| |
| padding-block-start: 0.75rem;
| |
| }
| |
|
| |
| .tyzx-comments .c-item {
| |
| gap: 0.6rem;
| |
| padding: 0.65rem;
| |
| }
| |
|
| |
| .tyzx-comments .c-item.reply {
| |
| max-width: calc(100% - 0.75rem);
| |
| margin-inline-start: 0.75rem !important;
| |
| }
| |
|
| |
| .tyzx-comments .c-score {
| |
| flex-basis: 100%;
| |
| margin-inline-start: 0;
| |
| }
| |
|
| |
| .tyzx-comments .c-actions {
| |
| justify-content: flex-start;
| |
| }
| |
| }
| |
| /* === TYZX opt-in Comments theme: END === */
| |
| /* === TYZX black curtain: BEGIN === */ | | /* === TYZX black curtain: BEGIN === */ |
| .tyzx-black-curtain { | | .tyzx-black-curtain { |
| 第282行: |
第60行: |
| /* === TYZX black curtain: END === */ | | /* === TYZX black curtain: END === */ |
|
| |
|
| /* Regional CJK font stacks; interface/content language determines the stack. */ | | /* |
| html:lang(zh-cn) body,
| | * Use Wikipedia/Vector's typography independently of login state or UI |
| html:lang(zh-hans) body,
| | * language. Do not attach fonts to :lang(), because a user's interface |
| :lang(zh-cn),
| | * language is stored in account preferences while anonymous visitors use the |
| :lang(zh-hans) { | | * site default; doing so makes the same article change typeface after login. |
| font-family: "Noto Sans CJK SC", "Source Han Sans SC", "PingFang SC", | | */ |
| "Microsoft YaHei", "Heiti SC", system-ui, sans-serif;
| | :root { |
| }
| | --font-family-system-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", |
| | | Roboto, Lato, Helvetica, Arial, sans-serif; |
| html:lang(zh-tw) body,
| | --font-family-serif: "Linux Libertine", Georgia, Times, |
| :lang(zh-tw) { | | "Source Serif Pro", serif; |
| font-family: "Noto Sans CJK TC", "Source Han Sans TC", "PingFang TC",
| |
| "Microsoft JhengHei", "Heiti TC", system-ui, sans-serif; | |
| }
| |
| | |
| html:lang(zh-hk) body,
| |
| html:lang(zh-hant) body,
| |
| :lang(zh-hk),
| |
| :lang(zh-hant) {
| |
| font-family: "Noto Sans CJK HK", "Source Han Sans HC", "PingFang HK",
| |
| "Microsoft JhengHei", "Heiti TC", system-ui, sans-serif;
| |
| }
| |
| | |
| html:lang(ja) body,
| |
| :lang(ja) {
| |
| font-family: "Noto Sans CJK JP", "Source Han Sans JP",
| |
| "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif; | |
| }
| |
| | |
| html:lang(ko) body,
| |
| :lang(ko) {
| |
| font-family: "Noto Sans CJK KR", "Source Han Sans KR",
| |
| "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
| |
| } | | } |
|
| |
|
| /* === TYZX unified sidebar: BEGIN === */
| | html body, |
| .tyzx-sidebar-fixed,
| | button, |
| .tyzx-sidebar-topic {
| | input, |
| box-sizing: border-box; | | select, |
| max-width: 100%;
| | textarea { |
| margin-block: 0;
| | font-family: var(--font-family-system-sans); |
| overflow-wrap: anywhere;
| |
| font-size: 0.875rem;
| |
| line-height: 1.35;
| |
| } | | } |
|
| |
|
| .tyzx-sidebar-fixed { | | .mw-body h1, |
| margin-block-end: 0.3rem;
| | .mw-body-content h1, |
| }
| | .mw-body-content h2 { |
| | | font-family: var(--font-family-serif); |
| .tyzx-sidebar-topic-content li + li { | |
| border-block-start: 1px solid var(--border-color-subtle, #eaecf0);
| |
| }
| |
| | |
| .tyzx-sidebar-fixed li + li { | |
| margin-block-start: 0.3rem;
| |
| }
| |
| | |
| .tyzx-sidebar-fixed a,
| |
| .tyzx-sidebar-topic-content a {
| |
| display: flex; | |
| box-sizing: border-box;
| |
| align-items: center;
| |
| min-width: 0;
| |
| min-height: 2rem;
| |
| padding: 0.35rem 0.45rem;
| |
| border-radius: 2px;
| |
| color: var(--color-progressive, #36c);
| |
| text-decoration: none;
| |
| overflow-wrap: anywhere;
| |
| }
| |
| | |
| .tyzx-sidebar-fixed a,
| |
| .tyzx-sidebar-topic .tyzx-sidebar-toggle {
| |
| display: flex;
| |
| box-sizing: border-box;
| |
| align-items: center;
| |
| width: 100%;
| |
| min-height: 2.25rem;
| |
| margin: 0;
| |
| padding: 0.4rem 0.45rem;
| |
| border: 0;
| |
| border-inline-start: 3px solid #d97706;
| |
| border-radius: 2px;
| |
| background: transparent;
| |
| color: #9a4d00;
| |
| font: inherit;
| |
| font-weight: 650;
| |
| line-height: 1.25;
| |
| text-align: start;
| |
| text-decoration: none;
| |
| cursor: pointer;
| |
| }
| |
| | |
| .tyzx-sidebar-topic-content a:hover {
| |
| background: var(--background-color-interactive-subtle, #f8f9fa);
| |
| text-decoration: underline;
| |
| }
| |
| | |
| .tyzx-sidebar-fixed a:link,
| |
| .tyzx-sidebar-fixed a:visited,
| |
| .tyzx-sidebar-fixed a:focus-visible {
| |
| color: #9a4d00;
| |
| }
| |
| | |
| .tyzx-sidebar-fixed a:hover,
| |
| .tyzx-sidebar-topic .tyzx-sidebar-toggle:hover {
| |
| background: var(--background-color-interactive-subtle, #f8f9fa);
| |
| color: #7a3d00;
| |
| text-decoration: none;
| |
| }
| |
| | |
| .tyzx-sidebar-fixed a:active,
| |
| .tyzx-sidebar-topic .tyzx-sidebar-toggle:active {
| |
| background: var(--background-color-interactive, #eaecf0);
| |
| color: #7a3d00;
| |
| text-decoration: none;
| |
| }
| |
| | |
| .tyzx-sidebar-fixed a:focus-visible,
| |
| .tyzx-sidebar-topic .tyzx-sidebar-toggle:focus-visible,
| |
| .tyzx-sidebar-topic-content a:focus-visible {
| |
| outline: 2px solid var(--color-progressive, #36c);
| |
| outline-offset: -2px;
| |
| }
| |
| | |
| .tyzx-sidebar-topic + .tyzx-sidebar-topic {
| |
| margin-block-start: 0.3rem;
| |
| }
| |
| | |
| .tyzx-sidebar-topic .tyzx-sidebar-toggle::before {
| |
| display: inline-block;
| |
| flex: 0 0 auto;
| |
| width: 0;
| |
| height: 0;
| |
| margin-inline: 0.05rem 0.5rem;
| |
| border-block: 0.28rem solid transparent;
| |
| border-inline-start: 0.4rem solid currentColor;
| |
| content: "";
| |
| transform: rotate(0deg);
| |
| transform-origin: 35% 50%;
| |
| transition: transform 180ms ease;
| |
| }
| |
| | |
| .tyzx-sidebar-topic .tyzx-sidebar-toggle[aria-expanded="true"] {
| |
| background: #fff8ef;
| |
| }
| |
| | |
| .tyzx-sidebar-topic .tyzx-sidebar-toggle[aria-expanded="true"]::before {
| |
| transform: rotate(90deg);
| |
| }
| |
| | |
| .client-js .tyzx-sidebar-topic > .tyzx-sidebar-topic-content {
| |
| display: grid;
| |
| grid-template-rows: 1fr;
| |
| opacity: 1;
| |
| transition:
| |
| grid-template-rows 200ms ease,
| |
| opacity 160ms ease;
| |
| }
| |
| | |
| .client-js .tyzx-sidebar-topic > .tyzx-sidebar-topic-content > ul {
| |
| min-width: 0;
| |
| min-height: 0;
| |
| margin: 0;
| |
| overflow: hidden;
| |
| }
| |
| | |
| .client-js .tyzx-sidebar-topic[data-tyzx-collapsed="true"] > .tyzx-sidebar-topic-content {
| |
| grid-template-rows: 0fr;
| |
| opacity: 0;
| |
| }
| |
| | |
| .tyzx-sidebar-language-current > a,
| |
| .tyzx-sidebar-language-current a,
| |
| .tyzx-sidebar-language a[aria-current="true"] {
| |
| border-inline-start: 3px solid #d97706;
| |
| background: #fff8ef;
| |
| color: var(--color-base, #202122);
| |
| font-weight: 650;
| |
| } | | } |
|
| |
|
| | /* Keep the existing create InputBox inside narrow article viewports. */ |
| @media screen and (max-width: 720px) { | | @media screen and (max-width: 720px) { |
| .tyzx-sidebar-fixed a, | | .mw-parser-output .mw-inputbox-form .cdx-text-input, |
| .tyzx-sidebar-topic .tyzx-sidebar-toggle,
| | .mw-parser-output .mw-inputbox-form .mw-inputbox-createbox { |
| .tyzx-sidebar-topic .tyzx-sidebar-topic-content a { | | box-sizing: border-box; |
| min-height: 44px; | | width: 100%; |
| }
| | max-width: 100%; |
| }
| | min-width: 0; |
| | |
| @media (prefers-reduced-motion: reduce) {
| |
| .tyzx-sidebar-topic .tyzx-sidebar-toggle::before,
| |
| .client-js .tyzx-sidebar-topic > .tyzx-sidebar-topic-content {
| |
| transition: none;
| |
| } | | } |
| } | | } |
| /* === TYZX unified sidebar: END === */
| |