question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CSS property 'background' with 'background-clip: text'

See original GitHub issue

Problem

In Dynamic theme, text with gradient (using background: linear-gradient() and background-clip: text) is not readable.

Possible cause/solution

I do not fully understand how Dark Reader works but maybe, in Dynamic theme, Dark Reader treats CSS property background the same whether or not it is used with CSS property background-clip: text;. This results in making the color of text darker rather than lighter. Treating CSS property background with background-clip: text in the same way as CSS property color may help solve the problem.

Example

I am working on a project named Softorage. You may visit it with Dark Reader set to on (Dynamic theme), to see the issue in action.

Thanks for this awesome extension!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
Gustedcommented, Apr 20, 2020

I’ve created a fix for this #2336

1reaction
Gustedcommented, Apr 19, 2020

I’m sorry. I didn’t understand the question. The class .tg is correct, if that is what you’re asking.

nvm figured it out

Should darkreader be darkening a linear-gradient when there is CSS property background-clip: text; with it (where ‘it’ is background: linear-gradient(...);)? I was under the impression that background-clip: text; makes the background color (linear-gradient or not) appear as if it is text color (subject to color: transperant; being set). Please correct me if wrong.

After taking a good look at this documentation from Mozilla background-clip is just being used to define/extend where hte background-color should be as color: don’t support linear gradient. It use background-clip: text so the background-color is being used as the color.

I appreciate your efforts.

I’m just doing my job

Read more comments on GitHub >

github_iconTop Results From Across the Web

background-clip - CSS: Cascading Style Sheets | MDN
The background-clip CSS property sets whether an element's background extends underneath its border box, padding box, or content box.
Read more >
CSS background-clip text | Michael Gearon
The “background-clip: text” is supported in all main browsers with the Webkit prefix, it allows a background image to be clipped by a...
Read more >
background-clip | CSS-Tricks
background -clip lets you control how far a background image or color extends beyond an element's padding or content.
Read more >
Background-clip: text | Can I use... Support tables for HTML5 ...
Non-standard method of clipping a background image to the foreground text. Usage % of. all users, all tracked, tracked desktop, tracked mobile.
Read more >
Funky text backgrounds with background-clip CSS - Rob Kendal
The background-clip is a CSS property that determines whether an element's background is visible/shows underneath the content's border box, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found