Template talk:Chembox
Drug_class field not workingHello. The "Drug_class" field in Section6 "Chembox Pharmacology" (see Template:Chembox_Pharmacology/doc for documentation) does not seem to be working. The field does not show in the drugbox when filled and instead this text is deposited on the page: "Template:Chembox DrugClass". Hoping for a fix so that this field can be used. Thank you. – 76.174.0.57 (talk) 10:33, 7 November 2024 (UTC)
Dark mode support for imagesCan we add skin-invert-image to the images in this box or give them a white background? The chemical formulae are not readable in dark mode e.g. https://en.wikipedia.org/wiki/Borax?vectornightmode=1&useskin=vector-2022 🐸 Jdlrobson (talk) 00:40, 25 November 2024 (UTC) ChEMBL links no longer workThe ChEMBL links in the chembox no longer work. Eg from Chebulinic acid it leads to https://www.ebi.ac.uk/chembl/db/index.php/compound/inspect/ChEMBL501154 which returns a 404 page not found. Wikidata though links are working eg https://www.ebi.ac.uk/chembl/explore/compound/CHEMBL501154 . Can this be fixed please? Graeme Bartlett (talk) 04:12, 27 November 2024 (UTC)
You are invited to join the discussion at Wikipedia talk:WikiProject Chemicals § 3DMET database dead?. DMacks (talk) 12:54, 23 December 2024 (UTC) Recent dark mode change has some janky results@Jdlrobson: Is it possible to expand the new dark mode styling you've added to include If you have some more time, we're making similar edits to Template:Infobox drug and we would welcome your thoughts on the implementation at that discussion, thanks. ― Synpath 20:47, 4 January 2025 (UTC)
Template-protected edit request on 8 January 2025
For better dark mode compatibility, please replace: @media screen {
html.skin-theme-clientpref-night .ib-chembox figure:not(.skin-invert) {
background: white;
}
}
@media screen and (prefers-color-scheme: dark) {
html.skin-theme-clientpref-os .ib-chembox figure:not(.skin-invert) {
background: white;
}
}
to: @media screen {
html.skin-theme-clientpref-night .ib-chembox figure:not(.skin-invert-image):not(.skin-invert):not(.bg-transparent) {
background: var(--background-color-inverted, #f8f9fa);
}
}
@media screen and (prefers-color-scheme: dark) {
html.skin-theme-clientpref-os .ib-chembox figure:not(.skin-invert-image):not(.skin-invert):not(.bg-transparent) {
background: var(--background-color-inverted, #f8f9fa);
}
}
Arthurfragoso (talk) 02:22, 8 January 2025 (UTC)
Template-protected edit request on 12 January 2025
Please, replace the current content of Template:Chembox image cell to the following: | colspan="2" style="text-align:center; padding:2px;" | {{#invoke:InfoboxImage|InfoboxImage
|center=yes <!-- when center=yes, it is rendered with the <picture> html tag instead of <span> it is important so the CSS is applied correctly -->
|image={{{par_file}}}
|size={{{par_size}}}
|sizedefault=220px
|alt={{{par_alt}}}
|title={{{par_title}}}
|class={{{par_class}}}}}{{#if:{{{par_caption|}}}|<div style="text-align:center;">{{{par_caption|}}}</div>}}
|-<noinclude>{{documentation}}</noinclude>
Explanation: The current CSS styling for dark mode selects for "figure:not(...)...", so it was currently working only for some images in the Chembox. The code above makes it work nice as intended. Testcase examples: Template:Chembox/testcases7images#Dark mode tests Thanks! -- Arthurfragoso (talk) 22:41, 12 January 2025 (UTC) |