зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1826072 - Don't flex permission state label. r=pbz
Err, so the original patch is necessary but not sufficient, and I clearly goofed my testing (I had removed this attribute in a separate commit). The issue is that this button ends up with a markup like: <button class="permission-popup-permission-remove-button"> <label flex="1" class="permission-popup-permission-state-label">Allowed Temporarily</label> <hbox class="box-inherit button-box" align="center" pack="center" flex="1" anonid="button-box"> <image class="button-icon"/> <label class="button-text"/> </hbox> </button> So the label and hbox divide the available space in half. Removing any of the flex="1" attributes would cause the desired rendering. I don't think the hbox needs to be flexible tbh, but ok, that's a riskier change. I'm pretty sure the label in this case doesn't need to be flexible at all though, specially since we don't want these buttons to take any minimum amount of space. An alternative would be to use `flex: 1 auto` or so for the label (via CSS). That'd match the pre-regression behavior more exactly, but again I don't think flexing the label is needed at all. Depends on D174706 Differential Revision: https://phabricator.services.mozilla.com/D174707
This commit is contained in:
Родитель
6ef9d65acb
Коммит
1e06c8368f
|
@ -735,7 +735,6 @@ var gPermissionPanel = {
|
|||
|
||||
_createStateLabel(aPermission, idNoSuffix) {
|
||||
let label = document.createXULElement("label");
|
||||
label.setAttribute("flex", "1");
|
||||
label.setAttribute("class", "permission-popup-permission-state-label");
|
||||
let labelId = `permission-popup-permission-state-label-${idNoSuffix}-${this
|
||||
._permissionLabelIndex++}`;
|
||||
|
|
Загрузка…
Ссылка в новой задаче