Difference between revisions of "MediaWiki:Common.css"

From Filtered, Archived, Gaslit Wiki
Jump to navigation Jump to search
Line 1: Line 1:
// Create a new style element
+
/* CSS placed here will be applied to all skins */
const style = document.createElement('style');
 
  
// Add CSS rules to the style element
+
/* Set body text color */
style.innerText += `
+
body {  
  /* Set basic styles for tables with the class 'wikitable' */
+
     background: #252525;  
  table.wikitable {
+
     color: #e6e6e6 !important; /* Force text color */
     background-color: #252525 !important; /* Match body background color */
+
}
     color: #e6e6e6 !important; /* Match body text color */
 
    border: 1px solid #444241 !important; /* Border color */
 
    border-collapse: collapse !important; /* Collapse borders */
 
    width: 100%; /* Full width of the container */
 
  }
 
  
  /* Set styles for table headers */
+
/* Background color of the content and title of pages */
  table.wikitable th {
+
#content {  
     background-color: #343434 !important; /* Match content background color */
+
     background-color: #252525;  
     color: #e6e6e6 !important; /* Match text color */
+
     color: #e6e6e6 !important; /* Force text color */
    border: 2px solid #e6e6e6 !important; /* Border color for headers */
+
}
    padding: 8px; /* Padding inside header cells */
 
    text-align: left; /* Align text to the left */
 
  }
 
  
  /* Set styles for table data cells */
+
/* Sets background color of the logo area  */
  table.wikitable td {
+
#p-logo {  
     background-color: #252525 !important; /* Match body background color */
+
     background-color: #252525;  
    color: #e6e6e6 !important; /* Match text color */
+
}
    border: 2px solid #e6e6e6 !important; /* Border color for data cells */
 
    padding: 8px; /* Padding inside data cells */
 
  }
 
  
  /* Set styles for even table rows */
+
/* Navigation menu */
  table.wikitable tr:nth-child(even) td {
+
#p-navigation {  
     background-color: #343434 !important; /* Match content background color */
+
     background-color: #252525;  
  }
+
}
  
  /* Set styles for links within the table */
+
/* Table of contents */
  table.wikitable a {
+
.mw-parser-output .toc {
     color: #90b7f9 !important; /* Match link color */
+
     background-color: #343434;
  }
+
    border: 1px solid #444241;  
 +
}
  
  /* Set styles for visited links */
+
/* Headings */
  table.wikitable a:visited {
+
h1, h2, h3 {
     color: #7a94bf !important; /* Adjusted for contrast */
+
     color: #e6e6e6 !important; /* Force heading colors */
  }
+
}
  
  /* Set styles for hovered links */
+
/* Links */
  table.wikitable a:hover {
+
a {
     color: #c70039 !important; /* Match hover link color */
+
     color: #90b7f9;  
     text-decoration: underline; /* Underline links on hover */
+
}
  }
+
a:hover {
`;
+
     color: #c70039;  
 +
}
  
// Append the style element to the document's head
+
/* Top bar */
document.head.appendChild(style);
+
#mw-head {
 +
    background-color: #252525;
 +
}
 +
#mw-head a {
 +
    color: #e6e6e6 !important; /* Force link color in top bar */
 +
}
 +
 
 +
/* View, edit, history bar */
 +
#ca-view,
 +
#ca-edit,
 +
#ca-history {
 +
    background-color: #7f7f7f;
 +
    color: #e6e6e6 !important; /* Force text color */
 +
}
 +
 
 +
/* Notable members table */
 +
.notable-members {
 +
    background-color: #343434 !important;
 +
    color: #e6e6e6 !important;
 +
}
 +
.notable-members th, .notable-members td {
 +
    border: 2px solid #e6e6e6;
 +
    color: #e6e6e6 !important; /* Force cell text color */
 +
}

Revision as of 19:49, 4 May 2025

/* CSS placed here will be applied to all skins */

/* Set body text color */
body { 
    background: #252525; 
    color: #e6e6e6 !important; /* Force text color */
}

/* Background color of the content and title of pages */
#content { 
    background-color: #252525; 
    color: #e6e6e6 !important; /* Force text color */
}

/* Sets background color of the logo area  */
#p-logo { 
    background-color: #252525; 
}

/* Navigation menu */
#p-navigation { 
    background-color: #252525; 
}

/* Table of contents */
.mw-parser-output .toc {
    background-color: #343434; 
    border: 1px solid #444241; 
}

/* Headings */
h1, h2, h3 {
    color: #e6e6e6 !important; /* Force heading colors */
}

/* Links */
a {
    color: #90b7f9; 
}
a:hover {
    color: #c70039; 
}

/* Top bar */
#mw-head {
    background-color: #252525; 
}
#mw-head a {
    color: #e6e6e6 !important; /* Force link color in top bar */
}

/* View, edit, history bar */
#ca-view, 
#ca-edit, 
#ca-history {
    background-color: #7f7f7f; 
    color: #e6e6e6 !important; /* Force text color */
}

/* Notable members table */
.notable-members {
    background-color: #343434 !important; 
    color: #e6e6e6 !important; 
}
.notable-members th, .notable-members td {
    border: 2px solid #e6e6e6; 
    color: #e6e6e6 !important; /* Force cell text color */
}