MediaWiki:Common.less/messagebox.less

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
// <pre>
/* =====================
       Messageboxes
   ===================== */

.messagebox {
    width: 65%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    padding: 3px 3px 3px 0;
    border-left: 15px solid #90c2dd;
    background-color: #f1f1f1;
    /* Fix boxes adjacent to floated siblings */
    overflow: auto;

    &.obsolete {
        background-color: #cfcfcf;
        border-color: #464646;

        a,
        a:visited,
        a:active {
            color: #6c6c6c;
        }
    }

    &.info {
        background-color: #ebebeb;
        border-color: #898989;

        a,
        a:visited,
        a:active {
            color: #6c6c6c;
        }
    }

    &.action {
        background-color: #cbdae2;
        border-color: #45697D;

        a,
        a:visited,
        a:active {
            color: #3c5c6e;
        }
    }

    &.file {
        background-color: #cfd8eb;
        border-color: #617ebc;

        a,
        a:visited,
        a:active {
            color: #556d97;
        }
    }

    &.warn {
        background-color: #ecd8d5;
        border-color: #861c10;

        a,
        a:visited,
        a:active {
            color: #861c10;
        }
    }
    
    &.warning {
    	background: @corvette;
    	color: @antique-bronze;
    	border-color: darken( @corvette, 5% );

    	a:not(.mw-selflink),
    	a:visited,
        a:active {
        	color: @korma;
    	}
    }

    &.disambig {
        background-color: #ebebeb;
        border-color: #898989;
        margin-top: 20px !important;
        margin-bottom: 30px !important;

        a,
        a:visited,
        a:active {
            color: #6c6c6c;
        }
    }

    &.safe {
        background-color: #d8f0d3;
        border-color: #1b8408;

        a,
        a:visited,
        a:active {
            color: #1b8408;
        }
    }

    &.unsafe {
        background-color: #ffee88;
        border-color: #997700;

        a,
        a:visited,
        a:active {
            color: #997700;
        }
    }

    &.easter {
        background-color: #e5f9c2;
        border-color: #598014;

        a,
        a:visited,
        a:active {
            color: #598014;
        }
    }

    &.halloween {
        background-color: #e8d8ea;
        border-color: #794080;

        a,
        a:visited,
        a:active {
            color: #794080;
        }
    }

    &.thanksgiving {
        background-color: #f0cba8;
        border-color: #a65800;

        a,
        a:visited,
        a:active {
            color: #a65800;
        }
    }

    &.christmas {
        background-color: #d4eaf6;
        border-color: #428bb5;

        a,
        a:visited,
        a:active {
            color: #3a799d;
        }
    }
    
    &.bigRaffle {
        background-color: #f1de9f;
        border-color: #640000;

        a,
        a:visited,
        a:active {
            color: #640000;
        }
    }
    
    &.discord {
    	background-color: #5865F2;
    	border-color: #4d58d0;
    	color: #ffffff;
    	
    	a,
    	a:visited,
    	a:active {
    		color: #d2e5fc;
    		
    		&.external.text {				// Links to the discord
    			color: #d2e5fc;
    			font-style: italic;
    		}
    	}
    }

    &.stub {
        width: 40%;
    }

    &.welcomenotice {
        padding: 1em;
        width: 90%;
        
        .wordmark {
        	filter: drop-shadow(0px 5px 5px rgba(0, 0, 0, 0.1));
        }
    }

    &.hasdialogue {
        width: auto;
    }
    
    &.alphabetical {
		width: auto;
		font-size: 95%;
		padding: 5px 10px;
		text-align: center;
		border-radius: 5px;
		background-color: #f9f9f9;
		border: 1px solid #eee;
    }
}

.wikipedia {
	border:solid #aaa 1px;
	font-size: 90%;
	background: #f9f9f9;
	padding:4px;
	spacing:0px;
	margin-top:10px
}


/* ************************
       new messageboxes
   ************************ */

@messagebox-image-width: 55px;

.messagebox2 {
    background: @white;
    width: 60vw;
    max-width: 600px;
    margin: 1em auto;
    border-collapse: collapse;
    box-shadow: @box-shadow;

	// no gap between subsequent messageboxes to save space; overlap 1px so that
	// you don't have a doubled border (grey bottom border + colored top border)
    & + & {
        margin-top: ~"calc(-1em - 1px)";
    }

}

.messagebox-header {
    background: lighten( @spindle, 7% );
    border: 1px solid lighten( @spindle, 1% );
    border-bottom: .3em solid darken( @fountain-blue, 5% );
    display: flex;
}

.messagebox-image {
    width: @messagebox-image-width;
    display: flex;
    justify-content: center;
    align-items: center;
}

.messagebox-title {
    line-height: 1.55em;
    font-weight: bold;
    padding: .6em .6em .6em 0;
    flex: 1;
}

.messagebox-text {
    font-size: 0.85em;
    line-height: 1.6em;
    padding: .65em .65em .65em @messagebox-image-width;
    border: 1px solid @mystic;
    border-top-width: 0;
}

.messagebox-reason {
    // margin-bottom: .25em;
}

/* *****************
       variants
   ***************** */

.messagebox-color(@header-color, @border-color) {

   .messagebox-header {
       background: @header-color;
       border-color: darken( @header-color, 5% );
       border-bottom-color: darken( @border-color, 3% );

       a {
           color: darken( @border-color, 10% );
       }

   }


}

.messagebox2 {

    // red
    &.warn {
        .messagebox-color(@bridesmaid, @flamingo);
    }

    // orange
    &.action {
        .messagebox-color(@lace, @ecstasy);
    }

    // green
    &.safe {
        .messagebox-color(@frost, @lima);
    }

    // blurple
    &.file {
        .messagebox-color(#e2e9f7, #617ebc);
    }

    // pink
    &.event {
        .messagebox-color(@french-lilac, @lavender);
    }

    // slate
    &.info {
        .messagebox-color(@mystic, @gray-chateau);
    }

    // grey
    &.obsolete {
        .messagebox-color(@gallery, @boulder);
    }
    
    // discord
    &.discord {
    	.messagebox-color(#5865F2, #4d58d0);
    	
    	.messagebox-title {
    		color: #ffffff;
    	}
    }

}