-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Var-dumper] Use HtmlDumper without the provided styles #16618
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
Comments
I think you could overwrite getDumpHeader to amend the default css/js or use setDumpHeader to completely overwrite the css/js by your own, would it work for your use case? See also setDumpBoundaries just in case |
@nicolas-grekas thx for your feedback. the actual question is, if this kind of changes should be possible thru the class api or if it is not and therefore is meant to be achieved by subclassing.. |
I think it can be done both ways:
I've no preference for now. Do you have one? |
sounds like something which heavily relies on impl. details... therefore I dont like it.
This means I need to subclass and override, right? Maybe just adding a flag to
|
@nicolas-grekas could you think about this feature request? If implemented, we could use VarDumper whenever we need to dump variables in Symfony (which is a very common need, as explained in #18074). Thanks! |
@staabm one year later, what's you stand on this one? Can we close this issue? Or would you like to work on a PR? |
The recent releases work pretty well for us, so no need for further changes from my side. |
ATM it is not easy to use the var-dumper and its HtmlDumper without all those styles which come with it.
As the default colors doesnt look good in our app I tried
setStyles
, which doesnt override builtin styles nicely, because it only overrides certain aspects.That means I can override everything built in now, but new versions which might define new styles wont work (so no forward compatibility).
at best I could just do
$dumper->setStyles(array());
but this does not change anything.best I can do is
but the component still generates some styles with padding,margin with the
sf-dump
classes.Also this kind of override generates a lot of empty css selectors for nothing...
My use case is: re-use the existing expand/collapse functionality but without all the css brought with it.
The text was updated successfully, but these errors were encountered: