Template:Pie chart/slice: Difference between revisions
Appearance
Content deleted Content added
The Earwig (talk | contribs) attempt fix for dark mode/mobile display issue; see Template talk:Pie chart#Conflict with Blackscreen gadget and phab:T306191 |
The Earwig (talk | contribs) set z-index to -1 for 100% slices to work around Safari bug (?) where in some situations this element doesn't seem to stack in the right order—a 100% slice should always be below other slices, since slices are rendered in descending order, so I don't think this should affect normal rendering |
||
Line 1: | Line 1: | ||
<includeonly><div style="border:solid transparent;background-color: |
<includeonly><div style="border:solid transparent;background-color:initial;position:absolute;width:{{{radius|100}}}px;line-height:0;{{#switch:{{#expr:floor({{{2}}}/25)}} |
||
<!-- 0-25% --> |0= |
<!-- 0-25% --> |0= |
||
left:{{{radius|100}}}px; |
left:{{{radius|100}}}px; |
||
Line 32: | Line 32: | ||
top:0; |
top:0; |
||
border-width:0 {{#expr:2*{{{radius|100}}}}}px {{#expr:2*{{{radius|100}}}}}px 0; |
border-width:0 {{#expr:2*{{{radius|100}}}}}px {{#expr:2*{{{radius|100}}}}}px 0; |
||
border-color:{{{1}}} |
border-color:{{{1}}}; |
||
z-index:-1 |
|||
"></div> |
"></div> |
||
}}</includeonly><noinclude> |
}}</includeonly><noinclude> |
Latest revision as of 00:02, 19 February 2024
This template is used on approximately 6,500 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
Usage
This template is not intended to be used directly. It is used to draw individual slices of pie charts within {{Pie chart}}. Please see that template's documentation for more information.
See also
- {{Pie chart}}