Jump to content
Toggle menu
  • 1 articles
  • 7 files
  • 3 users
  • 102 edits
Shroudforge
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
.t-icon {
	user-select: none;
}

/*
 * Mask mode: render the icon as a CSS mask filled with currentColor, so it
 * matches the surrounding text and recolours with it. The file URL is stashed
 * in --t-icon-url inline (a quoted string); it is consumed here via image-set()
 * + bare var() because the sanitizer rejects url(var()) inline. inline-block so
 * the inline width/height apply (incl. inside a wrapping link).
 *
 * COUPLING: image-set(var()) requires TemplateStylesExtender at a revision
 * BEFORE a9043c4 (custom-property external-resource ban). The wiki must
 * carry that pin in sct-docker-images (composer 'dev-master' with no sha
 * WILL pull the ban back on the next image rebuild and blank every mask
 * icon). Safe with the pin because the wiki's enforced CSP default-src
 * restricts image fetches. Upstream opt-in proposal:
 * https://github.com/octfx/mediawiki-extensions-TemplateStylesExtender/issues/45
 */
.t-icon--mask {
	display: inline-block;
	--t-icon-mask: image-set(var(--t-icon-url) 1x);
	mask-image: var(--t-icon-mask);
	mask-size: contain;
	mask-repeat: no-repeat;
	mask-position: center;
	background-color: currentColor;
	vertical-align: middle;
}
Last modified
Copyright