Jump to content

MediaWiki:Common.css: Difference between revisions

From Consumer_Action_Taskforce
Create common.css, add infobox classes, media fix for small screens
 
add box css
Line 3: Line 3:




/* Templates */  
/** Templates **/
 
/* Infobox */


.infobox {
.infobox {
Line 27: Line 29:
     justify-content: center;
     justify-content: center;
}
}
/* Loosely based on https://en.wikipedia.org/wiki/Template:Infobox */
/* Loosely based on https://en.wikipedia.org/wiki/Template:Infobox */
@media (min-width: 640px) {
@media (min-width: 640px) {
Line 39: Line 42:
         width: 100%;
         width: 100%;
     }
     }
}
/* Notices - Coloured boxes */
.cat-mw-box{
  border:1px solid #a2a9b1;
  border-radius:0.2rem;
  margin-bottom:2rem
}
.cat-mw-box-header{
  font-size:1rem;
  background:rgba(0,0,0,0.03);
  padding:0.2rem 1rem;
}
.cat-mw-box-body{
  padding:0.2rem 1rem;
}
}

Revision as of 22:25, 19 January 2025

/* CSS placed here will be applied to all skins */
/************************************************/


/** Templates **/ 

/* Infobox */

.infobox {
    background: #eee;
    border: 1px solid #aaa;
    float: right;
    margin: 0 0 1em 1em;
    padding: 0.5em;
    width: 22em;
}

.infobox-title {
    font-size: 2em;
    text-align: center;
    border-bottom: 1px solid #ccc;
    padding-bottom: .25em;
}

.infobox-image{
    display: flex;
    aspect-ratio: 2 / 1;
    align-items: center;
    justify-content: center;
}

/* Loosely based on https://en.wikipedia.org/wiki/Template:Infobox */
@media (min-width: 640px) {
    .infobox {
        float: right;
        clear: right;
    }
}

@media (max-width: 640px) {
    .infobox {
        width: 100%;
    }
}

/* Notices - Coloured boxes */

.cat-mw-box{
   border:1px solid #a2a9b1;
   border-radius:0.2rem;
   margin-bottom:2rem
}


.cat-mw-box-header{
   font-size:1rem;
   background:rgba(0,0,0,0.03);
   padding:0.2rem 1rem;
}
.cat-mw-box-body{
   padding:0.2rem 1rem;
}