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 isn't injected #1

Closed
nafens opened this issue Oct 21, 2014 · 4 comments
Closed

CSS isn't injected #1

nafens opened this issue Oct 21, 2014 · 4 comments

Comments

@nafens
Copy link

nafens commented Oct 21, 2014

This works great as far as the output goes but the styles don't get rendered. To illustrate what I mean look at the following screenshot of an associative array dump:

image
As you can see there are no blue colors applied to the table which is expected for associative array dumps.

@SebastianZ
Copy link
Owner

Yes, the style currently just gets rendered if you add an endOutput(); at the end of your script and have a <head> or <body> tag in your output, because the debug stylesheet is tried to be injected into there. See https://github.com/SebastianZ/PHPDump/blob/master/examples/test.php#L48 and https://github.com/SebastianZ/PHPDump/blob/master/src/debug.php#L546.

I'll try to find a solution where you don't need to do that.

Sebastian

@SebastianZ SebastianZ changed the title Css style issue CSS isn't injected Oct 22, 2014
SebastianZ added a commit that referenced this issue Oct 22, 2014
#1

Removed the requirement to call endOutput() at the end of the script
@SebastianZ
Copy link
Owner

I fixed that by adding a destructor to the DBG class 4b2d4dc.

Note: Currently that class is stateful. I may make it stateless in a later step, i.e. make all functions static.
This would allow to call DBG::dump() and avoid the need to inject a $DBG variable into the global scope.

Sebastian

@nafens
Copy link
Author

nafens commented Oct 22, 2014

I tested the updated version and the css is now injected. Good job!

@SebastianZ
Copy link
Owner

Great! Thanks for the verification.

Sebastian

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