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
Line 3: Line 3:
.card-carousel {
.card-carousel {
   display: flex;
   display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start; /* critical: lets tall cards grow down, not squish */
   overflow-x: auto;
   overflow-x: auto;
   gap: 1rem;
   gap: 1rem;
Line 17: Line 20:


.card {
.card {
  padding: 0;
  margin: 0;
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
   align-items: center;
   align-items: center;
   gap: 0.5rem; /* or adjust spacing between elements */
   width: 200px;
  background: #fff;
   border: 1px solid #ccc;
   border: 1px solid #ccc;
   border-radius: 6px;
   border-radius: 6px;
   overflow: hidden;
   overflow: hidden;
   background-color: #fff;
   padding: 0;
   width: 200px; /* or your desired width */
   margin: 0;
}
}


Line 49: Line 51:
   padding: 0 0.5rem;
   padding: 0 0.5rem;
   white-space: normal;
   white-space: normal;
  overflow-wrap: anywhere;
   word-break: break-word;
   word-break: break-word;
  overflow-wrap: break-word;


   display: -webkit-box;
   display: -webkit-box;
Line 57: Line 59:
   overflow: hidden;
   overflow: hidden;


   width: 100%; /* Ensure it stays within card width */
   width: 100%;
   box-sizing: border-box;
   box-sizing: border-box;
  max-height: none !important;
  height: auto !important;
}
}



Revision as of 01:33, 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;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

.image-wrapper {
  padding: 0;
  margin: 0;
  line-height: 0; /* removes spacing from inline image rendering */
}

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

.card-description {
  font-size: 0.75em;
  color: #444;
  margin-top: 0.5rem;
  text-align: center;
  padding: 0 0.5rem;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;

  width: 100%;
  box-sizing: border-box;

  max-height: none !important;
  height: auto !important;
}

.no-display {
  display: none;
}