Template:Ambox: Difference between revisions

From SimRail Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
/*<syntaxhighlight lang="css">
/* {{pp|small=y}} */
*/
.ambox {
/* === Template:Ambox designs === */
border: 1px solid #a2a9b1;
/* @noflip */
border-left: 10px solid #36c;  /* Default "notice" blue */
background-color: #fbfbfb;
box-sizing: border-box;
}
 
/* Single border between stacked boxes. Take into account base templatestyles,
* user styles, and Template:Dated maintenance category.
* remove link selector when T200206 is fixed
*/
.ambox + link + .ambox,
.ambox + link + style + .ambox,
.ambox + link + link + .ambox,
/* TODO: raise these as "is this really that necessary???". the change was Dec 2021 */
.ambox + .mw-empty-elt + link + .ambox,
.ambox + .mw-empty-elt + link + style + .ambox,
.ambox + .mw-empty-elt + link + link + .ambox {
margin-top: -1px;
}
 
/* For the "small=left" option. */
/* must override .ambox + .ambox styles above */
html body.mediawiki .ambox.mbox-small-left {
/* @noflip */
margin: 4px 1em 4px 0;
overflow: hidden;
width: 238px;
border-collapse: collapse;
font-size: 88%;
line-height: 1.25em;
}
 
.ambox-speedy {
/* @noflip */
border-left: 10px solid #b32424;    /* Red */
background-color: #fee7e6;          /* Pink */
}
 
.ambox-delete {
/* @noflip */
border-left: 10px solid #b32424;    /* Red */
}


/* Ambox design */
.ambox-content {
.ambox {
/* @noflip */
    font-size: 95%;
border-left: 10px solid #f28500;   /* Orange */
    width: 80%;
    margin: 0 auto;
    border: 1px #AAA solid;
    border-left: 10px solid #228b22;
    border-collapse: collapse;
    background-color: #EEE;
}
}


/* Ambox colours */
.ambox-style {
.ambox-blue {
/* @noflip */
    border-left: 10px solid #1e90ff;   /* Blue (notice) */
border-left: 10px solid #fc3;       /* Yellow */
}
}
.ambox-red {
 
    border-left: 10px solid #b22222;    /* Red (delete/serious) */
.ambox-move {
/* @noflip */
border-left: 10px solid #9932cc;    /* Purple */
}
}
.ambox-orange {
 
    border-left: 10px solid #f28500;    /* Orange (content) */
.ambox-protection {
/* @noflip */
border-left: 10px solid #a2a9b1;    /* Gray-gold */
}
}
.ambox-yellow {
 
    border-left: 10px solid #f4c430;   /* Yellow (style) */
.ambox .mbox-text {
border: none;
/* @noflip */
padding: 0.25em 0.5em;
width: 100%;
}
}
.ambox-purple {
 
    border-left: 10px solid #9932cc;   /* Purple (merge) */
.ambox .mbox-image {
border: none;
/* @noflip */
padding: 2px 0 2px 0.5em;
text-align: center;
}
}
.ambox-gray {
 
    border-left: 10px solid #bba;       /* Gray (protection) */
.ambox .mbox-imageright {
border: none;
/* @noflip */
padding: 2px 0.5em 2px 0;
text-align: center;
}
}
.ambox-green {
 
    border-left: 10px solid #228b22;   /* Green */
/* An empty narrow cell */
.ambox .mbox-empty-cell {
border: none;
padding: 0;
width: 1px;
}
}


/* Ambox small text */
.ambox .mbox-image-div {
.ambox-smalltext {
width: 52px;
    font-size: smaller;
    margin-top:0.5em;
    margin-left:0.8em;
}
}


/* Ambox image */
/* Hack around MobileFrontend being opinionated */
.ambox-image {                    /* The left image cell */
html.client-js body.skin-minerva .mbox-text-span {
    width: 60px;
margin-left: 23px !important;
    padding: 2px 0px 2px 0.5em;        /* 0.5em left, 0px right */
    text-align: center;
}
}


@media print { .ambox { display: none; } }    /* no ambox when printing */
@media (min-width: 720px) {
/*
.ambox {
</syntaxhighlight>*/
margin: 0 10%;                 /* 10% = Will not overlap with other elements */
}
}

Revision as of 14:18, 17 April 2023

/* Template:pp */ .ambox { border: 1px solid #a2a9b1; /* @noflip */ border-left: 10px solid #36c; /* Default "notice" blue */ background-color: #fbfbfb; box-sizing: border-box; }

/* Single border between stacked boxes. Take into account base templatestyles,

* user styles, and Template:Dated maintenance category.
* remove link selector when T200206 is fixed
*/

.ambox + link + .ambox, .ambox + link + style + .ambox, .ambox + link + link + .ambox, /* TODO: raise these as "is this really that necessary???". the change was Dec 2021 */ .ambox + .mw-empty-elt + link + .ambox, .ambox + .mw-empty-elt + link + style + .ambox, .ambox + .mw-empty-elt + link + link + .ambox { margin-top: -1px; }

/* For the "small=left" option. */ /* must override .ambox + .ambox styles above */ html body.mediawiki .ambox.mbox-small-left { /* @noflip */ margin: 4px 1em 4px 0; overflow: hidden; width: 238px; border-collapse: collapse; font-size: 88%; line-height: 1.25em; }

.ambox-speedy { /* @noflip */ border-left: 10px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ }

.ambox-delete { /* @noflip */ border-left: 10px solid #b32424; /* Red */ }

.ambox-content { /* @noflip */ border-left: 10px solid #f28500; /* Orange */ }

.ambox-style { /* @noflip */ border-left: 10px solid #fc3; /* Yellow */ }

.ambox-move { /* @noflip */ border-left: 10px solid #9932cc; /* Purple */ }

.ambox-protection { /* @noflip */ border-left: 10px solid #a2a9b1; /* Gray-gold */ }

.ambox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.5em; width: 100%; }

.ambox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.5em; text-align: center; }

.ambox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.5em 2px 0; text-align: center; }

/* An empty narrow cell */ .ambox .mbox-empty-cell { border: none; padding: 0; width: 1px; }

.ambox .mbox-image-div { width: 52px; }

/* Hack around MobileFrontend being opinionated */ html.client-js body.skin-minerva .mbox-text-span { margin-left: 23px !important; }

@media (min-width: 720px) { .ambox { margin: 0 10%; /* 10% = Will not overlap with other elements */ } }