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: Difference between revisions

MediaWiki interface page
No edit summary
No edit summary
 
(17 intermediate revisions by the same user not shown)
Line 31: Line 31:
.card {
.card {
   flex: 0 0 200px;
   flex: 0 0 200px;
  height: auto; /* ensure it sizes naturally */
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
   background: var(--card-bg);
   background: var(--card-bg);
   color: var(--card-text);
   color: var(--card-text);
   border: 1px solid var(--border-color-base); /* ← Outline here */
   border: 1px solid var(--border-color-base);
   border-radius: 10px;
   border-radius: 10px;
   overflow: hidden;
   overflow: hidden;
   box-shadow: 0 0px 0px rgba(0, 0, 0, 0);
   box-shadow: 0 0px 0px rgba(0, 0, 0, 0);
   transition: box-shadow 0.25s ease-in-out, transform 0.2s ease-in-out;
   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;
}
}


Line 46: Line 57:
   transform: translateY(-3px);
   transform: translateY(-3px);
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  border-color: var(--card-link);
}
}


Line 52: Line 64:
   height: 160px;
   height: 160px;
   overflow: hidden;
   overflow: hidden;
  position: relative;
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
Line 68: Line 81:
   max-width: 100%;
   max-width: 100%;
   object-fit: contain;
   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 {
.card-content {
  padding: 0.8rem;
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
  padding: 0.8rem;
  gap: 0.5rem;
  flex: 1; /* Take up remaining space below image */
}
}


.card-title {
.card-title {
  font-size: 1rem;
   font-weight: bold;
   font-weight: bold;
   font-size: 1rem;
   color: var(--card-text);
   color: var(--card-link);
  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;
}
}


Line 87: Line 127:
   line-height: 1.4;
   line-height: 1.4;
   display: -webkit-box;
   display: -webkit-box;
   -webkit-line-clamp: 5;
   -webkit-line-clamp: 6;
   -webkit-box-orient: vertical;
   -webkit-box-orient: vertical;
   overflow: hidden;
   overflow: hidden;
   text-overflow: ellipsis;
   text-overflow: ellipsis;
   white-space: normal; /* Allow natural wrapping */
   white-space: normal;
  word-wrap: break-word;
   overflow-wrap: anywhere;
   overflow-wrap: anywhere;
  flex-grow: 1;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}
}


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


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


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


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



Latest revision as of 18:09, 31 May 2025

/* 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;
}