Closed (fixed)
Project:
Admin Toolbar
Version:
8.x-2.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Oct 2020 at 05:50 UTC
Updated:
2 Nov 2020 at 22:54 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
cobenashProvided patch to fix this.
Comment #3
cobenashComment #4
cobenashComment #5
cobenashComment #6
adriancidI'm not able to reproduce the problem in Drupal8, Drupal9.
Can you add t he steps to reproduce?
Comment #7
adriancidWhat theme are you using?
Comment #8
cobenash@adriancid
I use the bootstrap_sass theme. I think the problem will occur when we use most of the RWD theme.
Most of the themes will add the following attributes to keep the RWD layout.
That's the reason I think we should add this as default, and basically, it's the same attributes as the Drupal 9 logo icon.
The following code is for drupal 9.
Comment #9
cobenash@adriancid
I think the following steps are much clear. :)
Steps to Reproduce:
1. Use the admin toolbar 8.x-2.4
2. Use Bootstrap Theme or include any bootstrap css library.
Before add the bootstrap library.

After add the bootstrap library.

The bootstrap theme add " box-sizing: border-box;" in the bootstrap css library.

Here is the code link: https://github.com/twbs/bootstrap/blob/main/scss/_reboot.scss
Line 19.
Comment #10
g-brodieiAfter reproducing, this is what I'd found.
The box-sizing property is only missing in 2.4 version. I believe this should be set as "border-box" to accommodate the sizing under smaller screens. This is what it appears to be if not set, see large logo.
While on 2.3 version, the box-sizing property was set to "content-box" (guess it was removed from 2.4 since this is the default value for this property). content-box does not include the border and padding size, which the logo icon will remain with 20px that exceeds the container height.
See fix with box-sizing:border-box on 2.4.

See screen shot for css styling of 2.3 against 2.4 comparison.

ver. 2.3
ver.2.4

Setting back to "needs work" so we allow admin_toolbar to fit with rwd settings.
Comment #11
cobenashComment #12
g-brodieiSorry, I misunderstood the description of this bug. Allow me to re-explain my discovery. In short, the behaviour of logo icon size shrinking does happen on 2.4, not 2.3 when applying bootstrap themes (not as an admin theme).
It seems that admin_toolbar has set box-sizing: "content-box" just to maintain icon's size by default on 2.3, and was removed on 2.4, thus the icon's size aspect is overridden by other responsive themes like bootstrap when they apply box-sizing: border-box.
Is the removal of box-sizing: content-box; in ver. 2.4 made by purpose??
If we want it to remain the same spec for logo icon as ver. 2.3. Then this patch applies perfectly.
If not and it was done on purpose, then this issue should be set to (work as design).
Updated issue summary for steps to reproduce.
Setting back to need review.
Comment #13
idebr commentedThis change was introduced in #3158374: Show Drupal Icon depending on which drupal major version it is.. It was not a deliberate design choice, but rather an oversight when copy/pasting CSS.
Comment #14
skaughtComment #15
skaught^^ in terms of original work from #3158374: Show Drupal Icon depending on which drupal major version it is. -- if I removed this is was an oversight. I am not familiar more directly with this modules lifespan to know about any other related changes.
also:
is this just thru bootstrap themes? will this be over compensate with any other general themes? is that being QA'd in anyway in this issue?
=====
edit/add-in:
Question: should this issue be open against the Bootstrap theme?
Comment #16
idebr commented#15 This is not specific for bootstrap. See #3026302: Admin toolbar icon width/height changes for themes based on box-sizing: border-box where the box-sizing was introduced for more information.
Comment #18
adriancidThanks to @all?
Comment #19
g-brodieiThanks for providing all the relevant information!! Heaps of help knowing the context.