Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.css

MediaWiki interface page

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* CSS placed here will be applied to all skins */

html.skin-citizen-light {
  --card-bg: rgb(221, 229, 242);
  --card-text: #222222;
  --card-link: #007acc;
}

html.skin-citizen-dark {
  --card-bg: rgb(7, 10, 15);
  --card-text: #dddddd;
  --card-link: #66c0ff;
}

.card-carousel {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding: 1rem;
  scroll-snap-type: x mandatory;
  cursor: grab;
  user-select: auto;
  white-space: nowrap;
}

.card-carousel.dragging {
  cursor: grabbing;
  user-select: none;
}

.card {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  color: var(--card-text);
  border: 1px solid var(--border-color-base);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0px 0px rgba(0, 0, 0, 0);
  transition: box-shadow 0.25s ease-in-out, transform 0.2s ease-in-out, border-color 0.2s ease;
}

.tiny-card {
  height: 65px;
}

.short-card {
  height: 200px;
}

.tall-card {
  height: 360px;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  border-color: var(--card-link);
}

.image-wrapper {
  width: 100%;
  height: 160px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--card-bg);
  text-align: center;
}

.image-wrapper * {
  margin: 0 auto;
}

.image-wrapper img {
  display: block;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.card:hover .image-wrapper img {
  transform: scale(1.05);
}

.image-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0);
  transition: background-color 0.3s ease;
  pointer-events: none;
}

.card:hover .image-wrapper::after {
  background-color: rgba(0, 0, 0, 0.05);
}

.card-content {
  display: flex;
  flex-direction: column;
  padding: 0.8rem;
  gap: 0.5rem;
  flex: 1; /* Take up remaining space below image */
}

.card-title {
  font-size: 1rem;
  font-weight: bold;
  color: var(--card-text);
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  overflow: hidden;
  max-height: calc(1.3em * 2); /* Clamp to 2 lines */
  flex-shrink: 0;
}

.card-description {
  font-size: 0.85rem;
  color: var(--card-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
  flex-grow: 1;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.card:hover .card-description {
  opacity: 1;
}

.card-readmore {
  text-align: right;
  margin-top: auto; /* ← pins it to the bottom */
  font-size: 0.85rem;
}

.card-readmore a {
  font-size: 0.85rem;
  color: var(--card-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

.card-readmore a span {
  display: inline-block;
  transition: transform 0.2s ease;
}

.card-readmore a:hover span {
  transform: translateX(4px);
}

.no-display {
  display: none;
}