4a809aabdc
Changes the normal font-size from 13px to 14px. Enforces 24px row height in change metadata and change requirements for most rows. Text spans should always be 20px in height, even for icons inputs and gr-autocomplete. Metadata titles are not bold anymore. Converts the --line-height-* css vars from being relative to absolute. That is extremely useful for specifying height of icons in inline layout flow. Reduces tab height (Files, Checks, Change Log, etc.) to 36px. Dashboard, file list and change log rows are all targeted to have 28px height: 20px line-height + 2*4px padding. For the change log this seems too drastic a change, so we are keeping 36px height for now. Reduces the vertical padding in the diff-view header. Makes the comment thread widget nicer by replacing the border with margin, box-shadow and border-radius. Colors the buttons blue and reduces them to the 20px line height. Change the border color from black to gray. Change-Id: I3fc76c64dc42b61f05cbeb8e3a62629240571080
217 lines
5.5 KiB
HTML
217 lines
5.5 KiB
HTML
<!--
|
|
@license
|
|
Copyright (C) 2015 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
<dom-module id="gr-change-list-styles">
|
|
<template>
|
|
<style>
|
|
gr-change-list-item,
|
|
tr {
|
|
border-top: 1px solid var(--border-color);
|
|
}
|
|
gr-change-list-item[selected],
|
|
gr-change-list-item:focus {
|
|
background-color: var(--selection-background-color);
|
|
}
|
|
/* The border-collapse attribute only works on sibling elements, not
|
|
cousin elements. So, if we want the table to have a sticky header and
|
|
have borders between each row, we must disable the border-top on the
|
|
elements directly below a .topHeader. */
|
|
.topHeader ~ gr-change-list-item:first-of-type,
|
|
.topHeader + .groupHeader {
|
|
border-top: none;
|
|
}
|
|
/* Needed to show a border on top of the first gr-change-list-item when a
|
|
groupHeader exists. Cannot use + selector because of dom-repeats
|
|
existing in the DOM tree. */
|
|
.topHeader ~ .groupHeader ~ gr-change-list-item {
|
|
border-top: 1px solid var(--border-color);
|
|
}
|
|
tbody {
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
tr.topHeader {
|
|
border: none;
|
|
}
|
|
th {
|
|
text-align: left;
|
|
}
|
|
th,
|
|
.cell {
|
|
vertical-align: middle;
|
|
}
|
|
th:not(.label):not(.endpoint),
|
|
.cell:not(.label):not(.endpoint) {
|
|
padding-right: 8px;
|
|
}
|
|
th.label {
|
|
border-left: none;
|
|
}
|
|
.topHeader,
|
|
.groupHeader {
|
|
font-weight: var(--font-weight-bold);
|
|
}
|
|
.topHeader th {
|
|
background-color: var(--table-header-background-color);
|
|
height: 3rem;
|
|
position: -webkit-sticky;
|
|
position: sticky;
|
|
top: -1px; /* Offset for top borders */
|
|
z-index: 1;
|
|
}
|
|
/* :after pseudoelements are used here because borders on sticky table
|
|
headers with a background color are broken. */
|
|
th:after {
|
|
border-bottom: 1px solid var(--border-color);
|
|
bottom: 0;
|
|
content: '';
|
|
left: 0;
|
|
position: absolute;
|
|
width: 100%;
|
|
}
|
|
th.label:after {
|
|
border-left: 1px solid var(--border-color);
|
|
top: 0;
|
|
}
|
|
.groupHeader {
|
|
background-color: var(--table-subheader-background-color);
|
|
}
|
|
.groupHeader a {
|
|
color: var(--primary-text-color);
|
|
text-decoration: none;
|
|
}
|
|
.groupHeader a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
.cell {
|
|
padding: var(--spacing-s) 0;
|
|
}
|
|
.star {
|
|
padding: 0;
|
|
}
|
|
gr-change-star {
|
|
vertical-align: middle;
|
|
}
|
|
.branch,
|
|
.star,
|
|
.label,
|
|
.number,
|
|
.owner,
|
|
.assignee,
|
|
.updated,
|
|
.size,
|
|
.status,
|
|
.repo {
|
|
white-space: nowrap;
|
|
}
|
|
.star {
|
|
vertical-align: middle;
|
|
}
|
|
.leftPadding {
|
|
width: var(--spacing-l);
|
|
}
|
|
.star {
|
|
width: 30px;
|
|
}
|
|
.label, .endpoint {
|
|
border-left: 1px solid var(--border-color);
|
|
}
|
|
.label {
|
|
text-align: center;
|
|
width: 3rem;
|
|
}
|
|
.topHeader .label {
|
|
border: none;
|
|
}
|
|
.truncatedRepo {
|
|
display: none;
|
|
}
|
|
@media only screen and (max-width: 150em) {
|
|
.assignee,
|
|
.branch,
|
|
.owner {
|
|
overflow: hidden;
|
|
max-width: 18rem;
|
|
text-overflow: ellipsis;
|
|
}
|
|
.truncatedRepo {
|
|
display: inline-block;
|
|
}
|
|
.fullRepo {
|
|
display: none;
|
|
}
|
|
}
|
|
@media only screen and (max-width: 100em) {
|
|
.assignee,
|
|
.branch,
|
|
.owner {
|
|
max-width: 10rem;
|
|
}
|
|
}
|
|
@media only screen and (max-width: 50em) {
|
|
:host {
|
|
font-size: var(--font-size-h3);
|
|
}
|
|
gr-change-list-item {
|
|
flex-wrap: wrap;
|
|
justify-content: space-between;
|
|
padding: var(--spacing-xs) var(--spacing-m);
|
|
}
|
|
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 {
|
|
align-items: center;
|
|
display: flex;
|
|
}
|
|
.topHeader,
|
|
.leftPadding,
|
|
.status,
|
|
.repo,
|
|
.branch,
|
|
.updated,
|
|
.label,
|
|
.assignee,
|
|
.groupHeader .star,
|
|
.noChanges .star {
|
|
display: none;
|
|
}
|
|
.groupHeader .cell,
|
|
.noChanges .cell {
|
|
padding: 0 var(--spacing-m);
|
|
}
|
|
.subject {
|
|
margin-bottom: var(--spacing-xs);
|
|
width: calc(100% - 2em);
|
|
}
|
|
.owner,
|
|
.size {
|
|
max-width: none;
|
|
}
|
|
.noChanges .cell {
|
|
display: block;
|
|
height: auto;
|
|
}
|
|
}
|
|
</style>
|
|
</template>
|
|
</dom-module>
|