MediaWiki:Common.css: Difference between revisions

From semantic-hub.io
No edit summary
No edit summary
Line 315: Line 315:
   .toc {
   .toc {
     padding: 10px 12px;
     padding: 10px 12px;
  }
}
/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --sh-bg: #0f1720;
    --sh-surface: #16202a;
    --sh-surface-soft: #1c2733;
    --sh-border: #2a3947;
    --sh-border-strong: #3a4a59;
    --sh-text: #e6edf3;
    --sh-text-soft: #9fb3c8;
    --sh-link: #61c0e8;
    --sh-link-hover: #94dbf5;
    --sh-accent: #3aa8c7;
    --sh-accent-2: #2e8ca7;
    --sh-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
  html,
  body {
    background: var(--sh-bg);
    color: var(--sh-text);
  }
  pre,
  code {
    background: #0f1a24;
  }
  .mw-message-box {
    background: #13212d;
  }
  .wikitable th {
    background: #1b2a36;
  }
  .wikitable tr:hover td {
    background: #1a2630;
   }
   }
}
}

Revision as of 20:12, 23 April 2026

:root {
  --sh-bg: #f6f8fb;
  --sh-surface: #ffffff;
  --sh-surface-soft: #f0f4f8;
  --sh-border: #d9e2ec;
  --sh-border-strong: #bcccdc;
  --sh-text: #102a43;
  --sh-text-soft: #486581;
  --sh-link: #0b6e99;
  --sh-link-hover: #084c61;
  --sh-accent: #12708a;
  --sh-accent-2: #0f5f75;
  --sh-success: #2f855a;
  --sh-warning-bg: #fff8e1;
  --sh-shadow: 0 10px 30px rgba(16, 42, 67, 0.08);
  --sh-radius: 12px;
  --sh-radius-sm: 8px;
  --sh-max: 1200px;
}

/* Basis */
html,
body {
  background: var(--sh-bg);
  color: var(--sh-text);
}

body,
.mw-body,
#content,
#mw-content-text {
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: var(--sh-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover,
a:focus {
  color: var(--sh-link-hover);
  text-decoration-thickness: 2px;
}

p,
li,
dd {
  color: var(--sh-text);
}

.mw-body,
#content {
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-radius: var(--sh-radius);
  box-shadow: var(--sh-shadow);
}

.mw-body {
  max-width: var(--sh-max);
  margin: 24px auto;
  padding: 24px 28px;
}

/* Überschriften */
.firstHeading,
.mw-first-heading,
h1, h2, h3, h4 {
  color: var(--sh-text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.firstHeading,
.mw-first-heading,
h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

h2 {
  font-size: 1.45rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--sh-border);
}

h3 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
}

/* Inhaltsbereich luftiger */
#mw-content-text > * + * {
  margin-top: 0.8rem;
}

/* Listen */
ul,
ol {
  padding-left: 1.4rem;
}

/* Tabellen */
.wikitable,
table.wikitable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-radius: var(--sh-radius-sm);
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(16, 42, 67, 0.05);
}

.wikitable th,
.wikitable td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--sh-border);
  vertical-align: top;
}

.wikitable th {
  background: var(--sh-surface-soft);
  color: var(--sh-text);
  font-weight: 700;
}

.wikitable tr:last-child td {
  border-bottom: 0;
}

.wikitable tr:hover td {
  background: #f8fbfd;
}

/* Suchfelder und Inputs */
input[type="text"],
input[type="search"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea,
.oo-ui-inputWidget-input,
.oo-ui-textInputWidget input {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--sh-border-strong);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--sh-text);
  box-shadow: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input:focus,
select:focus,
textarea:focus,
.oo-ui-inputWidget-input:focus,
.oo-ui-textInputWidget input:focus {
  outline: none;
  border-color: var(--sh-accent);
  box-shadow: 0 0 0 3px rgba(18, 112, 138, 0.14);
}

/* Buttons */
button,
input[type="submit"],
input[type="button"],
.mw-htmlform-submit,
.oo-ui-buttonElement-button {
  border: 1px solid var(--sh-accent);
  background: var(--sh-accent);
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.18s ease, border-color 0.18s ease;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.mw-htmlform-submit:hover,
.oo-ui-buttonElement-button:hover {
  background: var(--sh-accent-2);
  border-color: var(--sh-accent-2);
  transform: translateY(-1px);
}

/* Suchbereich sichtbar machen */
#simpleSearch,
#searchform,
.mw-search-form-wrapper {
  position: relative;
}

#searchInput,
input[name="search"] {
  min-height: 44px;
  border-radius: 999px;
  padding-left: 16px;
  padding-right: 16px;
}

/* TOC */
#toc,
.toc {
  background: var(--sh-surface-soft);
  border: 1px solid var(--sh-border);
  border-radius: var(--sh-radius-sm);
  padding: 12px 16px;
}

#toc .toctitle,
.toc .toctitle {
  font-weight: 700;
  color: var(--sh-text);
}

/* Infoboxartige Kästen / Nachrichten */
.mw-message-box,
.ambox,
.tmbox,
.notice,
.thumbinner {
  border-radius: var(--sh-radius-sm);
}

.mw-message-box {
  border: 1px solid var(--sh-border);
  background: #f9fbfd;
}

pre,
code,
.mw-code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

pre,
code {
  background: #f4f7fa;
  border-radius: 6px;
}

pre {
  padding: 12px 14px;
  overflow: auto;
  border: 1px solid var(--sh-border);
}

/* Footer/Meta dezenter */
#footer,
.catlinks,
.printfooter,
.mw-footer,
#siteSub {
  color: var(--sh-text-soft);
}

/* Hauptinhalt bei breiteren Screens besser nutzbar */
.mw-parser-output {
  max-width: 100%;
}

/* Bilder/Thumbs schöner */
div.thumbinner,
.thumbimage {
  border-radius: 10px;
  overflow: hidden;
}

/* Sticky Überschriftenbereich – nur optisch, wenn vorhanden */
#mw-head,
.vector-header,
.skin-vector .vector-sticky-header,
.skin-vector-2022 .vector-header-container {
  backdrop-filter: saturate(180%) blur(10px);
}

/* Mobile */
@media (max-width: 768px) {
  .mw-body,
  #content {
    margin: 10px;
    padding: 16px;
    border-radius: 10px;
  }

  .firstHeading,
  .mw-first-heading,
  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .wikitable {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  #toc,
  .toc {
    padding: 10px 12px;
  }
}