8000 [Var-dumper] Use HtmlDumper without the provided styles · Issue #16618 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Var-dumper] Use HtmlDumper without the provided styles #16618
Closed
@staabm

Description

@staabm

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

                $styles = array(
                    'default' => '',
                    'num' => '',
                    'const' => '',
                    'str' => '',
                    'note' => '',
                    'ref' => '',
                    'public' => '',
                    'protected' => '',
                    'private' => '',
                    'meta' => '',
                    'key' => '',
                    'index' => '',
                );
                $dumper->setStyles($styles);

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0