Bug 1537724 - Make text selection visible in TreeView inputs; r=Honza

Differential Revision: https://phabricator.services.mozilla.com/D24375

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Florens Verschelde 2019-03-25 12:24:54 +00:00
Родитель 690d92ac23
Коммит 9d9c19e064
3 изменённых файлов: 45 добавлений и 49 удалений

Просмотреть файл

@ -134,14 +134,6 @@
padding-inline-end: 5px; padding-inline-end: 5px;
} }
.network-monitor .tree-container .treeTable .treeValueCell input {
color: var(--string-color);
}
.network-monitor .tree-container .treeTable .treeValueCell input:focus {
color: var(--theme-selection-color) !important;
}
.network-monitor .tree-container .treeTable .treeRow.hasChildren > .treeLabelCell > .treeLabel:hover { .network-monitor .tree-container .treeTable .treeRow.hasChildren > .treeLabelCell > .treeLabel:hover {
text-decoration: none; text-decoration: none;
} }

Просмотреть файл

@ -4,18 +4,28 @@
/* Learn more links */ /* Learn more links */
.network-monitor .learn-more-link {
display: inline-block;
vertical-align: middle;
}
.network-monitor .learn-more-link::before { .network-monitor .learn-more-link::before {
display: block;
margin: 0;
background-image: url(chrome://devtools/skin/images/help.svg); background-image: url(chrome://devtools/skin/images/help.svg);
background-position: center;
background-size: contain; background-size: contain;
} }
.network-monitor .tree-container .treeTable tr .learn-more-link { .network-monitor .tree-container .learn-more-link {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; inset-inline-start: 6px;
padding: 0; /* Override devtools-button styles to make this button 20x20,
* so that the icon is vertically centered in the table row */
padding: 2px;
} }
.network-monitor .tree-container .treeTable tr:not(:hover) .learn-more-link { .network-monitor .tree-container tr:not(:hover) .learn-more-link {
opacity: 0.4; opacity: 0.4;
} }

Просмотреть файл

@ -16,10 +16,22 @@
/******************************************************************************/ /******************************************************************************/
/* TreeView Table*/ /* TreeView Table*/
.treeTable .treeLabelCell { .treeTable {
color: var(--theme-highlight-blue);
}
.treeTable .treeLabelCell,
.treeTable .treeValueCell {
padding: 2px 0; padding: 2px 0;
line-height: 16px; /* make rows 20px tall */
padding-inline-start: 4px;
vertical-align: top; vertical-align: top;
overflow: hidden;
}
.treeTable .treeLabelCell {
white-space: nowrap; white-space: nowrap;
cursor: default;
} }
.treeTable .treeLabelCell::after { .treeTable .treeLabelCell::after {
@ -27,36 +39,27 @@
color: var(--object-color); color: var(--object-color);
} }
.treeTable .treeValueCell {
padding: 2px 0;
padding-inline-start: 5px;
overflow: hidden;
}
.treeTable .treeValueCell.inputEnabled { .treeTable .treeValueCell.inputEnabled {
padding-top: 0; padding-top: 0;
padding-bottom: 0; padding-bottom: 0;
} }
.treeTable .treeValueCell input { .treeTable .treeValueCell.inputEnabled input {
width: 100%; width: 100%;
background: none; height: 20px;
border: none; margin: 0;
color: inherit; margin-inline-start: -2px;
margin-inline-end: 2px; border: solid 1px transparent;
}
.treeTable .treeValueCell input:focus {
outline: none; outline: none;
box-shadow: var(--theme-focus-box-shadow-textbox); box-shadow: none;
transition: all 0.2s ease-in-out; padding: 0 1px;
color: var(--theme-content-color1);
background: var(--theme-sidebar-background);
} }
.treeTable .treeLabelCell { .treeTable .treeValueCell.inputEnabled input:focus {
cursor: default; border-color: var(--theme-textbox-box-shadow);
overflow: hidden; transition: all 150ms ease-in-out;
padding-inline-start: 4px;
white-space: nowrap;
} }
.treeTable .treeValueCell > [aria-labelledby], .treeTable .treeValueCell > [aria-labelledby],
@ -74,6 +77,12 @@
text-decoration: underline; text-decoration: underline;
} }
/* :not(.selected) is used because row selection styles should have
more precedence than row hovering. */
.treeTable .treeRow:not(.selected):hover {
background-color: var(--theme-selection-background-hover) !important;
}
.treeTable .treeRow.selected { .treeTable .treeRow.selected {
background-color: var(--theme-selection-background); background-color: var(--theme-selection-background);
} }
@ -178,18 +187,3 @@
rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.8) 0%,
transparent 80%); transparent 80%);
} }
/******************************************************************************/
/* Themes */
/* :not(.selected) is used because row selection styles should have
more precedence than row hovering. */
.theme-light .treeTable .treeRow:not(.selected):hover,
.theme-dark .treeTable .treeRow:not(.selected):hover {
background-color: var(--theme-selection-background-hover) !important;
}
.theme-light .treeTable,
.theme-dark .treeTable {
color: var(--theme-highlight-blue);
}