Jump to content

MediaWiki:Common.CSS: Difference between revisions

From The Odd fellows Wiki
No edit summary
Tag: Reverted
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
/* =========================================
/* =========================================
   GLOBAL WIKI STYLES
   GLOBAL WIKI STYLES
  Applied to all skins
   ========================================= */
   ========================================= */


:root {
/* Link colors */
    --bg: #f5f1e8;
    --panel: #fcfaf6;
    --border: #c9bea8;
 
    --text: #222;
    --muted: #666;
 
    --link: #2f5fa7;
    --link-hover: #4a7fd1;
    --link-visited: #6d5ca8;
 
    --new-link: #b33;
    --new-link-visited: #8a5555;
 
    --heading: #3a2f1f;
}
 
/* =========================================
  BODY + TYPOGRAPHY
  ========================================= */
 
body,
.vector-body,
.mw-body {
    background: var(--bg);
    color: var(--text);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    line-height: 1.7;
}
 
/* Main content area */
.mw-parser-output {
    max-width: 1000px;
}
 
/* =========================================
  HEADINGS
  ========================================= */
 
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--heading);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-weight: bold;
    letter-spacing: 0.3px;
}
 
h1 {
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.25em;
}
 
h2 {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.2em;
}
 
/* =========================================
  LINKS
  ========================================= */
 
a {
a {
     color: var(--link) !important;
     color: #2f7fff !important;
    text-decoration: none;
}
}


a:visited {
a:visited {
     color: var(--link-visited) !important;
     color: #7a5cff !important;
}
}


a:hover {
a:hover {
     color: var(--link-hover) !important;
     color: #5aa0ff !important;
     text-decoration: underline;
     text-decoration: underline;
}
}
a.new {
a.new {
     color: var(--new-link) !important;
     color: #d33 !important;
}
}


a.new:visited {
a.new:visited {
     color: var(--new-link-visited) !important;
     color: #b66 !important;
}
}


/* =========================================
  INFOBOXES
  ========================================= */


/* Infobox styling */
.infobox {
.infobox {
     float: right;
     float: right;
     width: 320px;
     width: 300px;
     max-width: 100%;
     max-width: 100%;
     margin: 0 0 1.2em 1.2em;
     margin: 0 0 1em 1em;
     padding: 12px;
     padding: 10px;
 
     border: 1px solid #aaa;
    background: var(--panel);
     background: #f9f9f9;
     border: 1px solid var(--border);
     border-radius: 6px;
 
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
 
     box-sizing: border-box;
     box-sizing: border-box;
}
}


.infobox th {
/* Images */
     background: #ece4d3;
img {
    color: #222;
     max-width: 100%;
    text-align: left;
     height: auto;
     padding: 6px;
}
 
.infobox td {
    padding: 6px;
}
}


/* =========================================
/* Tables */
  TABLES
  ========================================= */
 
table {
table {
    width: 100%;
     max-width: 100%;
     max-width: 100%;
     border-collapse: collapse;
     border-collapse: collapse;
    background: var(--panel);
}
th,
td {
    border: 1px solid var(--border);
    padding: 8px;
}
th {
    background: #ece4d3;
}
/* =========================================
  BLOCKQUOTES
  ========================================= */
blockquote {
    margin: 1em 0;
    padding: 0.8em 1.2em;
    border-left: 4px solid var(--border);
    background: #f0ebe0;
    color: var(--muted);
    font-style: italic;
}
/* =========================================
  IMAGES
  ========================================= */
img {
    max-width: 100%;
    height: auto;
}
}


/* =========================================
/* =========================================
   MOBILE STYLES
   MOBILE STYLES
  Vector 2022 + accessibility focused
   ========================================= */
   ========================================= */


Line 180: Line 58:


     html {
     html {
         font-size: 20px !important;
         -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
         text-size-adjust: 100%;
         text-size-adjust: 100%;
        font-size: 22px !important;
     }
     }


Line 190: Line 70:
         font-size: 1rem !important;
         font-size: 1rem !important;
         line-height: 1.8 !important;
         line-height: 1.8 !important;
         padding-left: 14px;
         padding-left: 14px;
         padding-right: 14px;
         padding-right: 14px;
         overflow-x: hidden;
         overflow-x: hidden;
        word-wrap: break-word;
         overflow-wrap: break-word;
         overflow-wrap: break-word;
         box-sizing: border-box;
         box-sizing: border-box;
    }
    p,
    li,
    td,
    th {
        font-size: 1rem !important;
        line-height: 1.8 !important;
     }
     }


     h1 {
     h1 {
         font-size: 2rem !important;
         font-size: 2.2rem !important;
        line-height: 1.2;
     }
     }


     h2 {
     h2 {
         font-size: 1.6rem !important;
         font-size: 1.8rem !important;
        line-height: 1.3;
     }
     }


     h3 {
     h3 {
         font-size: 1.3rem !important;
         font-size: 1.4rem !important;
        line-height: 1.4;
     }
     }


Line 214: Line 104:
         float: none !important;
         float: none !important;
         width: 100% !important;
         width: 100% !important;
        max-width: 100% !important;
         margin: 1em 0 !important;
         margin: 1em 0 !important;
     }
     }
Line 219: Line 110:
     table {
     table {
         display: block;
         display: block;
        width: 100%;
         overflow-x: auto;
         overflow-x: auto;
    }
    img {
        max-width: 100%;
        height: auto;
     }
     }


Line 227: Line 124:
     textarea {
     textarea {
         font-size: 1rem !important;
         font-size: 1rem !important;
    }
}
/* =========================================
  EXTRA MOBILE FIXES
  Add to bottom of stylesheet
  ========================================= */
@media screen and (max-width: 768px) {
    /* Prevent horizontal scrolling */
    html,
    body {
        width: 100%;
        overflow-x: hidden !important;
    }
    /* Main content container */
    .mw-body,
    .vector-body,
    .mw-parser-output {
        max-width: 100% !important;
        overflow-x: hidden;
    }
    /* Make tables scroll instead of breaking layout */
    table,
    .wikitable {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    /* Infobox improvements */
    .infobox {
        display: block;
        float: none !important;
        clear: both;
    }
    /* Images never overflow */
    img,
    figure,
    .thumbinner {
        max-width: 100% !important;
        height: auto !important;
    }
    /* Code/preformatted blocks */
    pre,
    code {
        overflow-x: auto;
        word-break: break-word;
    }
    /* Long links or page titles */
    a,
    span,
    div,
    p,
    li {
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    /* Search box scaling */
    input[type="search"],
    input[type="text"] {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    /* Reduce excessive side padding from Vector */
    .vector-page-toolbar,
    .vector-column-start,
    .vector-column-end {
        padding: 0 !important;
        margin: 0 !important;
    }
    /* Better touch targets */
    button,
    input,
    select,
    textarea,
    a {
        min-height: 44px;
    }
    /* Fix thumbnails */
    .thumb {
        width: 100% !important;
        margin: 1em 0 !important;
    }
    .thumb img {
        width: 100% !important;
        height: auto !important;
     }
     }
}
}

Latest revision as of 06:34, 18 May 2026

/* =========================================
   GLOBAL WIKI STYLES
   Applied to all skins
   ========================================= */

/* Link colors */
a {
    color: #2f7fff !important;
}

a:visited {
    color: #7a5cff !important;
}

a:hover {
    color: #5aa0ff !important;
    text-decoration: underline;
}
a.new {
    color: #d33 !important;
}

a.new:visited {
    color: #b66 !important;
}


/* Infobox styling */
.infobox {
    float: right;
    width: 300px;
    max-width: 100%;
    margin: 0 0 1em 1em;
    padding: 10px;
    border: 1px solid #aaa;
    background: #f9f9f9;
    box-sizing: border-box;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
}

/* Tables */
table {
    max-width: 100%;
    border-collapse: collapse;
}

/* =========================================
   MOBILE STYLES
   Vector 2022 + accessibility focused
   ========================================= */

@media screen and (max-width: 768px) {

    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
        font-size: 22px !important;
    }

    body,
    .vector-body,
    .mw-body,
    .mw-parser-output {
        font-size: 1rem !important;
        line-height: 1.8 !important;
        padding-left: 14px;
        padding-right: 14px;
        overflow-x: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
        box-sizing: border-box;
    }

    p,
    li,
    td,
    th {
        font-size: 1rem !important;
        line-height: 1.8 !important;
    }

    h1 {
        font-size: 2.2rem !important;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.8rem !important;
        line-height: 1.3;
    }

    h3 {
        font-size: 1.4rem !important;
        line-height: 1.4;
    }

    .infobox {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 1em 0 !important;
    }

    table {
        display: block;
        width: 100%;
        overflow-x: auto;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    input,
    button,
    select,
    textarea {
        font-size: 1rem !important;
    }
}






/* =========================================
   EXTRA MOBILE FIXES
   Add to bottom of stylesheet
   ========================================= */

@media screen and (max-width: 768px) {

    /* Prevent horizontal scrolling */
    html,
    body {
        width: 100%;
        overflow-x: hidden !important;
    }

    /* Main content container */
    .mw-body,
    .vector-body,
    .mw-parser-output {
        max-width: 100% !important;
        overflow-x: hidden;
    }

    /* Make tables scroll instead of breaking layout */
    table,
    .wikitable {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Infobox improvements */
    .infobox {
        display: block;
        float: none !important;
        clear: both;
    }

    /* Images never overflow */
    img,
    figure,
    .thumbinner {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Code/preformatted blocks */
    pre,
    code {
        overflow-x: auto;
        word-break: break-word;
    }

    /* Long links or page titles */
    a,
    span,
    div,
    p,
    li {
        overflow-wrap: break-word;
        word-wrap: break-word;
    }

    /* Search box scaling */
    input[type="search"],
    input[type="text"] {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Reduce excessive side padding from Vector */
    .vector-page-toolbar,
    .vector-column-start,
    .vector-column-end {
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Better touch targets */
    button,
    input,
    select,
    textarea,
    a {
        min-height: 44px;
    }

    /* Fix thumbnails */
    .thumb {
        width: 100% !important;
        margin: 1em 0 !important;
    }

    .thumb img {
        width: 100% !important;
        height: auto !important;
    }
}