Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS styles in Tracy #534

Open
darkWolf-PR opened this issue Feb 18, 2022 · 1 comment
Open

CSS styles in Tracy #534

darkWolf-PR opened this issue Feb 18, 2022 · 1 comment

Comments

@darkWolf-PR
Copy link

Version: 2.9.1

Bug Description

Hi, after upgrade from 2.8.9 to 2.9.1, Tracy´s CSS is getting overriden by CSS from my web app. Not sure, what actually happened, but with 2.8.9, everything was OK, now, I´m getting white texts (and other stuff like active elements) in every panel but System info. It´s taking white text color from my dark admin theme.

Steps To Reproduce

I can make screenshots, but these overrides Tracy´s text color in Router or variable names in dump panel:

.mod-skin-dark:not(.mod-skin-light) code {
background: rgba(0, 0, 0, 0.3);
color: #ffffff;
}
.mod-skin-dark:not(.mod-skin-light) pre {
color: #ffffff;
}

...

Css is normally linked in header(). It´s from large admin design template, it has color switcher for light/dark version.

Expected Behavior

Previous behaviour I guess. It should not be possible to override Tracy´s css from web´s css.

@dg
Copy link
Member

dg commented Mar 16, 2022

The specificity of CSS styles has changed in Tracy 2.9. It used to actively turn off and overwrite other styles, but it is not doing it as strong now. So the intention is to give user styles the chance to "infiltrate" Tracy (see issue #533)

Unwanted styles can affect Tracy, when is class added to <html> or <body> elements (System info panel should be placed in html > body > tracy-div > div > div.tracy-panel). Which is probably the case here.

I'll try to think of a solution.

@nette nette deleted a comment from mrick01 Mar 16, 2022
@nette nette deleted a comment from mrick01 Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants