MediaWiki:Common.css: Difference between revisions

No edit summary
No edit summary
 
(41 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 320: Line 309:
   vertical-align: top;
   vertical-align: top;
}
}
#donate-top-notice{
 
   background:#f3332b;
/* === ICE List Site Notice (Stable, No JS Dependency) === */
   color:#fff;
 
   font-size:16px;
#siteNotice {
   line-height:1.4;
   background: #f2f2f2;
   border-bottom:3px solid rgba(0,0,0,.15);
   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-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;
}
}
.donate-notice-inner{
 
  max-width:1200px;
/* Mobile adjustments */
   margin:0 auto;
@media (max-width: 720px) {
  padding:14px 44px 14px 16px;
   #siteNotice {
   display:flex;
    padding: 16px 14px;
  align-items:center;
    font-size: 16px;
  gap:14px;
   }
 
  #siteNotice a {
    display: block;
    margin: 12px auto 0;
    width: fit-content;
  }
}
}
.donate-notice-inner strong{
 
   font-weight:700;
/* 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;
}
}
.donate-notice-inner span{
 
   flex:1;
.icelist-notice-close:hover {
  opacity:.95;
   color: #000;
}
}
.donate-btn{
 
  background:#fff;
/* Left text block */
  color:#111;
#siteNotice > *:first-child {
  padding:8px 14px;
   flex: 1;
   border-radius:8px;
   text-align: left;
   text-decoration:none;
  font-weight:600;
}
}
#donate-notice-close{
 
  position:absolute;
/* Donate button on the right */
  right:10px;
#siteNotice a {
  top:50%;
   flex-shrink: 0;
   transform:translateY(-50%);
   margin-left: 20px;
  background:transparent;
  border:0;
   color:#fff;
  font-size:22px;
  cursor:pointer;
}
}
@media (max-width:720px){
 
   .donate-notice-inner{
@media (max-width: 720px) {
     flex-wrap:wrap;
   #siteNotice {
     gap:10px;
     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;
}
/* === FINAL FIX: siteNotice layout using CSS Grid === */
#siteNotice {
  display: grid !important;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 24px;
}
/* Ensure donate button stays in the right column */
#siteNotice a {
  grid-column: 2;
  justify-self: end;
  white-space: nowrap;
}
/* Close button stays top-right */
.icelist-notice-close {
  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;
}
.icelist-notice-table td:last-child a {
  background: #e5392d;
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.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;
}
/* Keep the text left, and reserve space on the right for the button + X */
#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;
}
/* Make the Donate link a button and pin it to the right */
#siteNotice.icelist-donate-notice a[href*="ICE_List_Wiki:Donate"],
#siteNotice.icelist-donate-notice a[href*="title=ICE_List_Wiki:Donate"] {
  position: absolute;
  right: 56px;
  top: 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;
  font-size: 26px;
  line-height: 34px;
  cursor: pointer;
  color: #666;
}
#siteNotice.icelist-donate-notice .icelist-notice-close:hover {
  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;
}
#siteNotice.icelist-donate-notice .donate-btn {
  margin-left: auto;
}
#siteNotice.icelist-donate-notice .icelist-notice-close {
  margin-left: 8px;
}
#siteNotice {
  display: flex;
  align-items: center;
  gap: 16px;
}
#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;
}
/* Style the Donate link as a button */
#siteNotice.icelist-anon-donate a.icelist-donate-btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  background: #e44335;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
#siteNotice.icelist-anon-donate a.icelist-donate-btn:hover {
  filter: brightness(0.95);
}
/* Close button */
#siteNotice.icelist-anon-donate .icelist-notice-close {
  margin-left: 10px;
  background: transparent;
  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;
  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;
}
#siteNotice .mw-dismissable-notice-close > a {
  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;
}
/* Make sure the close link isn't inheriting your Donate button styles */
#siteNotice > .mw-dismissable-notice .mw-dismissable-notice-close a {
  all: unset !important;
  cursor: pointer !important;
  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;
}
/* Optional: stop the text running under the X */
#siteNotice > .mw-dismissable-notice .mw-dismissable-notice-body {
  padding-right: 40px !important;
}
}