Admin Dark & Light Mode - Cosmetic Fixes

Cosmetic look of components or your whole site
User avatar
burt
Core Team
Posts: 4916
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 296 times
Been thanked: 493 times

Re: Admin Dark & Light Mode - Cosmetic Fixes

Post by burt »

burt wrote: ↑Thu Nov 05, 2026 12:15 pm Some icons are dark, making them hard to see in dark mode.
https://github.com/CE-PhoenixCart/Phoen ... 85b34dc2c6



Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
burt
Core Team
Posts: 4916
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 296 times
Been thanked: 493 times

Re: Admin Dark & Light Mode - Cosmetic Fixes

Post by burt »

burt wrote: ↑Thu Nov 05, 2026 10:40 am The secondary Nav remains light.

https://github.com/CE-PhoenixCart/Phoen ... 86859707ee
I am not here to build for you.
I am here to build with you. Let's help each other.

User avatar
burt
Core Team
Posts: 4916
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 296 times
Been thanked: 493 times

Re: Admin Dark & Light Mode - Cosmetic Fixes

Post by burt »

burt wrote: ↑Thu Nov 05, 2026 10:45 am The order page is really bad;


dark-order.png
https://github.com/CE-PhoenixCart/Phoen ... f606a3433e

Note that this is a "bit bigger" than a simple Dark/Light fix.
I plugged this page into the TableLayout class to make the output the exact same whether looking at orders - invoice - packingslip.

User avatar
burt
Core Team
Posts: 4916
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 296 times
Been thanked: 493 times

Re: Admin Dark & Light Mode - Cosmetic Fixes

Post by burt »

burt wrote: ↑Thu Nov 05, 2026 10:36 am dark-button.png


Dark button on a dark background merges - no good for accessibility
Light button might also need looking at - clash of colours
https://github.com/CE-PhoenixCart/Phoen ... 9dd29bb2a2
I am not here to build for you.
I am here to build with you. Let's help each other.

User avatar
burt
Core Team
Posts: 4916
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 296 times
Been thanked: 493 times

Re: Admin Dark & Light Mode - Cosmetic Fixes

Post by burt »

If anyone wants to help test, here is the download link that includes all the fixes made so far;

https://github.com/CE-PhoenixCart/Phoen ... .1.0.9.zip

Basically point out anything that looks wrong in Dark Mode.
I am not here to build for you.
I am here to build with you. Let's help each other.

Fiber
100+
Posts: 181
Joined: Mon Oct 26, 2020 12:16 pm
Phoenix Version: v1.1.0.8
Has thanked: 19 times
Been thanked: 28 times

Re: Admin Dark & Light Mode - Cosmetic Fixes

Post by Fiber »

burt wrote: ↑Sat Nov 07, 2026 12:08 pm If anyone wants to help test, here is the download link that includes all the fixes made so far;

https://github.com/CE-PhoenixCart/Phoen ... .1.0.9.zip

Basically point out anything that looks wrong in Dark Mode.
Done testing, and with the code in the language file nothing is changed, but whit this

Code: Select all

const HTML_PARAMS = 'dir="ltr" lang="nl" data-bs-theme="' . BOOTSTRAP_THEME . '"';
it worked.

and I found this which looked strange with urls in admin: admin/products_attributes.php
and admin/catalog.php?cPath=1_3&pID=3&action=new_product
(insert image) attached in the css:

Code: Select all

/* Neutral input and edit rows on Item attributes in dark mode */
[data-bs-theme="dark"] #accordionAttributes .table-success,
[data-bs-theme="dark"] #accordionAttributes .table-info {
  --bs-table-color: var(--bs-body-color);
  --bs-table-bg: var(--bs-tertiary-bg);
  --bs-table-border-color: var(--bs-border-color);

  --bs-table-striped-color: var(--bs-body-color);
  --bs-table-striped-bg: var(--bs-tertiary-bg);

  --bs-table-hover-color: var(--bs-body-color);
  --bs-table-hover-bg: var(--bs-secondary-bg);

  --bs-table-active-color: var(--bs-body-color);
  --bs-table-active-bg: var(--bs-secondary-bg);
}
/* Existing image names: neutral background in dark mode */
[data-bs-theme="dark"] #section_images_content .form-control.bg-light {
  background-color: var(--bs-tertiary-bg) !important;
  color: var(--bs-body-color) !important;
  border-color: var(--bs-border-color);
}
AI
This Addon was created with the help of Perplexity AI was used to help investigate the dark-mode issues and suggest the CSS fixes described in this post. I applied and manually tested the changes in my Phoenix Cart 1.1.0.9 test installation. AI
And this has nothing to do with the topic, but I came across it while testing. url=admin/templates.php and the url to paid the url is wrong? Github-link

Fiber
100+
Posts: 181
Joined: Mon Oct 26, 2020 12:16 pm
Phoenix Version: v1.1.0.8
Has thanked: 19 times
Been thanked: 28 times

Re: Admin Dark & Light Mode - Cosmetic Fixes

Post by Fiber »

Addition: I always copy a few hooks, e.g. tinymce.php, and with this code it is also dark or light. For those interested, here is the script part:

Code: Select all

<script>
(() => {
const adminTheme =
  document.documentElement.getAttribute('data-bs-theme');

const isDark = adminTheme === 'dark';
const editorTheme = isDark ? 'dark' : 'light';

  tinymce.init({
    selector: 'textarea[name^="products_description"], textarea[name^="catalog_description"], textarea[name^="manufacturers_description"], textarea[name^="content"], textarea[name^="configuration_value"], textarea[name^="faq_answer"], textarea[name^="advert_html_text"], textarea[name^="message"], textarea[name^="orders_comments_text"], textarea[name^="categories_extra_description"], textarea[name^="messages_content"], textarea[name^="text"], textarea[name^="page_text"]',

    height: 500,
    forced_root_block: false,
    theme: 'silver',

    skin: isDark ? 'oxide-dark' : 'oxide',

    plugins: [
      'advlist autolink lists link image charmap print preview hr anchor pagebreak',
      'searchreplace wordcount visualblocks visualchars code fullscreen',
      'insertdatetime media nonbreaking save table directionality',
      'emoticons template paste textpattern imagetools codesample toc'
    ],

    toolbar1: 'undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
    toolbar2: 'print preview media | forecolor backcolor | codesample fontselect fontsizeselect',

    image_advtab: true,
    relative_urls: false,
    remove_script_host: false,

    content_css: [
      isDark ? 'dark' : 'default',
      'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css',
      'https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css'
    ],

    extended_valid_elements:
      'i[class|style|id],script[!src|defer|type]',

    setup: function (editor) {
      editor.on('init', function () {
        editor.getDoc().documentElement.setAttribute(
          'data-bs-theme',
          editorTheme
        );
      });

      editor.on('change', function () {
        editor.save();
      });
    }
  });
})();
</script>
AI
This Addon was created with the help of Perplexity AI was used to help investigate the dark-mode in tinymce.php AI

User avatar
burt
Core Team
Posts: 4916
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 296 times
Been thanked: 493 times

Re: Admin Dark & Light Mode - Cosmetic Fixes

Post by burt »

Fiber wrote: ↑Sun Nov 08, 2026 10:41 am and I found this which looked strange with urls in admin: admin/products_attributes.php
and admin/catalog.php?cPath=1_3&pID=3&action=new_product
Would this give similar effect?

<tr> <---- remove tabe-success class
<td colspan="3" class="bg-body-tertiary"> <----- add tertiary class

Fiber
100+
Posts: 181
Joined: Mon Oct 26, 2020 12:16 pm
Phoenix Version: v1.1.0.8
Has thanked: 19 times
Been thanked: 28 times

Re: Admin Dark & Light Mode - Cosmetic Fixes

Post by Fiber »

burt wrote: ↑Sun Nov 08, 2026 12:00 pm
Would this give similar effect?

<tr> <---- remove tabe-success class
<td colspan="3" class="bg-body-tertiary"> <----- add tertiary class
Yep :+1:



Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply