Add body class when webprofiler is injected and opened
Problem/Motivation
In case we want to fix some markups in bottom of the page, we cannot know if webprofiler is present from CSS. In case webprofiler is injected and opened (or not), we could choose to add a bottom margin to our markup.
Example:
I want to fix actions buttons on bottom of the page. If webprofiler is injected, my buttons are below webprofiler of or buttons are above, but in any cases, one is hidden by other, and i have no way in CSS to know if webprofiler is injected and opened.
Proposed resolution
Add class to body in preprocess_html if user has permission to display webprofiler. Add body class when javascript open/close the toolbar.
Edited by Fabien Clément