Template:EDFM style/styles.css: Difference between revisions

Current answers. Practical procedures. Reliable reference.
Jump to navigation Jump to search
Redesign: add .edfm-panel-* semantic variants and .edfm-status metadata module styling, keep .edfm-box as alias
Redesign pass 2: status module rebuilt with coloured header band + stacked metadata, panels get more padding, new .edfm-related tile component
Line 1: Line 1:
/* Shared styling for EDFM's editorial templates (Article status, Draft
/* Shared styling for EDFM's editorial templates (Article status, Draft
   warning, Prerequisites, Related articles, etc. -- see each template's
   warning, Prerequisites, Related articles, etc. -- see each template's
   own page for which classes it uses). Deliberately restrained: a single
   own page for which classes it uses). Freely uses the --edfm-* custom
  accent-colour left border, a small clipped top-right corner for a
   properties defined in MediaWiki:Common.css -- see the note there under
  "technical panel" read, no glow, no animation. Freely uses the --edfm-*
   "6. Panels" for why these classes live only in this file and not
   custom properties defined in MediaWiki:Common.css -- see the note there
   under "6. Panels" for why these classes live only in this file and not
   duplicated in Common.css too.
   duplicated in Common.css too.
   Updated 2026-08-07 for the "technical field manual" redesign: introduces
 
   the .edfm-panel-* naming as the current standard (semantic variants:
   2026-08-07 SECOND PASS: panels keep the accent-rail + corner-cut
   info / warning / draft / reference), keeps .edfm-box as an alias so nothing
  language from the first pass (both are explicitly the "hierarchy
   already using the older name breaks, and adds the .edfm-status structured
  without a full border around everything" technique this redesign asks
   metadata module used by Template:Article status. */
   for) but get noticeably more padding/breathing room; the status module
   is rebuilt with a coloured header band and stacked label/value metadata
  instead of a plain left-rail box with inline "Label: value" text; and a
   new .edfm-related component replaces the old plain notice-style
   "Related articles" bar with a small tile row. */


.edfm-box,
.edfm-box,
Line 18: Line 20:
background: var( --edfm-surface-2 );
background: var( --edfm-surface-2 );
color: var( --edfm-text );
color: var( --edfm-text );
padding: 0.75em 1em;
padding: 1.1em 1.3em;
margin: 1em 0;
margin: 1.4em 0;
clip-path: polygon( 0 0, calc( 100% - 8px ) 0, 100% 8px, 100% 100%, 0 100% );
clip-path: polygon( 0 0, calc( 100% - 10px ) 0, 100% 10px, 100% 100%, 0 100% );
}
}
.edfm-panel-info {
.edfm-panel-info {
Line 40: Line 42:
.edfm-box.edfm-disclaimer {
.edfm-box.edfm-disclaimer {
border-left-color: var( --edfm-orange );
border-left-color: var( --edfm-orange );
font-size: 0.9em;
font-size: 0.92em;
}
}
.edfm-box dl,
.edfm-box dl,
Line 64: Line 66:


/* --- Article metadata / status module (Template:Article status) --------
/* --- Article metadata / status module (Template:Article status) --------
   Semantic status colouring always pairs with a visible text badge (the
   Immediately communicates document trust/state: a coloured header band
   status word itself, e.g. "NEEDS REVIEW") -- never colour alone, per the
  (background tint + bottom rule, not a full border) carries the big
  site's Verification Policy and general accessibility requirements. Three
   status badge plus mode/version, then a metadata grid below with each
  colour tiers cover the seven actual status values (see
  field as a stacked LABEL / value pair rather than inline "Label: value"
  Elite Dangerous Field Manual:Verification Policy): positive/confirmed
  text -- closer to a real status panel than a definition list. Semantic
  (Verified, Partially verified) in cyan -- matching "cyan = verification
  colouring always pairs with the visible text badge -- never colour
  information" from the colour system; attention-needed (Needs review,
  alone, per the site's Verification Policy. Three colour tiers cover the
  Draft, Upcoming) in orange -- matching "orange = important
  seven actual status values (see Elite Dangerous Field Manual:
  actions/emphasis"; and neutral/non-current (Historical, Legacy only) in
  Verification Policy): positive/confirmed (Verified, Partially verified)
  a dim neutral tone. The template sets the modifier class via #switch. */
  in cyan -- matching "cyan = verification information" from the colour
  system; attention-needed (Needs review, Draft, Upcoming) in orange --
  matching "orange = important actions/emphasis"; and neutral/non-current
  (Historical, Legacy only) in a dim neutral tone. The template sets the
  modifier class via #switch. */
.edfm-status {
.edfm-status {
border-left-width: 4px;
border-left-width: 4px;
border-left-style: solid;
border-left-style: solid;
padding: 0;
overflow: hidden;
}
}
.edfm-status--positive { border-left-color: var( --edfm-status-positive ); }
.edfm-status--positive { border-left-color: var( --edfm-status-positive ); }
Line 86: Line 94:
flex-wrap: wrap;
flex-wrap: wrap;
align-items: baseline;
align-items: baseline;
gap: 0.3em 1em;
gap: 0.4em 1.2em;
padding: 0.9em 1.3em;
border-bottom: 1px solid var( --edfm-border-soft );
/* TemplateStyles' CSS sanitizer rejects var() specifically inside
/* TemplateStyles' CSS sanitizer rejects var() specifically inside
  font-family (even though it's otherwise valid CSS) -- spelled out
  font-family (even though it's otherwise valid CSS) -- spelled out
Line 92: Line 102:
font-family: 'JetBrains Mono', 'Fira Code', Consolas, 'SF Mono', Menlo, 'Courier New', monospace;
font-family: 'JetBrains Mono', 'Fira Code', Consolas, 'SF Mono', Menlo, 'Courier New', monospace;
}
}
.edfm-status--positive .edfm-status-head { background: var( --edfm-status-positive-bg ); }
.edfm-status--attention .edfm-status-head { background: var( --edfm-status-attention-bg ); }
.edfm-status--neutral .edfm-status-head { background: var( --edfm-status-neutral-bg ); }
.edfm-status-badge {
.edfm-status-badge {
font-weight: 700;
font-weight: 700;
letter-spacing: 0.06em;
letter-spacing: 0.06em;
text-transform: uppercase;
text-transform: uppercase;
font-size: 0.95em;
font-size: 1.15em;
}
}
.edfm-status--positive .edfm-status-badge { color: var( --edfm-status-positive ); }
.edfm-status--positive .edfm-status-badge { color: var( --edfm-status-positive ); }
Line 103: Line 116:
.edfm-status-item {
.edfm-status-item {
color: var( --edfm-text-muted );
color: var( --edfm-text-muted );
font-size: 0.85em;
font-size: 0.8em;
letter-spacing: 0.03em;
letter-spacing: 0.04em;
text-transform: uppercase;
text-transform: uppercase;
}
}
.edfm-status-details {
.edfm-status-details {
display: grid;
display: grid;
grid-template-columns: repeat( auto-fit, minmax( 12em, 1fr ) );
grid-template-columns: repeat( auto-fit, minmax( 11em, 1fr ) );
gap: 0.3em 1.5em;
gap: 1em 1.5em;
margin: 0.6em 0 0 0;
margin: 0;
padding-top: 0.5em;
padding: 1.1em 1.3em;
border-top: 1px solid var( --edfm-border-soft );
}
}
.edfm-status-row {
.edfm-status-row {
display: flex;
display: flex;
gap: 0.4em;
flex-direction: column;
font-size: 0.9em;
gap: 0.2em;
}
}
.edfm-status-row dt {
.edfm-status-row dt {
color: var( --edfm-text-dim );
color: var( --edfm-text-dim );
font-weight: 400;
font-weight: 700;
white-space: nowrap;
white-space: nowrap;
float: none;
float: none;
clear: none;
clear: none;
}
margin: 0;
.edfm-status-row dt::after {
font-family: 'JetBrains Mono', 'Fira Code', Consolas, 'SF Mono', Menlo, 'Courier New', monospace;
content: ':';
font-size: 0.7em;
letter-spacing: 0.08em;
text-transform: uppercase;
}
}
.edfm-status-row dd {
.edfm-status-row dd {
margin: 0;
margin: 0;
color: var( --edfm-text-muted );
color: var( --edfm-text );
font-size: 0.98em;
}
}
@media ( max-width: 800px ) {
@media ( max-width: 800px ) {
.edfm-status-details {
grid-template-columns: 1fr 1fr;
}
}
@media ( max-width: 480px ) {
.edfm-status-details {
.edfm-status-details {
grid-template-columns: 1fr;
grid-template-columns: 1fr;
}
}
}
/* --- Related content (Template:Related articles) -----------------------
  A small navigation strip instead of a generic bordered notice -- a
  quiet uppercase label above a row of individually-boxed link "tiles",
  each with a trailing arrow. Deliberately styles the `<a>` elements
  directly (not container-level flexbox) so the freeform wikitext link
  list passed into the template (arbitrary separators/whitespace between
  links) can't break the layout -- every link gets its own tile
  regardless of what, if anything, sits between them in the source. */
.edfm-related {
margin: 1.6em 0;
}
.edfm-related-label {
font-family: 'JetBrains Mono', 'Fira Code', Consolas, 'SF Mono', Menlo, 'Courier New', monospace;
font-size: 0.75em;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var( --edfm-text-dim );
margin-bottom: 0.6em;
}
.edfm-related-links a {
display: inline-flex;
align-items: center;
gap: 0.5em;
background: var( --edfm-surface-2 );
border-left: 2px solid var( --edfm-cyan );
padding: 0.65em 1.1em;
margin: 0 0.7em 0.7em 0;
font-family: 'JetBrains Mono', 'Fira Code', Consolas, 'SF Mono', Menlo, 'Courier New', monospace;
font-weight: 700;
letter-spacing: 0.03em;
text-transform: uppercase;
font-size: 0.85em;
text-decoration: none;
transition: background-color 0.15s ease, border-left-color 0.15s ease, transform 0.15s ease;
}
.edfm-related-links a::after {
content: '\2192';
}
.edfm-related-links a:hover {
background: var( --edfm-surface-3 );
border-left-color: var( --edfm-orange );
transform: translateY( -1px );
}
}

Revision as of 17:28, 7 August 2026

/* Shared styling for EDFM's editorial templates (Article status, Draft
   warning, Prerequisites, Related articles, etc. -- see each template's
   own page for which classes it uses). Freely uses the --edfm-* custom
   properties defined in MediaWiki:Common.css -- see the note there under
   "6. Panels" for why these classes live only in this file and not
   duplicated in Common.css too.

   2026-08-07 SECOND PASS: panels keep the accent-rail + corner-cut
   language from the first pass (both are explicitly the "hierarchy
   without a full border around everything" technique this redesign asks
   for) but get noticeably more padding/breathing room; the status module
   is rebuilt with a coloured header band and stacked label/value metadata
   instead of a plain left-rail box with inline "Label: value" text; and a
   new .edfm-related component replaces the old plain notice-style
   "Related articles" bar with a small tile row. */

.edfm-box,
.edfm-panel {
	border-left: 4px solid var( --edfm-cyan );
	background: var( --edfm-surface-2 );
	color: var( --edfm-text );
	padding: 1.1em 1.3em;
	margin: 1.4em 0;
	clip-path: polygon( 0 0, calc( 100% - 10px ) 0, 100% 10px, 100% 100%, 0 100% );
}
.edfm-panel-info {
	border-left-color: var( --edfm-cyan );
}
.edfm-panel-warning,
.edfm-box.edfm-warning {
	border-left-color: var( --edfm-orange );
	background: #201a12;
}
.edfm-panel-draft,
.edfm-box.edfm-draft {
	border-left-color: var( --edfm-text-dim );
	background: var( --edfm-surface-1 );
}
.edfm-panel-reference {
	border-left-color: var( --edfm-blue );
}
.edfm-box.edfm-disclaimer {
	border-left-color: var( --edfm-orange );
	font-size: 0.92em;
}
.edfm-box dl,
.edfm-panel dl {
	margin: 0;
}
.edfm-box dt,
.edfm-panel dt {
	font-weight: bold;
	float: left;
	clear: left;
	margin-right: 0.5em;
	color: var( --edfm-text );
}
.edfm-box dd,
.edfm-panel dd {
	margin-left: 11em;
}
.edfm-inline-flag {
	font-style: italic;
	color: var( --edfm-cyan );
}

/* --- Article metadata / status module (Template:Article status) --------
   Immediately communicates document trust/state: a coloured header band
   (background tint + bottom rule, not a full border) carries the big
   status badge plus mode/version, then a metadata grid below with each
   field as a stacked LABEL / value pair rather than inline "Label: value"
   text -- closer to a real status panel than a definition list. Semantic
   colouring always pairs with the visible text badge -- never colour
   alone, per the site's Verification Policy. Three colour tiers cover the
   seven actual status values (see Elite Dangerous Field Manual:
   Verification Policy): positive/confirmed (Verified, Partially verified)
   in cyan -- matching "cyan = verification information" from the colour
   system; attention-needed (Needs review, Draft, Upcoming) in orange --
   matching "orange = important actions/emphasis"; and neutral/non-current
   (Historical, Legacy only) in a dim neutral tone. The template sets the
   modifier class via #switch. */
.edfm-status {
	border-left-width: 4px;
	border-left-style: solid;
	padding: 0;
	overflow: hidden;
}
.edfm-status--positive { border-left-color: var( --edfm-status-positive ); }
.edfm-status--attention { border-left-color: var( --edfm-status-attention ); }
.edfm-status--neutral { border-left-color: var( --edfm-status-neutral ); }

.edfm-status-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.4em 1.2em;
	padding: 0.9em 1.3em;
	border-bottom: 1px solid var( --edfm-border-soft );
	/* TemplateStyles' CSS sanitizer rejects var() specifically inside
	   font-family (even though it's otherwise valid CSS) -- spelled out
	   literally here to match --edfm-mono in MediaWiki:Common.css. */
	font-family: 'JetBrains Mono', 'Fira Code', Consolas, 'SF Mono', Menlo, 'Courier New', monospace;
}
.edfm-status--positive .edfm-status-head { background: var( --edfm-status-positive-bg ); }
.edfm-status--attention .edfm-status-head { background: var( --edfm-status-attention-bg ); }
.edfm-status--neutral .edfm-status-head { background: var( --edfm-status-neutral-bg ); }
.edfm-status-badge {
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-size: 1.15em;
}
.edfm-status--positive .edfm-status-badge { color: var( --edfm-status-positive ); }
.edfm-status--attention .edfm-status-badge { color: var( --edfm-status-attention ); }
.edfm-status--neutral .edfm-status-badge { color: var( --edfm-text ); }
.edfm-status-item {
	color: var( --edfm-text-muted );
	font-size: 0.8em;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.edfm-status-details {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 11em, 1fr ) );
	gap: 1em 1.5em;
	margin: 0;
	padding: 1.1em 1.3em;
}
.edfm-status-row {
	display: flex;
	flex-direction: column;
	gap: 0.2em;
}
.edfm-status-row dt {
	color: var( --edfm-text-dim );
	font-weight: 700;
	white-space: nowrap;
	float: none;
	clear: none;
	margin: 0;
	font-family: 'JetBrains Mono', 'Fira Code', Consolas, 'SF Mono', Menlo, 'Courier New', monospace;
	font-size: 0.7em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.edfm-status-row dd {
	margin: 0;
	color: var( --edfm-text );
	font-size: 0.98em;
}
@media ( max-width: 800px ) {
	.edfm-status-details {
		grid-template-columns: 1fr 1fr;
	}
}
@media ( max-width: 480px ) {
	.edfm-status-details {
		grid-template-columns: 1fr;
	}
}

/* --- Related content (Template:Related articles) -----------------------
   A small navigation strip instead of a generic bordered notice -- a
   quiet uppercase label above a row of individually-boxed link "tiles",
   each with a trailing arrow. Deliberately styles the `<a>` elements
   directly (not container-level flexbox) so the freeform wikitext link
   list passed into the template (arbitrary separators/whitespace between
   links) can't break the layout -- every link gets its own tile
   regardless of what, if anything, sits between them in the source. */
.edfm-related {
	margin: 1.6em 0;
}
.edfm-related-label {
	font-family: 'JetBrains Mono', 'Fira Code', Consolas, 'SF Mono', Menlo, 'Courier New', monospace;
	font-size: 0.75em;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var( --edfm-text-dim );
	margin-bottom: 0.6em;
}
.edfm-related-links a {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	background: var( --edfm-surface-2 );
	border-left: 2px solid var( --edfm-cyan );
	padding: 0.65em 1.1em;
	margin: 0 0.7em 0.7em 0;
	font-family: 'JetBrains Mono', 'Fira Code', Consolas, 'SF Mono', Menlo, 'Courier New', monospace;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	font-size: 0.85em;
	text-decoration: none;
	transition: background-color 0.15s ease, border-left-color 0.15s ease, transform 0.15s ease;
}
.edfm-related-links a::after {
	content: '\2192';
}
.edfm-related-links a:hover {
	background: var( --edfm-surface-3 );
	border-left-color: var( --edfm-orange );
	transform: translateY( -1px );
}