Jump to content
Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Infobox/styles.css: Difference between revisions

Template page
m Infobox tournament: auto-generate a lead paragraph from the same infobox parameters
m Infobox tournament: auto-generate a lead paragraph from the same infobox parameters
Line 61: Line 61:
.loka-infobox-header-photo {
.loka-infobox-header-photo {
position: relative;
position: relative;
height: 200px;
height: 260px;
overflow: hidden;
overflow: hidden;
}
}
Line 76: Line 76:
position: absolute;
position: absolute;
inset: 0;
inset: 0;
/* One continuous gradient does the whole job: dark at the top for the
/* Previous attempts here kept the fade's alpha confined to a narrow,
  name/type text, easing down to its lightest around the midpoint (a
  subtle range (roughly .3-.45) -- technically a gradient, but too weak
  glimpse of the photo, but deliberately never fully clear -- alpha
  a change to actually read as one against a bright photo, which is why
  never drops below .3), then back up to exactly rgba(20, 16, 12, .45)
  it kept looking like a hard cut. This version swings across a much
  at the bottom, the SAME colour/opacity as the plain .loka-infobox
  wider, unmistakable range over a long 140px run (120px-260px): dark
  background (see Template:Infobox player on e.g. Kaph). Content below
  at the top for the name/type text, briefly quite clear around the
  (loka-tournament-columns) overlaps a little way up into this tail via
  midpoint (a real glimpse of the photo), then a long, obvious ease
  a negative margin but adds no background of its own, landing where
  down to nearly opaque by the bottom edge, so there is no sharp
  the scrim is already most of the way back to .45 -- so heading text
  boundary left for content below to visibly cut against. */
  always sits against a clearly-darkened backdrop instead of looking
  like it's floating on the bare photo. */
background: linear-gradient(to bottom,
background: linear-gradient(to bottom,
rgba(8, 6, 3, .82) 0,
rgba(8, 6, 3, .85) 0,
rgba(8, 6, 3, .5) 90px,
rgba(8, 6, 3, .5) 70px,
rgba(20, 16, 12, .3) 140px,
rgba(8, 6, 3, .1) 120px,
rgba(20, 16, 12, .45) 200px);
rgba(20, 16, 12, .94) 260px);
}
}



Revision as of 09:40, 18 August 2026

.loka-infobox {
	float: right;
	clear: right;
	width: 300px;
	margin: 0 0 1em 1em;
	background: rgba(20, 16, 12, .45);
	border: 1px solid rgba(255, 255, 255, .08);
}

.loka-infobox--wide {
	width: 520px;
}

/* Below this width a floated fixed-width box (300px, or 520px for --wide)
   either overflows the viewport or squeezes body text into an unreadably
   narrow column, so every infobox drops the float and goes full-width
   instead -- applies wiki-wide since this is the shared shell every
   specific infobox is built on. */
@media (max-width: 600px) {
	.loka-infobox,
	.loka-infobox--wide {
		float: none;
		clear: none;
		width: 100%;
		max-width: 100%;
		margin: 0 0 1em 0;
		box-sizing: border-box;
	}
}

.loka-infobox-name {
	text-align: center;
	font-size: 1.25em;
	font-weight: 700;
	padding: .6em;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.loka-infobox-type {
	background: #9c6b2e;
	color: #ffffff;
	font-weight: 700;
	font-size: .72em;
	text-transform: uppercase;
	letter-spacing: .04em;
	text-align: center;
	padding: .35em .5em;
}

.loka-infobox-image {
	line-height: 0;
	text-align: center;
	padding: 10px;
}

.loka-infobox-image img {
	max-width: 100%;
	height: auto;
}

.loka-infobox-header-photo {
	position: relative;
	height: 260px;
	overflow: hidden;
}

.loka-infobox-header-photo img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.loka-infobox-header-scrim {
	position: absolute;
	inset: 0;
	/* Previous attempts here kept the fade's alpha confined to a narrow,
	   subtle range (roughly .3-.45) -- technically a gradient, but too weak
	   a change to actually read as one against a bright photo, which is why
	   it kept looking like a hard cut. This version swings across a much
	   wider, unmistakable range over a long 140px run (120px-260px): dark
	   at the top for the name/type text, briefly quite clear around the
	   midpoint (a real glimpse of the photo), then a long, obvious ease
	   down to nearly opaque by the bottom edge, so there is no sharp
	   boundary left for content below to visibly cut against. */
	background: linear-gradient(to bottom,
		rgba(8, 6, 3, .85) 0,
		rgba(8, 6, 3, .5) 70px,
		rgba(8, 6, 3, .1) 120px,
		rgba(20, 16, 12, .94) 260px);
}

.loka-infobox-header-text {
	position: relative;
}

.loka-infobox-header-text .loka-infobox-name {
	border-bottom: none;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}

.loka-infobox-header-text .loka-infobox-type {
	background: rgba(156, 107, 46, .55);
	text-transform: none;
	letter-spacing: normal;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}

.loka-infobox-row {
	display: flex;
	padding: .4em .6em;
	border-top: 1px solid rgba(255, 255, 255, .08);
	font-size: .9em;
}

.loka-infobox-row-key {
	flex: 0 0 38%;
	font-weight: 700;
	text-align: left;
}

.loka-infobox-row-value {
	flex: 1;
	text-align: left;
}

.loka-infobox-row--wide {
	flex-direction: column;
	align-items: flex-start;
	gap: .3em;
}

.loka-hlist {
	list-style: none;
	margin: 0;
	padding: 0;
	display: inline;
}

.loka-hlist li {
	display: inline;
}

.loka-hlist li:not(:last-child)::after {
	content: ", ";
}

.loka-hlist--stacked {
	display: block;
}

.loka-hlist--stacked li {
	display: block;
}

.loka-hlist--stacked li:not(:last-child)::after {
	content: none;
}