MediaWiki:Common.css: Difference between revisions

No edit summary
No edit summary
 
(39 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* CSS placed here will be applied to all skins */
/** Slim donation banner **/
.icelist-donate-banner {
    background: #fff8f8;
    border-bottom: 1px solid #e7bcbc;
    text-align: center;
    padding: 6px 0;
    font-size: 0.85em;
}
.icelist-donate-banner a {
    font-weight: bold;
}
/* Hide username, talk link, and notification bell in the personal toolbar */
/* Hide username, talk link, and notification bell in the personal toolbar */
#pt-userpage,  
#pt-userpage,  
Line 321: Line 310:
}
}


/* === Primary Donation Top Notice === */
/* === ICE List Site Notice (Stable, No JS Dependency) === */
#donate-top-notice {
 
#siteNotice {
   background: #f2f2f2;
   background: #f2f2f2;
   border-bottom: 1px solid #d6d6d6;
   border-bottom: 1px solid #d0d0d0;
  padding: 20px 24px;
  font-size: 17px;
  line-height: 1.5;
  position: relative;
 
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
 
/* Headline emphasis */
#siteNotice strong {
   font-size: 18px;
   font-size: 18px;
  font-weight: 700;
}
/* Donate button styling (wikitext link) */
#siteNotice a {
  display: inline-block;
  margin-left: 12px;
  padding: 8px 16px;
  background: #e03a2d;
  color: #fff !important;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
}
#siteNotice a:hover {
  background: #c83227;
}
/* Mobile adjustments */
@media (max-width: 720px) {
  #siteNotice {
    padding: 16px 14px;
    font-size: 16px;
  }
  #siteNotice a {
    display: block;
    margin: 12px auto 0;
    width: fit-content;
  }
}
/* Close button for ICE List notice */
.icelist-notice-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  color: #666;
}
.icelist-notice-close:hover {
  color: #000;
}
/* Left text block */
#siteNotice > *:first-child {
  flex: 1;
  text-align: left;
}
/* Donate button on the right */
#siteNotice a {
  flex-shrink: 0;
  margin-left: 20px;
}
@media (max-width: 720px) {
  #siteNotice {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  #siteNotice a {
    margin-left: 0;
    align-self: center;
  }
}
/* Layout siteNotice as two columns: text left, CTA right */
#siteNotice {
  display: flex;
  align-items: center;
  gap: 20px;
}
/* Let text take available space */
#siteNotice > *:not(a) {
  flex: 1 1 auto;
}
/* Keep donate button fixed on the right */
#siteNotice a {
  flex: 0 0 auto;
  white-space: nowrap;
}
/* === FINAL OVERRIDE: ICE List siteNotice layout === */
/* This block intentionally overrides all previous #siteNotice rules */
#siteNotice {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px !important;
}
/* Text (everything except Donate + X) */
#siteNotice > :not(a):not(.icelist-notice-close) {
  flex: 1 1 auto !important;
}
/* Donate button */
#siteNotice a {
  flex: 0 0 auto !important;
  margin-left: 24px !important;
  white-space: nowrap !important;
}
}


#donate-top-notice .donate-notice-inner {
/* === FINAL FIX: siteNotice layout using CSS Grid === */
  max-width: 1300px;
 
  margin: 0 auto;
#siteNotice {
  padding: 22px 64px 22px 24px;
   display: grid !important;
   display: grid;
   grid-template-columns: 1fr auto;
   grid-template-columns: auto 1fr auto;
   align-items: center;
   align-items: center;
   gap: 28px;
   column-gap: 24px;
}
}


/* Title */
/* Ensure donate button stays in the right column */
#donate-top-notice .donate-title {
#siteNotice a {
   font-weight: 700;
   grid-column: 2;
   font-size: 20px;
   justify-self: end;
  color: #111;
   white-space: nowrap;
   white-space: nowrap;
}
}


/* Body text */
/* Close button stays top-right */
#donate-top-notice .donate-text {
.icelist-notice-close {
   color: #333;
  position: absolute;
  top: 10px;
  right: 14px;
}
 
/* ICE List notice table */
.icelist-notice-table {
  width: 100%;
  background: #f3f3f3;
  border-bottom: 1px solid #d0d0d0;
  padding: 12px 16px;
  border-collapse: collapse;
}
 
.icelist-notice-table td {
   vertical-align: middle;
  font-size: 16px;
   line-height: 1.4;
   line-height: 1.4;
}
}


/* Donate button */
.icelist-notice-table td:last-child a {
#donate-top-notice .donate-btn {
   background: #e5392d;
   background: #f3332b;
   color: #fff !important;
   color: #fff;
   padding: 8px 16px;
   padding: 12px 22px;
   border-radius: 6px;
   border-radius: 10px;
  font-weight: 600;
   text-decoration: none;
   text-decoration: none;
   font-weight: 700;
   white-space: nowrap;
   font-size: 16px;
}
 
.icelist-notice-table td:last-child a:hover {
  background: #cc2f25;
}
 
/* Remove internal separator line in site notice table */
#siteNotice .icelist-notice-table,
#siteNotice .icelist-notice-table td {
   border: none !important;
}
/* Hide Anonnotice container for logged-in users */
body.mw-logged-in #siteNotice {
  display: none;
}
 
/* ICE List — Anon donate banner styling
  Only activates when Common.js adds .icelist-donate-notice */
#siteNotice.icelist-donate-notice {
  background: #f2f2f2;
  border: 1px solid #dedede;
  border-radius: 8px;
  padding: 18px 20px;
  margin: 16px 0;
  position: relative;
  overflow: hidden;
}
 
/* Kill random separators/underlines that sometimes appear inside notices */
#siteNotice.icelist-donate-notice hr,
#siteNotice.icelist-donate-notice .mw-parser-output hr {
  display: none !important;
}
}


#donate-top-notice .donate-btn:hover {
/* Keep the text left, and reserve space on the right for the button + X */
   opacity: 0.9;
#siteNotice.icelist-donate-notice .mw-parser-output > p,
#siteNotice.icelist-donate-notice p {
   margin: 0 !important;
  padding-right: 190px; /* space for Donate button + close X */
  line-height: 1.35;
  font-size: 18px;
}
}


/* Close button */
/* Make the Donate link a button and pin it to the right */
#donate-top-notice #donate-notice-close {
#siteNotice.icelist-donate-notice a[href*="ICE_List_Wiki:Donate"],
#siteNotice.icelist-donate-notice a[href*="title=ICE_List_Wiki:Donate"] {
   position: absolute;
   position: absolute;
   right: 18px;
   right: 56px;
   top: 50%;
   top: 50%;
   transform: translateY(-50%);
   transform: translateY(-50%);
  background: #e23b2e;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none !important;
  padding: 12px 18px;
  border-radius: 10px;
  white-space: nowrap;
}
#siteNotice.icelist-donate-notice a[href*="ICE_List_Wiki:Donate"]:hover {
  filter: brightness(0.95);
}
/* Close (X) button */
#siteNotice.icelist-donate-notice .icelist-notice-close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
   background: transparent;
   background: transparent;
   border: none;
   font-size: 26px;
   font-size: 24px;
   line-height: 34px;
  cursor: pointer;
   color: #666;
   color: #666;
  cursor: pointer;
}
}


#donate-top-notice #donate-notice-close:hover {
#siteNotice.icelist-donate-notice .icelist-notice-close:hover {
   color: #000;
  background: rgba(0,0,0,0.06);
  color: #111;
}
 
/* Prevent the “blank grey bar” effect when #siteNotice is empty */
#siteNotice:empty {
  display: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
 
#siteNotice.icelist-donate-notice {
  display: flex;
  align-items: center;
  gap: 16px;
}
 
#siteNotice.icelist-donate-notice .mw-parser-output,
#siteNotice.icelist-donate-notice p {
  flex: 1 1 auto;
  margin: 0 !important;
  padding: 0 !important;
}
 
#siteNotice.icelist-donate-notice a[href*="ICE_List_Wiki:Donate"] {
  position: static;
  margin-left: auto;
}
 
#siteNotice.icelist-donate-notice a[href*="ICE_List_Wiki:Donate"] {
  align-self: center;
}
 
#siteNotice.icelist-donate-notice {
  padding-top: 16px;
  padding-bottom: 16px;
}
#siteNotice.icelist-donate-notice {
  display: flex;
  align-items: center;
  gap: 16px;
}
 
#siteNotice.icelist-donate-notice .donate-btn {
  margin-left: auto;
  align-self: center;
}
 
#siteNotice.icelist-donate-notice {
   display: flex;
  align-items: center;
  gap: 16px;
}
}


/* Mobile */
#siteNotice.icelist-donate-notice .donate-btn {
@media (max-width: 800px) {
  margin-left: auto;
  #donate-top-notice .donate-notice-inner {
}
    grid-template-columns: 1fr;
    gap: 12px;
    padding-right: 48px;
  }


  #donate-top-notice .donate-title {
#siteNotice.icelist-donate-notice .icelist-notice-close {
    font-size: 18px;
  margin-left: 8px;
  }
}
}


/* === ICE List Donate SiteNotice === */
#siteNotice {
#siteNotice {
   background: #f2f2f2;
   display: flex;
   border-bottom: 1px solid #d0d0d0;
  align-items: center;
   padding: 18px 24px;
  gap: 16px;
   font-size: 17px;
}
   line-height: 1.5;
 
   text-align: center;
#siteNotice .donate-btn {
  margin-left: auto;
}
 
#siteNotice .icelist-notice-close {
   margin-left: 8px;
}
 
/* ICE List – anon donate banner (scoped) */
#siteNotice.icelist-anon-donate {
  display: flex;
  align-items: center;
  gap: 16px;
   padding: 14px 16px;
  background: #f3f3f3;
   border: 1px solid #d8d8d8;
  border-radius: 10px;
}
 
/* Keep the text as a flexible left column */
#siteNotice.icelist-anon-donate .icelist-donate-cta {
   margin-left: auto; /* pushes donate to the right */
   flex: 0 0 auto;
}
}


/* Make the headline stand out */
/* Style the Donate link as a button */
#siteNotice strong {
#siteNotice.icelist-anon-donate a.icelist-donate-btn {
   font-size: 18px;
   display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  background: #e44335;
  color: #fff;
  text-decoration: none;
   font-weight: 700;
   font-weight: 700;
}
}


/* Style the Donate link like a button */
#siteNotice.icelist-anon-donate a.icelist-donate-btn:hover {
#siteNotice a {
  filter: brightness(0.95);
}
 
/* Close button */
#siteNotice.icelist-anon-donate .icelist-notice-close {
   margin-left: 10px;
   margin-left: 10px;
   padding: 8px 14px;
  background: transparent;
   background: #e03a2d;
  border: 0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}
 
#siteNotice.icelist-anon-donate .icelist-notice-close:hover {
  opacity: 1;
}
 
/* Prevent empty notice bars if other CSS exists */
#siteNotice:empty {
  display: none;
}
 
#siteNotice.icelist-anon-donate {
  position: relative;
}
 
#siteNotice.icelist-anon-donate .icelist-notice-close{
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 9999;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
   padding: 6px 8px;
}
/* ICE List anon notice — ONLY when JS marks it */
#siteNotice.icelist-anon-donate{
  margin: 12px auto;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f3f3f3;
  border: 1px solid rgba(0,0,0,0.08);
  position: relative;
}
 
/* Make your table behave like a clean banner row */
#siteNotice.icelist-anon-donate .icelist-notice-table{
  width: 100%;
  border-collapse: collapse;
}
 
#siteNotice.icelist-anon-donate .icelist-notice-table > tbody > tr{
  display: flex;
  gap: 16px;
  align-items: center;
}
 
#siteNotice.icelist-anon-donate .icelist-notice-table > tbody > tr > td:first-child{
  flex: 1;
  padding-right: 12px;
}
 
/* Donate button */
#siteNotice.icelist-anon-donate .icelist-donate-btn{
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
   background: #e53935;
   color: #fff !important;
   color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  white-space: nowrap;
}
/* Close button (top right) */
#siteNotice.icelist-anon-donate .icelist-notice-close{
  position: absolute;
  top: 6px;
  right: 10px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 8px;
}
/* Baseline anon notice styling (only when JS marks it) */
#siteNotice.icelist-anon-donate{
  background: #f3f3f3;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 12px auto;
  position: relative;
}
/* Close button always visible */
#siteNotice.icelist-anon-donate .icelist-notice-close{
  position: absolute;
  top: 6px;
  right: 10px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 8px;
}
#mw-dismissable-notice-dismiss {
  all: unset;                /* wipe inherited button styles */
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: #999;
  padding: 6px;
}
#mw-dismissable-notice-dismiss:hover {
  color: #000;
}
#mw-dismissable-notice-dismiss {
  position: absolute;
  top: 10px;
  right: 12px;
}
#mw-dismissable-notice-dismiss {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  color: #999 !important;
  padding: 6px !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  border-radius: 0 !important;
  cursor: pointer;
}
#mw-dismissable-notice-dismiss:hover {
  color: #000 !important;
}
#mw-dismissable-notice-dismiss {
  opacity: 0.6 !important;
}
#mw-dismissable-notice-dismiss:hover {
  opacity: 1 !important;
}
/* Kill ALL visual styling on dismiss link */
#mw-dismissable-notice-dismiss {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  height: auto !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
}
/* Replace it visually with a pseudo-element */
#mw-dismissable-notice-dismiss::after {
  content: "×";
  color: #999;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
/* Hover state */
#mw-dismissable-notice-dismiss:hover::after {
  color: #000;
}
.mw-dismissable-notice-close a {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  color: #999;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
   text-decoration: none;
   text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  white-space: nowrap;
}
}


#siteNotice a:hover {
#siteNotice .mw-dismissable-notice-close > a {
   background: #c83227;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: #999 !important;
  font-size: 20px !important;
}
 
#siteNotice.mw-dismissed {
  display: none;
}
 
/* When DismissableSiteNotice hides the notice with visibility:hidden,
  also collapse the layout so no grey bar remains. */
#siteNotice .mw-dismissable-notice-close[style*="visibility: hidden"] {
  display: none !important;
}
 
/* If the notice wrapper is otherwise empty/hidden, kill its spacing */
#siteNotice {
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}
 
/* Rounded corners + subtle elevation for dismissable site notice */
#siteNotice > .mw-dismissable-notice {
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
   background: #f3f3f3;
  overflow: hidden;
}
 
#siteNotice {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
}
 
/* Make the dismissable notice be the single full-width visual box */
#siteNotice {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
}
 
#siteNotice > .mw-dismissable-notice {
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 12px 0 !important;            /* no auto-centering gaps */
  padding: 18px 20px !important;
  background: #f3f3f3 !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08) !important;
  position: relative !important;        /* anchor X positioning */
  overflow: hidden !important;          /* keeps corners clean */
}
 
/* Put the X in the top-right of the BOX (not the page/grid) */
#siteNotice > .mw-dismissable-notice .mw-dismissable-notice-close {
  position: absolute !important;
  top: 10px !important;
  right: 12px !important;
  z-index: 5 !important;
}
}


/* Mobile spacing */
/* Make sure the close link isn't inheriting your Donate button styles */
@media (max-width: 720px) {
#siteNotice > .mw-dismissable-notice .mw-dismissable-notice-close a {
   #siteNotice {
   all: unset !important;
    padding: 16px 14px;
  cursor: pointer !important;
    font-size: 16px;
  font-size: 20px !important;
   }
   font-weight: 700 !important;
  line-height: 1 !important;
  color: #888 !important;
  padding: 6px !important;
}
#siteNotice > .mw-dismissable-notice .mw-dismissable-notice-close a:hover {
  color: #222 !important;
}


  #siteNotice a {
/* Optional: stop the text running under the X */
    display: inline-block;
#siteNotice > .mw-dismissable-notice .mw-dismissable-notice-body {
    margin-top: 10px;
  padding-right: 40px !important;
  }
}
}