Template:Library card mini/style.css: Difference between revisions

Template page
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
Line 1: Line 1:
/* .library-card-container-mini theming is in MediaWiki:Common.css so that it doesn't get called every time you add the template */
/* ----- flex styling ------ */
/*
.library-container-mini{
display: flex;
flex-flow: row wrap;
justify-content:space-between;
gap: 0 20px;
width:100%;
} */
 
/* --------- grid styling -----------*/
/* it's weird but for some reason this grid specifically
only wants to use 1 column out of 2, so I just added
empty columns in between the actual ones and reduced
the gap by half (10px instead of 20px) because these
empty columns still apply their gap. ¯\_(ツ)_/¯
*/
.library-container-mini{
display:grid;
grid-template-columns: repeat(4, 1fr 0fr);
grid-gap: 0 10px;
width:100%;
}
 


/* resize grid on mobile so there's only one column */
/* resize grid on mobile so there's only one column */

Revision as of 00:38, 1 August 2023

/* ----- flex styling ------ */
/*
.library-container-mini{
	display: flex;
	flex-flow: row wrap;
	justify-content:space-between;
	gap: 0 20px;
	width:100%;
} */

/* --------- grid styling -----------*/
/*	it's weird but for some reason this grid specifically
	only wants to use 1 column out of 2, so I just added
	empty columns in between the actual ones and reduced
	the gap by half (10px instead of 20px) because these
	empty columns still apply their gap. ¯\_(ツ)_/¯
*/
.library-container-mini{
	display:grid;
	grid-template-columns: repeat(4, 1fr 0fr); 
	grid-gap: 0 10px;
	width:100%;
}


/* resize grid on mobile so there's only one column */
@media only screen and (max-width: 720px) {
	.library-container-mini{
		display: grid;
		grid-template-columns: 1fr;
		grid-gap: 10px 0;
	}
	
	.library-container-mini > p{ /* the every other row bug happens here too, but they're just empty <p> tags. Fixed with this. */
		display:none; 
	}
	
	.library-card-mini-content{
		height:25px;	
	}
}


/* everything else for this template */
.library-card-mini-content{
	display: inline-grid;
	grid-template-columns: 45px 155px;
	grid-template-rows: 1fr;
	height:75px;
	overflow:hidden; /* you get three lines of text, no more */
	align-items:center;
}

.library-card-mini img{
	height:35px;
	width:35px;
	object-fit:cover;
	border-radius:5px;
	transform:scale(1); /* cancels the scale-in effect that the library cards have*/
}

.library-card-mini img:hover{
	transform:scale(1);
}

.library-card-mini-text{
	grid-column-start:2;
	grid-column-end:3;
}

.library-card-mini-title{
	height:0;
	width:0;
	position:relative;
}

.library-card-mini-TOC{
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  visibility: hidden;
}