Problem/Motivation
Custom themes may implement a different box-sizing model using a snippet like this:
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
When this is the case, the Admin toolbar tools icon changes dimensions when switching from the default theme to the admin theme:
![]()
Proposed resolution
Harden the css for the Admin toolbar tools icon, so the dimensions for the icon are consistent across themes using a different box-sizing model.
Remaining tasks
- Write a patch
- Review
- Commit
User interface changes
The dimensions for the icon are consistent across themes using a different box-sizing model.
API changes
None.
Data model changes
None.
Release notes snippet
The dimensions for the icon are consistent across themes using a different box-sizing model.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | admin_toolbar-harden_tools_icon_css-3026302-2.patch | 774 bytes | idebr |
| admin-toolbar-icon-dimensions.gif | 179.27 KB | idebr |
Comments
Comment #2
idebr commentedAttached patch hardens the css for the Admin toolbar tools icon, so its dimensions are consistent across themes using different box-sizing models.
Comment #3
adriancidThanks @idebr I will check this now and thanks for use the Issue Summary Template.
Comment #4
adriancidHi @idebr can you give an admin theme to test the problem, I tried with 3 different admin themes but I can't reproduce the problem.
Comment #5
idebr commentedAll themes that ship with Drupal Core use the same boxing model (
box-sizing: content-box;), so this issue cannot be reproduced with any Core theme.An example of a theme using a different box-sizing module is the default theme that ships with the Open Social distribution. Its basetheme contains the following snippet:
https://cgit.drupalcode.org/social/tree/themes/socialbase/assets/css/bas...
A demo site is available at https://demo.getopensocial.com/ (Log in as admin following this link: https://demo.getopensocial.com/user/login/4 )
Comment #7
adriancid@idebr thanks for this