MediaWiki:Common.css: Difference between revisions

No edit summary
No edit summary
 
(17 intermediate revisions by the same user not shown)
Line 766: Line 766:
   cursor: pointer;
   cursor: pointer;
   padding: 6px 8px;
   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;
}
}