MediaWiki:Common.less/spoiler.less

From the RuneScape Wiki, the wiki for all things RuneScape
Jump to: navigation, search
.spoiler-warning {
	padding: 0.25em 1em;
	background: @old-brick;
	color: @white;
	width: 65%;
	margin-left: auto;
	margin-right: auto;
	margin-top: 0.5em;
	margin-bottom: 0.5em;
	border: 1px solid @mocaccino;

	p {
		margin: 0;
	}
}

/* SECTION */
section {
	transition: filter .5s ease;
	
	&.spoiler {
		filter: blur(3px);
		cursor: pointer;
	}
}

/* SPOILERS */

.spoiler {
	/* Used as a temporary filter until the gadget JS kicks in */
	filter: blur(10px);
	
	* {
		transition: filter .5s ease;
	}
	
	.gallerybox.spoiler-item {
		.thumb {
			overflow: hidden;
			position: relative;
			
			&::before {
				content: "Click to reveal";
			    top: 50%;
			    left: 50%;
			    transform: translate(-50%,-50%);
			    font-weight: bold;
			    color: white;
			    text-shadow: 2px 2px 2px rgb(45 45 45);
			    position: absolute;
			    z-index: 9999;
			    cursor: pointer;
			}
	
			&::after {
				position: absolute;
			    content: " ";
			    top: 50%;
			    left: 50%;
			    transform: translate(-50%,-50%);
			    width: 100%;
			    height: 100%;
			    cursor: pointer;
			}
			
			img {
				filter: blur(10px);
			}
		}
	
		.gallerytext {
			filter: blur(3px);
			cursor: pointer;
		}
	}
}