зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1756927 - Fix cert viewer long hex item subpixel scaling. r=sgalich
The expandable overflow fields in the cert viewer have 0px border and 1px padding by default, and 1px border and 0px padding on hover. Since subpixel borders are calculated differently from subpixel padding, this causes different results when window scaling factor is not an integer multiple of 1. For 1.5x scaling, an input 1px padding can yield either 2px or 1px output depending on results of scaling algorithm, but an input 1px border will only yield a 1px output, in order to keep the border crisp and symmetric on every edge of the bounding box. So when we hover the long hex field, it may lose 1-2 pixels of height as ~1.5px worth of padding (between 1px and 2px) is replaced with exactly 1px of border. Patch will fix this by just replacing the 1px padding with a 1px transparent border. That way the field's height is a function of the same scaling scheme in all states, so won't change on hover. Differential Revision: https://phabricator.services.mozilla.com/D139563
This commit is contained in:
Родитель
1254b324f7
Коммит
8af8f3feeb
|
@ -31,11 +31,15 @@ label {
|
||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.long-hex {
|
||||||
|
padding: 0;
|
||||||
|
border-block: 1px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
.long-hex:hover {
|
.long-hex:hover {
|
||||||
border-block: 1px solid var(--in-content-border-color);
|
border-block-color: var(--in-content-border-color);
|
||||||
background-color: var(--in-content-item-hover);
|
background-color: var(--in-content-item-hover);
|
||||||
color: var(--in-content-item-hover-text);
|
color: var(--in-content-item-hover-text);
|
||||||
padding: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.hex-open {
|
.hex-open {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче