MediaWiki:Common.css: Difference between revisions

From Amberlynn Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 18: Line 18:
/* Base table styling */
/* Base table styling */
.eras-table {
.eras-table {
     border: 1px solid #808080;
    margin: 1em 0;              /* From wikitable */
     width: 100%;
    background-color: #f8f9fa;  /* From wikitable */
     table-layout: fixed; /* Helps maintain column widths */
     border: 1px solid #808080; /* Your eras-table, overrides wikitable’s #a2a9b1 */
    border-collapse: collapse;  /* From wikitable */
    color: #000;                /* From wikitable */
     width: 100%;               /* Your eras-table */
     table-layout: fixed;       /* Your eras-table */
}
}


/* Ensure header spans all columns */
/* Header styling */
.eras-table th {
.eras-table th {
     background-color: #f79ef7;
     background-color: #f79ef7; /* Your eras-table, overrides wikitable’s #eaecf0 */
     width: 100%;
     border: 1px solid #a2a9b1; /* From wikitable */
     display: table-cell; /* Keep table behavior for spanning */
     padding: 0.2em 0.4em;       /* From wikitable */
     text-align: center; /* Center the title text */
     text-align: center;         /* Both wikitable and eras-table */
    font-weight: bold;          /* From wikitable */
    width: 100%;                /* Your eras-table */
    display: table-cell;        /* Your eras-table */
}
}


/* Center content in table cells */
/* Cell styling */
.eras-table td {
.eras-table td {
     background-color: #f9e3f9;
     background-color: #f9e3f9; /* Your eras-table, overrides wikitable’s default */
     vertical-align: top;
     border: 1px solid #a2a9b1;  /* From wikitable */
     text-align: center; /* Center the text under the image */
    padding: 10px;             /* Your eras-table, overrides wikitable’s 0.2em 0.4em */
     padding: 10px; /* Add some padding for spacing */
     vertical-align: top;       /* Your eras-table */
     text-align: center;         /* Your eras-table, overrides wikitable’s default */
}
}


/* Ensure images scale properly */
/* Ensure images scale properly */
Line 45: Line 52:
     width: 100%;
     width: 100%;
     height: auto;
     height: auto;
     display: block; /* Ensure image behaves as a block for centering */
     display: block;             /* Ensure image behaves as a block for centering */
     margin: 0 auto; /* Center the image horizontally */
     margin: 0 auto;             /* Center the image horizontally */
}
}


Line 52: Line 59:
@media screen and (max-width: 800px) {
@media screen and (max-width: 800px) {
     .eras-table {
     .eras-table {
         display: block; /* Switch to block for responsive layout */
         display: block;         /* Switch to block for responsive layout */
        margin: 1em 0;          /* From wikitable, consistent in media query */
        border-collapse: collapse; /* From wikitable, maintain table integrity */
     }
     }
     .eras-table thead {
     .eras-table thead {
         display: block; /* Ensure header stays separate */
         display: block;         /* Ensure header stays separate */
     }
     }
     .eras-table th {
     .eras-table th {
         display: block; /* Full width block for header */
         display: block;         /* Full width block for header */
         width: 100%; /* Explicitly full width */
         width: 100%;           /* Explicitly full width */
        text-align: center;    /* Maintain centering */
     }
     }
     .eras-table tbody {
     .eras-table tbody {
Line 66: Line 76:
     }
     }
     .eras-table tr {
     .eras-table tr {
         display: contents; /* Let cells flow into flex */
         display: contents;     /* Let cells flow into flex */
     }
     }
     .eras-table td {
     .eras-table td {
         flex: 0 0 33.333%; /* 3 columns */
         flex: 0 0 33.333%;     /* 3 columns */
         box-sizing: border-box;
         box-sizing: border-box;
         text-align: center; /* Ensure text stays centered in flex layout */
         text-align: center;     /* Ensure text stays centered in flex layout */
         padding: 10px;
         padding: 10px;         /* Your eras-table padding */
     }
     }
}
}

Revision as of 12:17, 24 March 2025

.welcome-table {
    background-color: #f9e3f9;
    border: 1px solid #808080;    /* Solid grey border */
    border-collapse: collapse;
}

/* Center content in table cells */
.welcome-table td {
    vertical-align: top;
    text-align: center; /* Center the text under the image */
    padding: 8px; /* Add some padding for spacing */
}

.welcome-table th {
    padding-top: 8px;          /* Increased padding on top for header cells */
}

/* Base table styling */
.eras-table {
    margin: 1em 0;              /* From wikitable */
    background-color: #f8f9fa;  /* From wikitable */
    border: 1px solid #808080;  /* Your eras-table, overrides wikitable’s #a2a9b1 */
    border-collapse: collapse;  /* From wikitable */
    color: #000;                /* From wikitable */
    width: 100%;                /* Your eras-table */
    table-layout: fixed;        /* Your eras-table */
}

/* Header styling */
.eras-table th {
    background-color: #f79ef7;  /* Your eras-table, overrides wikitable’s #eaecf0 */
    border: 1px solid #a2a9b1;  /* From wikitable */
    padding: 0.2em 0.4em;       /* From wikitable */
    text-align: center;         /* Both wikitable and eras-table */
    font-weight: bold;          /* From wikitable */
    width: 100%;                /* Your eras-table */
    display: table-cell;        /* Your eras-table */
}

/* Cell styling */
.eras-table td {
    background-color: #f9e3f9;  /* Your eras-table, overrides wikitable’s default */
    border: 1px solid #a2a9b1;  /* From wikitable */
    padding: 10px;              /* Your eras-table, overrides wikitable’s 0.2em 0.4em */
    vertical-align: top;        /* Your eras-table */
    text-align: center;         /* Your eras-table, overrides wikitable’s default */
}

/* Ensure images scale properly */
.eras-table img {
    max-width: 200px;
    width: 100%;
    height: auto;
    display: block;             /* Ensure image behaves as a block for centering */
    margin: 0 auto;             /* Center the image horizontally */
}

/* Medium screens and below - switch to 3x2 layout for content */
@media screen and (max-width: 800px) {
    .eras-table {
        display: block;         /* Switch to block for responsive layout */
        margin: 1em 0;          /* From wikitable, consistent in media query */
        border-collapse: collapse; /* From wikitable, maintain table integrity */
    }
    .eras-table thead {
        display: block;         /* Ensure header stays separate */
    }
    .eras-table th {
        display: block;         /* Full width block for header */
        width: 100%;            /* Explicitly full width */
        text-align: center;     /* Maintain centering */
    }
    .eras-table tbody {
        display: flex;
        flex-wrap: wrap;
    }
    .eras-table tr {
        display: contents;      /* Let cells flow into flex */
    }
    .eras-table td {
        flex: 0 0 33.333%;     /* 3 columns */
        box-sizing: border-box;
        text-align: center;     /* Ensure text stays centered in flex layout */
        padding: 10px;          /* Your eras-table padding */
    }
}