Jump to content

Template:Pie chart/slice: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
attempt fix for dark mode/mobile display issue; see Template talk:Pie chart#Conflict with Blackscreen gadget and phab:T306191
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: initial;position:absolute;width:{{{radius|100}}}px;line-height:0;{{#switch:{{#expr:floor({{{2}}}/25)}}
<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