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
Tag: Reverted
No edit summary
Tags: Manual revert Reverted
Line 22: Line 22:
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
   justify-content: space-between;
   align-items: center;
   width: 200px;
   width: 200px;
   height: 320px;
   height: 320px; /* uniform height */
   background: #fff;
   background: #fff;
   border: 1px solid #ccc;
   border: 1px solid #ccc;
Line 31: Line 31:
   padding: 0;
   padding: 0;
   margin: 0;
   margin: 0;
  box-sizing: border-box;
}
}


.image-wrapper {
.image-wrapper {
   flex: 0 1 auto;             /* Allow image to shrink */
   max-height: 140px; /* allows room for text below */
   min-height: 50px;
   flex-shrink: 1;     /* allow it to shrink when space is tight */
  max-height: 140px;
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
Line 52: Line 50:
}
}


.name {
.card-carousel .card .card-description  {
   font-weight: bold;
   font-size: 0.3em !important;  /* force override */
   margin: 0.5rem 0;
  color: #444;
   margin-top: 0.5rem;
   text-align: center;
   text-align: center;
}
   padding: 0 0.5rem;
 
   white-space: normal;
.card-description {
   overflow-wrap: anywhere;
   flex: 1 1 auto;
   word-break: break-word;
   display: flex;
   width: 100%;
   flex-direction: column;
   justify-content: space-between;
   padding: 0 0.75rem 0.5rem;
   box-sizing: border-box;
   box-sizing: border-box;
   overflow: hidden;
   flex-grow: 1;
   text-align: left;
   overflow: visible;
}
}


.snippet-text {
.snippet-text {
  font-size: 0.65em;
  line-height: 1.2;
  color: #444;
   display: -webkit-box;
   display: -webkit-box;
  -webkit-line-clamp: 5;
   -webkit-box-orient: vertical;
   -webkit-box-orient: vertical;
   overflow: hidden;
   overflow: hidden;
   text-overflow: ellipsis;
   line-height: 1.3;
   -webkit-line-clamp: 6; /* Adjust to balance image size vs text */
   font-size: 0.5em;
  text-align: center;
}
}


.read-more {
.card-description * {
   font-size: 0.6em;
   white-space: normal !important;
   font-weight: bold;
   overflow-wrap: anywhere !important;
   color: #007acc;
   word-break: break-word !important;
  text-align: left;
  padding-top: 0.4rem;
  flex-shrink: 0;
}
}



Revision as of 02:16, 25 May 2025

/* CSS placed here will be applied to all skins */

.card-carousel {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start; /* critical: lets tall cards grow down, not squish */
  overflow-x: auto;
  gap: 1rem;
  padding: 1rem;
}

.card-carousel::-webkit-scrollbar {
  height: 6px;
}
.card-carousel::-webkit-scrollbar-thumb {
  background: #999;
  border-radius: 3px;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 200px;
  height: 320px; /* uniform height */
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

.image-wrapper {
  max-height: 140px; /* allows room for text below */
  flex-shrink: 1;     /* allow it to shrink when space is tight */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.image-wrapper img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
  display: block;
}

.card-carousel .card .card-description  {
  font-size: 0.3em !important;  /* force override */
  color: #444;
  margin-top: 0.5rem;
  text-align: center;
  padding: 0 0.5rem;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  width: 100%;
  box-sizing: border-box;
  flex-grow: 1;
  overflow: visible;
}

.snippet-text {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  font-size: 0.5em;
  text-align: center;
}

.card-description * {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.no-display {
  display: none;
}