Skip to content

Improved the design of the web debug toolbar #17109

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

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
'subtle_border_and_shadow': 'background: #FFF; border: 1px solid #E0E0E0; box-shadow: 0px 0px 1px rgba(128, 128, 128, .2);'
} %}

{# when updating any of these colors, do the same in toolbar.css.twig #}
{% set colors = { 'success': '#4F805D', 'warning': '#A46A1F', 'error': '#B0413E' } %}

{# Normalization
(normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css)
========================================================================= #}
Expand Down Expand Up @@ -232,9 +235,9 @@ table tbody ul {
padding: 3px 7px;
white-space: nowrap;
}
.label.status-success { background: #5E976E; color: #FFF; }
.label.status-warning { background: #BC8034; color: #FFF; }
.label.status-error { background: #B0413E; color: #FFF; }
.label.status-success { background: {{ colors.success|raw }}; color: #FFF; }
.label.status-warning { background: {{ colors.warning|raw }}; color: #FFF; }
.label.status-error { background: {{ colors.error|raw }}; color: #FFF; }

{# Metrics
------------------------------------------------------------------------- #}
Expand Down Expand Up @@ -341,11 +344,11 @@ tr.status-warning td {
border-top: 1px solid #FAFAFA;
}

.status-warning .colored {
color: #BC8034;
.status-warning .colored {
color: {{ colors.warning|raw }};
}
.status-error .colored {
color: #B0413E;
color: {{ colors.error|raw }};
}

{# Syntax highlighting
Expand Down Expand Up @@ -469,9 +472,9 @@ tr.status-warning td {
text-decoration: underline;
}

#summary .status-success { background: #5E976E; }
#summary .status-warning { background: #BC8034; }
#summary .status-error { background: #B0413E; }
#summary .status-success { background: {{ colors.success|raw }}; }
#summary .status-warning { background: {{ colors.warning|raw }}; }
#summary .status-error { background: {{ colors.error|raw }}; }

#summary .status-success h2,
#summary .status-success h2 a,
Expand Down Expand Up @@ -670,10 +673,10 @@ tr.status-warning td {
}

#menu-profiler .label-status-warning .count {
background: #BC8034;
background: {{ colors.warning|raw }};
}
#menu-profiler .label-status-error .count {
background: #B0413E;
background: {{ colors.error|raw }};
}

{# Timeline panel
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{# when updating any of these colors, do the same in profiler.css.twig #}
{% set colors = { 'success': '#4F805D', 'warning': '#A46A1F', 'error': '#B0413E' } %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest adding a comment saying this should stay in sync with the variable defined in profiler.css.twig (and having a similar comment there, so that both sides are warning people). I will avoid mistakes where only one of them is updated

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! Done in 9335290. Thanks.


.sf-minitoolbar {
background-color: #222;
border-top-left-radius: 4px;
Expand Down Expand Up @@ -46,8 +49,8 @@
}
.sf-toolbarreset svg,
.sf-toolbarreset img {
max-height: 24px;
max-width: 24px;
max-height: 20px;
max-width: 20px;
}

.sf-toolbarreset .hide-button {
Expand Down Expand Up @@ -180,30 +183,31 @@
padding: 3px 6px;
margin-bottom: 2px;
vertical-align: middle;
min-width: 6px;
min-width: 15px;
min-height: 13px;
text-align: center;
}

.sf-toolbar-block .sf-toolbar-status-green {
background-color: rgba(117, 158, 43, 0.8);
background-color: {{ colors.success|raw }};
}
.sf-toolbar-block .sf-toolbar-status-red {
background-color: rgba(200, 43, 43, 0.8);
background-color: {{ colors.error|raw }};
}
.sf-toolbar-block .sf-toolbar-status-yellow {
background-color: rgb(189, 132, 0);
background-color: {{ colors.warning|raw }};
}

.sf-toolbar-block.sf-toolbar-status-green {
background-color: rgba(117, 158, 43, 0.8);
background-color: {{ colors.success|raw }};
color: #FFF;
}
.sf-toolbar-block.sf-toolbar-status-red {
background-color: rgba(200, 43, 43, 0.8);
background-color: {{ colors.error|raw }};
color: #FFF;
}
.sf-toolbar-block.sf-toolbar-status-yellow {
background-color: rgb(189, 132, 0);
background-color: {{ colors.warning|raw }};
color: #FFF;
}

Expand Down