-
-
Notifications
You must be signed in to change notification settings - Fork 221
The "#tracy-debug *" in barr.css break inline css for new addition #151
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
Conversation
Fixing Global Style of Tracy Debug DIV that affects (breaks) other elements added into the Debugger Dialog with inline CSS. Very small visual modification to other elements (actually an improvement for almost all cases)
Fixing error previously create by me (misinterpretation of the composer documentation)
|
My bad modifying the composer.json. I misinterpreted something I read on COMPOSER documentation. I didn't know how to remove the committed file so I revert the change and re-commit it. |
|
Reseting CSS is necessary. Write inline CSS this way https://github.com/nette/database/blob/cbf22d4107376489068a3be605e2de2bdb189cbd/src/Bridges/DatabaseTracy/templates/ConnectionPanel.panel.phtml#L10-L13 |
|
That is not right. In fact, I am using Tracy outside Nette Framework. I am creating a new use Tracy\IBarPanel; // Adding NewBarPanel PANEL on Tracy Debug Bar The problem is that the HTML returned by getPanel(), which goes INSIDE the Please, review it and try it.. You will notice it works fine. Regards, Julio Marchi © This e-mail and any attachments may contain information which is On Sun, Mar 20, 2016 at 8:49 PM, David Grudl notifications@github.com
|
|
I was reviewing my proposal and I have another one... A better thought one... ;) I would suggest a simple CSS RULE definition change, which would not affect anything, yet allowing new "plugins" to add more complex code/JS/CSS to the dialogs. Simply try changing the definition of the style from
to:
The rest may continue the same... This way it would not only solve all problems I foresee with the forceful reset absolute all CSS rules allowed inside the dialog. Fact is, as it is it is hard to integrate other products to work with the DebugBar. By fixing the CSS it will open a wider range of options for lots of other people to integrate the DebugBar in their projects and, then, whatever they need in the DebugBar. At this point, as a test, I wrote a small JS that run through the SCCOM (SCC DOM) to identify and remove the Style you have defined, just to re-add it using the proposed header above. By doing that (hacking it) I keep the repository intact while fixing the CSS on-the-fly (which should not be needed). However, as result I have a fully functional KINT integration with PHP DebugBar, beautifully working together as one for the enjoyment of developers who love both tools. I hope you see my point... If not, take a look on the screen-shot! ;) Best Regards, |
New implementation of #tracy-debug * CSS rule to prevent sub-elements added under #tracy-debug object from having their CSS rules overwritten by the "*" defined in #tracy-debug *. It allows easier integration of Third Party products to have their results displayed using PHP DebugBar dialogs without affecting neither Tracy Debug Bar design/functionalities or the Third Party HTML/CSS/JS.
|
I don't understand |
|
I haven't looked through this PR, but just wanted to add my support for fixing the issue it addresses - I have certainly had more than a few hassles integrating custom panels. I have also noticed the opposite problem in that the styling of panel content is often affected by the CSS of the site itself. I have had to apply a hardcoded overrides to keep font sizes and other things from being messed up. |
This is fairly well handled already by Tracy itself (it resets CSS for most problematic properties). If you think that there are more CSS properties that should be reset by Tracy itself consider sending PR. |
|
@JanTvrdik it is mission impossible. Something like will affect Bar. Important is (and it is a reason why |
|
I know this has been closed, but There are several issues.
Couldn't that rule be more targeted - either to just the needed elements, or perhaps to just the debug bar, rather than the all-encompassing tracy-debug div. That way it wouldn't affect the content of the panels. Thanks kindly for reconsidering. |
|
@dg - This may not be quite perfect, but this works really well for me. Here are the declarations I changed. The key thing is changing I also modified the font and color in the table cells - I stuck with inherit as you have it, but I actually wonder if defining actual values might be better. The last thing is adding Maybe this is not completely robust just yet, but it is now possible to incorporate css from external libraries into panels, which I agree is essential. It's working great for my use with ACEEditor. Please let me know if you are willing to adapt to something like this. I can send a new PR if you want, but I have a feeling you'll want to tweak it anyways. Thanks! |

With this CSS rule as it is it becomes very hard to expand Tracy.
With the proposed modification very little visual impact exist while freeing new addition to implement inline CSS on desired elements without Tracy rules affecting it.