Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2024-01-29 19:41:38

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,304
Website GitHub

navlink in dark mode

Just sprucing up an ancient plugin and getting rid of PHP 8 warnings, etc.

It has its own buttons that use class="navlink" but they render in light blue text on a whiteish background when dark mode kicks in. Should the plugin be using a different class for buttons? The class definitions appear to be coming from core (may be some override somewhere in the chain?)

What am I doing wrong?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#2 2024-01-29 20:52:31

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,633
Website

Re: navlink in dark mode

Might Phil’s design patterns for hive admin 4.8 and hive admin 4.9 help at all?

You should be able to switch between light and dark in the devtools. Phil has a light/dark mode switch in the sidebar.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2024-01-29 21:31:39

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,304
Website GitHub

Re: navlink in dark mode

jakob wrote #336503:

Might Phil’s design patterns for hive admin 4.8 and hive admin 4.9 help at all?

Yes and no, thank you for reminding me. The backgrounds of navlink buttons in dark mode are indeed off-white but the text is meant to be black. For some reason it’s rendering light blue in the plugin, and getting its style rule from textpattern.css in the Hive theme. That’s what’s doing my head in. --clr-a is defined as light blue in the body.darkmode block, yet in the design-pattern it’s black.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#4 2024-01-29 21:33:39

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,633
Website

Re: navlink in dark mode

Is it better with class="navlink" on the anchor itself?


TXP Builders – finely-crafted code, design and txp

Offline

#5 2024-01-29 22:03:21

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,304
Website GitHub

Re: navlink in dark mode

jakob wrote #336505:

Is it better with class="navlink" on the anchor itself?

Much :)

Swear I tried that, but I must have not. Thank you so much.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#6 2024-01-29 22:05:27

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,633
Website

Re: navlink in dark mode

Bloke wrote #336506:

Much :)

Swear I tried that, but I must have not. Thank you so much.

👍


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB