Restyle dashboard selection/hover states
Selected/focus state is now represented with a light blue background and a blue outline, while hover is now changed to a slightly darker blue. As a component of this change, some of the colors are replaced with variables set in the app theme. These constants will be reused throughout the app in descendant changes. Bug: Issue 8362 Change-Id: I9498df814d1eab5ff4ec1ebb18de77366b8971c4
This commit is contained in:
@@ -36,16 +36,11 @@ limitations under the License.
|
|||||||
:host {
|
:host {
|
||||||
display: table-row;
|
display: table-row;
|
||||||
}
|
}
|
||||||
:host:focus {
|
:host(:focus) {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
:host(:hover) {
|
:host(:hover) {
|
||||||
background-color: #eeeeee;
|
background-color: #e8effa;
|
||||||
}
|
|
||||||
:host([selected]) {
|
|
||||||
/* Double the value used in the file list due to the parent table having
|
|
||||||
`border-collapse: collapse;` */
|
|
||||||
border-left: .7rem solid var(--color-link);
|
|
||||||
}
|
}
|
||||||
:host([needs-review]) {
|
:host([needs-review]) {
|
||||||
font-family: var(--font-family-bold);
|
font-family: var(--font-family-bold);
|
||||||
@@ -99,12 +94,6 @@ limitations under the License.
|
|||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
.positionIndicator {
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
:host([selected]) .positionIndicator {
|
|
||||||
visibility: visible;
|
|
||||||
}
|
|
||||||
.u-monospace {
|
.u-monospace {
|
||||||
font-family: var(--monospace-font-family);
|
font-family: var(--monospace-font-family);
|
||||||
}
|
}
|
||||||
@@ -129,13 +118,10 @@ limitations under the License.
|
|||||||
:host {
|
:host {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
:host([selected]) {
|
|
||||||
border-left: none;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style include="gr-change-list-styles"></style>
|
<style include="gr-change-list-styles"></style>
|
||||||
<td class="cell keyboard"></td>
|
<td class="cell leftPadding"></td>
|
||||||
<td class="cell star" hidden$="[[!showStar]]" hidden>
|
<td class="cell star" hidden$="[[!showStar]]" hidden>
|
||||||
<gr-change-star change="{{change}}"></gr-change-star>
|
<gr-change-star change="{{change}}"></gr-change-star>
|
||||||
</td>
|
</td>
|
||||||
|
@@ -38,7 +38,7 @@ limitations under the License.
|
|||||||
</style>
|
</style>
|
||||||
<table id="changeList">
|
<table id="changeList">
|
||||||
<tr class="topHeader">
|
<tr class="topHeader">
|
||||||
<th class="keyboard"></th>
|
<th class="leftPadding"></th>
|
||||||
<th class="star" hidden$="[[!showStar]]" hidden></th>
|
<th class="star" hidden$="[[!showStar]]" hidden></th>
|
||||||
<th class="number" hidden$="[[!showNumber]]" hidden>#</th>
|
<th class="number" hidden$="[[!showNumber]]" hidden>#</th>
|
||||||
<template is="dom-repeat" items="[[changeTableColumns]]" as="item">
|
<template is="dom-repeat" items="[[changeTableColumns]]" as="item">
|
||||||
@@ -57,7 +57,7 @@ limitations under the License.
|
|||||||
index-as="sectionIndex">
|
index-as="sectionIndex">
|
||||||
<template is="dom-if" if="[[changeSection.sectionName]]">
|
<template is="dom-if" if="[[changeSection.sectionName]]">
|
||||||
<tr class="groupHeader">
|
<tr class="groupHeader">
|
||||||
<td class="keyboard"></td>
|
<td class="leftPadding"></td>
|
||||||
<td class="star" hidden$="[[!showStar]]" hidden></td>
|
<td class="star" hidden$="[[!showStar]]" hidden></td>
|
||||||
<td class="cell"
|
<td class="cell"
|
||||||
colspan$="[[_computeColspan(changeTableColumns, labelNames)]]">
|
colspan$="[[_computeColspan(changeTableColumns, labelNames)]]">
|
||||||
@@ -69,7 +69,7 @@ limitations under the License.
|
|||||||
</template>
|
</template>
|
||||||
<template is="dom-if" if="[[!changeSection.results.length]]">
|
<template is="dom-if" if="[[!changeSection.results.length]]">
|
||||||
<tr class="noChanges">
|
<tr class="noChanges">
|
||||||
<td class="keyboard"></td>
|
<td class="leftPadding"></td>
|
||||||
<td class="star" hidden$="[[!showStar]]" hidden></td>
|
<td class="star" hidden$="[[!showStar]]" hidden></td>
|
||||||
<td class="cell"
|
<td class="cell"
|
||||||
colspan$="[[_computeColspan(changeTableColumns, labelNames)]]">
|
colspan$="[[_computeColspan(changeTableColumns, labelNames)]]">
|
||||||
|
@@ -23,10 +23,12 @@ limitations under the License.
|
|||||||
--header-icon: none;
|
--header-icon: none;
|
||||||
--header-icon-size: 0em;
|
--header-icon-size: 0em;
|
||||||
--footer-background-color: var(--header-background-color);
|
--footer-background-color: var(--header-background-color);
|
||||||
|
--border-color: #ddd;
|
||||||
|
|
||||||
/* Following are not part of plugin API. */
|
/* Following are not part of plugin API. */
|
||||||
--search-border-color: #ddd;
|
--search-border-color: #ddd;
|
||||||
--selection-background-color: #ebf5fb;
|
--selection-background-color: #f1f5fb;
|
||||||
|
--selection-border-color: #cadcfa;
|
||||||
--default-text-color: #000;
|
--default-text-color: #000;
|
||||||
--view-background-color: #fff;
|
--view-background-color: #fff;
|
||||||
--default-horizontal-margin: 1rem;
|
--default-horizontal-margin: 1rem;
|
||||||
|
@@ -22,7 +22,19 @@ limitations under the License.
|
|||||||
}
|
}
|
||||||
gr-change-list-item,
|
gr-change-list-item,
|
||||||
tr {
|
tr {
|
||||||
border-bottom: 1px solid #ddd;
|
border-top: 1px solid var(--border-color);
|
||||||
|
}
|
||||||
|
gr-change-list-item[selected],
|
||||||
|
gr-change-list-item:focus {
|
||||||
|
background-color: var(--selection-background-color);
|
||||||
|
border: 1px solid var(--selection-border-color);
|
||||||
|
}
|
||||||
|
.topHeader ~ gr-change-list-item:first-of-type,
|
||||||
|
.topHeader + .groupHeader {
|
||||||
|
border-top: none;
|
||||||
|
}
|
||||||
|
tbody {
|
||||||
|
border-bottom: 1px solid var(--border-color);
|
||||||
}
|
}
|
||||||
tr.topHeader {
|
tr.topHeader {
|
||||||
border: none;
|
border: none;
|
||||||
@@ -57,7 +69,7 @@ limitations under the License.
|
|||||||
/* :after pseudoelements are used here because borders on sticky table
|
/* :after pseudoelements are used here because borders on sticky table
|
||||||
headers with a background color are broken. */
|
headers with a background color are broken. */
|
||||||
th:after {
|
th:after {
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid var(--border-color);
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
content: '';
|
content: '';
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -65,7 +77,7 @@ limitations under the License.
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
th.label:after {
|
th.label:after {
|
||||||
border-left: 1px solid #ddd;
|
border-left: 1px solid var(--border-color);
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
.groupHeader {
|
.groupHeader {
|
||||||
@@ -81,14 +93,12 @@ limitations under the License.
|
|||||||
.cell {
|
.cell {
|
||||||
height: 2.25rem;
|
height: 2.25rem;
|
||||||
}
|
}
|
||||||
.keyboard,
|
|
||||||
.star {
|
.star {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
gr-change-star {
|
gr-change-star {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.keyboard,
|
|
||||||
.branch,
|
.branch,
|
||||||
.star,
|
.star,
|
||||||
.label,
|
.label,
|
||||||
@@ -101,18 +111,17 @@ limitations under the License.
|
|||||||
.project {
|
.project {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.keyboard,
|
|
||||||
.star {
|
.star {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
.keyboard {
|
.leftPadding {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
}
|
}
|
||||||
.star {
|
.star {
|
||||||
width: 30px;
|
width: 30px;
|
||||||
}
|
}
|
||||||
.label {
|
.label {
|
||||||
border-left: 1px solid #ddd;
|
border-left: 1px solid var(--border-color);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 3rem;
|
width: 3rem;
|
||||||
}
|
}
|
||||||
@@ -146,12 +155,21 @@ limitations under the License.
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: .25em .5em;
|
padding: .25em .5em;
|
||||||
}
|
}
|
||||||
|
gr-change-list-item[selected],
|
||||||
|
gr-change-list-item:focus {
|
||||||
|
background-color: var(--view-background-color);
|
||||||
|
border: none;
|
||||||
|
border-top: 1px solid var(--border-color);
|
||||||
|
}
|
||||||
|
gr-change-list-item:hover {
|
||||||
|
background-color: var(--view-background-color);
|
||||||
|
}
|
||||||
.cell {
|
.cell {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
.topHeader,
|
.topHeader,
|
||||||
.keyboard,
|
.leftPadding,
|
||||||
.status,
|
.status,
|
||||||
.project,
|
.project,
|
||||||
.branch,
|
.branch,
|
||||||
|
Reference in New Issue
Block a user