MediaWiki:Common.css
Jump to navigation
Jump to search
Note: After saving, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
// Create a new style element const style = document.createElement('style'); // Add CSS rules to the style element style.innerText += ` /* Set basic styles for tables with the class 'wikitable' */ table.wikitable { 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 */ table.wikitable th { background-color: #343434 !important; /* Match content background color */ color: #e6e6e6 !important; /* Match 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 */ table.wikitable td { background-color: #252525 !important; /* Match body background color */ 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 */ table.wikitable tr:nth-child(even) td { background-color: #343434 !important; /* Match content background color */ } /* Set styles for links within the table */ table.wikitable a { color: #90b7f9 !important; /* Match link color */ } /* Set styles for visited links */ table.wikitable a:visited { color: #7a94bf !important; /* Adjusted for contrast */ } /* Set styles for hovered links */ table.wikitable a:hover { color: #c70039 !important; /* Match hover link color */ text-decoration: underline; /* Underline links on hover */ } `; // Append the style element to the document's head document.head.appendChild(style);