Template:Color box: Difference between revisions

From Project Basis
Jump to navigation Jump to search
Talod>Sango
Created page with "<templatestyles src="Legend/styles.css" /><span class="legend-color" style="{{#if:{{{1|}}}|{{greater color contrast ratio|{{{1}}}|black|white|css=y}} }}{{#if:{{{3|}}}|color:{{{3}}}; }}{{#if:{{{border|}}}|border:1px solid {{{border}}}; }}{{#if:{{{padding|}}}|padding:{{{padding}}};}}">{{#if:{{{2|}}} |{{#if:{{{padding|}}}|{{{2}}}| {{{2}}} }} | }}</span><noinclude> {{documentation}}</noinclude>"
 
add "forced-color-adjust: none" to swatches so they work in high contrast modes (adding inline as property not supported in TemplateStyles yet)
Line 1: Line 1:
<templatestyles src="Legend/styles.css" /><span class="legend-color" style="{{#if:{{{1|}}}|{{greater color contrast ratio|{{{1}}}|black|white|css=y}}
<templatestyles src="Legend/styles.css" /><span class="legend-color mw-no-invert" style="forced-color-adjust:none; {{#if:{{{1|}}}|{{greater color contrast ratio|{{{1}}}|black|white|css=y}}
   }}{{#if:{{{3|}}}|color:{{{3}}};
   }}{{#if:{{{3|}}}|color:{{{3}}};
   }}{{#if:{{{border|}}}|border:1px solid {{{border}}};
   }}{{#if:{{{border|}}}|border:1px solid {{{border}}};

Revision as of 22:40, 21 July 2025