Template:Ink chip: Difference between revisions
IssuePress (talk | contribs) No edit summary |
IssuePress (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
A template to display ink colors as chips. | A template to display ink colors as [https://m3.material.io/components/chips/overview chips]. | ||
== Usage == | |||
<pre> | <pre> | ||
{{Color chip|Violet}} | |||
</pre> | </pre> | ||
{{Color chip|Violet}} | {{Color chip|Violet}} | ||
=== Advanced attributes === | |||
Some chips, such as yellow, will require black text. You can add the additional attribute `text=black` to change the overalying text color to Black. | |||
<pre> | |||
{{Color chip|Yellow|text=black}} | |||
</pre> | |||
{{Color chip|Yellow|text=black}} | |||
</noinclude> | </noinclude> | ||
<includeonly><span class="color-chip" style=" | <includeonly><span class="color-chip" style=" | ||
font-size: | font-size:1rem; | ||
line-height: 1rem; | line-height: 1rem; | ||
display:inline-block; | display:inline-block; | ||
border-radius: . | border-radius: .5rem; | ||
padding:. | padding:.5rem 1rem; | ||
font-weight: | font-weight: 500; | ||
vertical-align: middle; | vertical-align: middle; | ||
color: white; | color: {{{text|white}}}; | ||
background:#{{#show: {{{1}}} |?Has display hex # }};">{{{1|}}}</span></includeonly> | background:#{{#show: {{{1}}} |?Has display hex # }};">{{{1|}}}</span></includeonly> |
Revision as of 02:09, 1 December 2024
A template to display ink colors as chips.
Usage
{{Color chip|Violet}}
Advanced attributes
Some chips, such as yellow, will require black text. You can add the additional attribute `text=black` to change the overalying text color to Black.
{{Color chip|Yellow|text=black}}