MediaWiki:Common.css: Difference between revisions

From Amberlynn Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(163 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Ensure only this table is affected */
body.page-Main_Page h1.firstHeading {
.eras-table {
    display: none;
}
 
.current-box {
    width: 100%;
     display: flex;
     display: flex;
     flex-wrap: wrap;
    overflow: hidden;
     width: 100%;
    text-align: center;
    gap: 2%; /* Adds 2% margin between text and media */
    margin-top: 0;
}
 
.current-text {
    border: 1px solid #a2a9b1;
     flex: 0 0 60%;
    text-align: center;
    background-color: #fdf4ff;
    box-sizing: border-box;
     margin-top: 0;
}
 
.current-text-header {
    font-weight: bold;
    font-size: 115%;
    background-color: #eecdf2;
    display: block;
    margin-top: 0;
    padding: 0.2em 0.4em;
    border-top: 1px solid #a2a9b1;
    border-bottom: 1px solid #a2a9b1;
}
 
.current-text-header:first-child {
    margin-top: 0;
    border-top: 0px solid #a2a9b1;
}
}


/* Style individual cells */
.current-media {
.eras-table td {
    border: 1px solid #a2a9b1;
     flex: 1 1 16.66%; /* 6 columns: ~1/6th width each */
     flex: 0 0 38%;
    text-align: center;
    background-color: #f5fffa;
     box-sizing: border-box;
     box-sizing: border-box;
     text-align: center; /* Keeps images and text centered */
     margin-top: 0;
    min-width: 0; /* Prevents overflow issues */
}
}


/* Header spans full width always */
.current-media-header {
.eras-table th {
     font-weight: bold;
     flex: 1 1 100%;
    font-size: 115%;
    background-color: #cef2e0;
    display: block;
    margin-top: 0;
    padding: 0.2em 0.4em;
    border-top: 1px solid #a2a9b1;
    border-bottom: 1px solid #a2a9b1;
}
}


/* Uniform image height */
.current-media-header:first-child {
.eras-table td img {
     margin-top: 0;
     height: 200px; /* Fixed height for all images */
     border-top: 0px solid #a2a9b1;
     width: auto; /* Maintains aspect ratio */
    max-width: 100%; /* Ensures images don’t overflow cell */
    display: block; /* Removes unwanted spacing */
    margin: 0 auto; /* Centers images */
}
}


/* Medium resolution/zoom: 3 columns, 2 rows */
@media screen and (max-width: 768px) {
@media (max-width: 800px) {
     .current-box {
     .eras-table td {
         flex-direction: column;
         flex: 1 1 33.33%; /* 3 columns: ~1/3rd width each */
        gap: 0; /* Removes gap in mobile view */
    }
   
    .current-text {
        width: 100%;
        padding-left: 1%;
        padding-right: 1%;
        padding-bottom: 0;
    }
   
    .current-media {
        width: 100%;
        padding-top: 0;
        padding-left: 1%;
        padding-right: 1%;
        padding-bottom: 0;
     }
     }
     .eras-table td img {
   
         height: 150px; /* Slightly smaller for medium screens */
     .current-text-header,
    .current-media-header {
         margin-left: -1%; /* Adjusted for mobile padding */
        margin-right: -1%;
        padding: 0 1%;
     }
     }
}
}


/* Small resolution/max zoom: 1 column, 6 rows */
/* Note: I removed float properties as they're not needed with flexbox */
@media (max-width: 400px) {
 
.eras-table {
    margin: 1em 0;             
    background-color: #f8f9fa; 
    border: 1px solid #808080; 
    border-collapse: collapse; 
    color: #000;               
    width: 100%;               
    table-layout: fixed;       
}
 
.eras-table th {
    background-color: #f2d7c0; /* Changed from #cef2e0 (green) to #f2d7c0 (orange) */
    border: 1px solid #a2a9b1; 
    padding: 0.2em 0.4em;     
    text-align: center;       
    font-weight: bold;         
    width: 100%;               
    display: table-cell;       
    font-size: 115%;
}
 
.eras-table td {
    background-color: #fff3eb; /* Changed from #f5fffa (green) to #fff3eb (orange) */
    border: 1px solid #a2a9b1; 
    padding: 10px;             
    vertical-align: top;       
    text-align: center;       
}
 
/* Ensure images scale properly */
.eras-table img {
    max-width: 200px;
    width: 100%;
    height: auto;
    display: block;           
    margin: 0 auto;           
}
 
@media screen and (max-width: 768px) {
    .eras-table {
        display: block;       
        margin: 1em 0;         
        border-collapse: collapse;
    }
    .eras-table thead {
        display: block;       
    }
    .eras-table th {
        display: block;       
        width: 100%;           
        text-align: center;   
    }
    .eras-table tbody {
        display: flex;
        flex-wrap: wrap;
    }
    .eras-table tr {
        display: contents;     
    }
     .eras-table td {
     .eras-table td {
         flex: 1 1 100%; /* 1 column: full width */
         flex: 0 0 33.333%;    
    }
        box-sizing: border-box;
     .eras-table td img {
        text-align: center;      
         height: 100px; /* Smaller for single-column view */
         padding: 10px;        
     }
     }
}
.youtube-responsive {
    position: relative;
    width: 100%;             
    padding-bottom: 56.25%; 
    height: 0;               
    overflow: hidden;       
}
.youtube-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important; 
    height: 100% !important;
    padding-left: 2%;
    padding-right: 2%;
    padding-bottom: 2%;
    padding-top: 2%;
    max-width: 100%;         
    box-sizing: border-box; 
}
.navbox {
    padding: 0 !important;
}
}

Latest revision as of 19:25, 25 March 2025

body.page-Main_Page h1.firstHeading {
    display: none;
}

.current-box {
    width: 100%;
    display: flex;
    overflow: hidden;
    text-align: center;
    gap: 2%; /* Adds 2% margin between text and media */
    margin-top: 0;
}

.current-text {
    border: 1px solid #a2a9b1;
    flex: 0 0 60%;
    text-align: center;
    background-color: #fdf4ff;
    box-sizing: border-box;
    margin-top: 0;
}

.current-text-header {
    font-weight: bold;
    font-size: 115%;
    background-color: #eecdf2;
    display: block;
    margin-top: 0;
    padding: 0.2em 0.4em;
    border-top: 1px solid #a2a9b1;
    border-bottom: 1px solid #a2a9b1;
}

.current-text-header:first-child {
    margin-top: 0;
    border-top: 0px solid #a2a9b1;
}

.current-media {
    border: 1px solid #a2a9b1;
    flex: 0 0 38%;
    text-align: center;
    background-color: #f5fffa;
    box-sizing: border-box;
    margin-top: 0;
}

.current-media-header {
    font-weight: bold;
    font-size: 115%;
    background-color: #cef2e0;
    display: block;
    margin-top: 0;
    padding: 0.2em 0.4em;
    border-top: 1px solid #a2a9b1;
    border-bottom: 1px solid #a2a9b1;
}

.current-media-header:first-child {
    margin-top: 0;
    border-top: 0px solid #a2a9b1;
}

@media screen and (max-width: 768px) {
    .current-box {
        flex-direction: column;
        gap: 0; /* Removes gap in mobile view */
    }
    
    .current-text {
        width: 100%;
        padding-left: 1%;
        padding-right: 1%;
        padding-bottom: 0;
    }
    
    .current-media {
        width: 100%;
        padding-top: 0;
        padding-left: 1%;
        padding-right: 1%;
        padding-bottom: 0;
    }
    
    .current-text-header,
    .current-media-header {
        margin-left: -1%; /* Adjusted for mobile padding */
        margin-right: -1%;
        padding: 0 1%;
    }
}

/* Note: I removed float properties as they're not needed with flexbox */

.eras-table {
    margin: 1em 0;              
    background-color: #f8f9fa;  
    border: 1px solid #808080;  
    border-collapse: collapse;  
    color: #000;                
    width: 100%;                
    table-layout: fixed;        
}

.eras-table th {
    background-color: #f2d7c0; /* Changed from #cef2e0 (green) to #f2d7c0 (orange) */
    border: 1px solid #a2a9b1;  
    padding: 0.2em 0.4em;       
    text-align: center;         
    font-weight: bold;          
    width: 100%;                
    display: table-cell;        
    font-size: 115%;
}

.eras-table td {
    background-color: #fff3eb; /* Changed from #f5fffa (green) to #fff3eb (orange) */
    border: 1px solid #a2a9b1;  
    padding: 10px;              
    vertical-align: top;        
    text-align: center;         
}

/* Ensure images scale properly */
.eras-table img {
    max-width: 200px;
    width: 100%;
    height: auto;
    display: block;             
    margin: 0 auto;             
}

@media screen and (max-width: 768px) {
    .eras-table {
        display: block;         
        margin: 1em 0;          
        border-collapse: collapse; 
    }
    .eras-table thead {
        display: block;         
    }
    .eras-table th {
        display: block;         
        width: 100%;            
        text-align: center;     
    }
    .eras-table tbody {
        display: flex;
        flex-wrap: wrap;
    }
    .eras-table tr {
        display: contents;      
    }
    .eras-table td {
        flex: 0 0 33.333%;     
        box-sizing: border-box;
        text-align: center;     
        padding: 10px;          
    }
}

.youtube-responsive {
    position: relative;
    width: 100%;              
    padding-bottom: 56.25%;   
    height: 0;                
    overflow: hidden;         
}

.youtube-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;   
    height: 100% !important;
    padding-left: 2%; 
    padding-right: 2%;
    padding-bottom: 2%;
    padding-top: 2%; 
    max-width: 100%;          
    box-sizing: border-box;   
}

.navbox {
    padding: 0 !important;
}