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
Tag: Reverted
Line 22: Line 22:
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
   align-items: stretch;
   justify-content: space-between;
   width: 200px;
   width: 200px;
   height: 320px;
   height: 320px;
Line 30: Line 30:
   overflow: hidden;
   overflow: hidden;
   padding: 0;
   padding: 0;
  margin: 0;
  box-sizing: border-box;
}
}


.image-wrapper {
.image-wrapper {
   min-height: 50px;     /* Minimum image height */
   flex: 0 1 auto;             /* Allow image to shrink */
   max-height: 140px;     /* Preferred max */
   min-height: 50px;
   flex-shrink: 1;        /* Allows shrinking */
   max-height: 140px;
  overflow: hidden;
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
   justify-content: center;
   justify-content: center;
  overflow: hidden;
}
}


.image-wrapper img {
.image-wrapper img {
  max-width: 100%;
   max-height: 100%;
   max-height: 100%;
  max-width: 100%;
   height: auto;
   height: auto;
   width: auto;
   width: auto;
   display: block;
   display: block;
}
.name {
  font-weight: bold;
  margin: 0.5rem 0;
  text-align: center;
}
}


.card-description {
.card-description {
   flex-grow: 1;
   flex: 1 1 auto;
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
   justify-content: space-between;
   justify-content: space-between;
   padding: 0.5rem;
   padding: 0 0.75rem 0.5rem;
  font-size: 0.7em;
  color: #444;
  text-align: left;
   box-sizing: border-box;
   box-sizing: border-box;
   overflow: hidden;
   overflow: hidden;
  text-align: left;
}
}


.snippet-text {
.snippet-text {
  font-size: 0.65em;
  line-height: 1.2;
  color: #444;
  display: -webkit-box;
  -webkit-box-orient: vertical;
   overflow: hidden;
   overflow: hidden;
   text-overflow: ellipsis;
   text-overflow: ellipsis;
   display: -webkit-box;
   -webkit-line-clamp: 6; /* Adjust to balance image size vs text */
  -webkit-box-orient: vertical;
  /* No line clamp — we let flex do the work! */
}
}


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



Revision as of 02:11, 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;
  justify-content: space-between;
  width: 200px;
  height: 320px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.image-wrapper {
  flex: 0 1 auto;              /* Allow image to shrink */
  min-height: 50px;
  max-height: 140px;
  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;
}

.name {
  font-weight: bold;
  margin: 0.5rem 0;
  text-align: center;
}

.card-description {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 0.75rem 0.5rem;
  box-sizing: border-box;
  overflow: hidden;
  text-align: left;
}

.snippet-text {
  font-size: 0.65em;
  line-height: 1.2;
  color: #444;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 6; /* Adjust to balance image size vs text */
}

.read-more {
  font-size: 0.6em;
  font-weight: bold;
  color: #007acc;
  text-align: left;
  padding-top: 0.4rem;
  flex-shrink: 0;
}

.no-display {
  display: none;
}