MediaWiki

Common.css

From Shadow Era Wiki

Revision as of 05:44, 7 September 2024 by Blopi (Talk | contribs)

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: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Clear the cache in Tools → Preferences
/* CSS placed here will be applied to all skins */
/* wikitable/prettytable */
table.wikitable,
table.prettytable {
    margin: 13px 13px 13px 0;
    background: #f9f9f9;
    border: 1px #aaa solid;
    border-collapse: collapse;
}
.wikitable > tr > th, .wikitable > tr > td,
.wikitable > * > tr > th, .wikitable > * > tr > td,
.prettytable > tr > th, .prettytable > tr > td,
.prettytable > * > tr > th, .prettytable > * > tr > td {
    border: 1px #aaa solid;
    padding: 3px;
}
.wikitable > tr > th, .wikitable > * > tr > th,
.prettytable > tr > th, .prettytable > * > tr > th {
    background: #f2f2f2;
    text-align: center;
}
.wikitable > caption,
.prettytable > caption {
    font-weight: bold;
}
 
/* Code below added by blopi */
/* style the backtick text */
.backtick-style {
    font-family: monospace;
    background-color: #f8f9fa;
    padding: 0.2em 0.4em;
    border: 1px solid #d1d5da;
    border-radius: 3px;
}
/* Style parentheses (like () ) */
.csharp.source-csharp .br0 {
    color: hsl(32, 93%, 66%) !important;  /* Orange for parentheses */
}
 
/* Style comments */
.csharp.source-csharp .co1 {
    color: hsl(221, 12%, 69%) !important;  /* Light blue for comments */
}
 
/* Style kw1 keywords (main keywords like public, class, etc.) */
.csharp.source-csharp .kw1 {
    color: hsl(357, 75%, 77%) !important;  /* Light red color */
}
 
/* Style additional keywords (kw3) */
.csharp.source-csharp .kw3 {
    color: hsl(300, 30%, 68%) !important;  /* Pink for keyword uniformity */
}
 
/* Style kw4 keywords (other keywords) */
.csharp.source-csharp .kw4 {
    color: hsl(300, 30%, 68%) !important;  /* Same pink color for uniformity */
}
 
/* Style methods (functions like UnhighlightCards, SetGameState) */
.csharp.source-csharp .me1 {
    color: hsl(210, 50%, 60%) !important;  /* Light blue for methods */
}
 
/* Style numbers */
.csharp.source-csharp .nu0 {
    color: hsl(32, 93%, 66%) !important;  /* Orange for numbers */
}
 
/* Style symbols (like ;, =, <, >, .) */
.csharp.source-csharp .sy0 {
    color: hsl(57, 93%, 66%) !important;  /* Yellow for symbols */
}
 
/* Style strings */
.csharp.source-csharp .st0 {
    color: hsl(114, 31%, 68%) !important;  /* Light green for strings */
}
 
/* Background and general text color for code blocks */
.syntaxhighlight {
    background-color: hsl(210, 15%, 22%) !important;  /* Background */
    color: hsl(219, 28%, 88%) !important;  /* General text color */
}
 
/* Make code blocks responsive on mobile */
pre, code, .syntaxhighlight {
    white-space: pre-wrap; /* Allow line breaks */
    word-wrap: break-word; /* Allow long words to break */
    max-width: 100%; /* Ensure blocks don't exceed screen width */
}
 
/* Make code blocks responsive on mobile */
pre, code, .syntaxhighlight {
    white-space: pre-wrap !important; /* Allow line breaks */
    word-wrap: break-word !important; /* Allow long words to break */
    max-width: 100% !important; /* Ensure blocks don't exceed screen width */
}
 
/* Force tables to be responsive */
table {
    width: 100% !important; /* Ensure tables don't exceed the screen width */
    table-layout: auto !important; /* Allow columns to adjust automatically */
    word-wrap: break-word !important; /* Force line breaks within the table */
}
 
/* Specific styles for small screens */
@media only screen and (max-width: 600px) {
    table {
        display: block; /* Allow horizontal scrolling for tables */
        overflow-x: auto; /* Enable horizontal scroll if necessary */
    }
    pre, code, .syntaxhighlight {
        font-size: 12px !important; /* Reduce font size in code blocks */
    }
}
 
/* Apply flexible layout for tables with code blocks */
.code-table {
    width: 100% !important;
    table-layout: auto !important;
}
 
/* Adjust spacing for nested lists */
ul ul, ol ol {
    margin-top: 0 !important; /* Remove top margin for nested lists */
    margin-bottom: 0 !important; /* Remove bottom margin for nested lists */
    padding-left: 5px !important; /* Reduce padding for nested lists to bring them closer to parent */
}
 
/* Adjust line height and padding for all list items */
li {
    line-height: 1.8 !important; /* Keep adjusted line height */
    padding-left: 0 !important; /* Remove extra padding on all list items */
}
 
/* More specific targeting for MediaWiki content */
.mw-content-ltr ul ul, .mw-content-ltr ol ol {
    padding-left: 5px !important; /* Reduce padding for nested lists in wiki content */
}