Files
gerrit/polygerrit-ui/app/styles/gr-change-list-styles.html
Hoa Tran ecbf06a671 Remove the left indent for class gr-main-header (PolyGerrit)
The patch set includes:
- Align the left indent of the header.
- Align the left indent of the list in Dashboard page.
- Align the left indent of the menu items in Admin page.

Bug: Issue 6339
Change-Id: I4c91cd3eaf02b14d2846135f585f2f9fa48fa015
2018-05-08 23:42:17 +07:00

213 lines
5.4 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>
:host {
font-size: var(--font-size-normal);
}
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),
.cell:not(.label) {
padding-right: 8px;
}
th.label {
border-left: none;
}
.topHeader,
.groupHeader {
font-family: var(--font-family-bold);
}
.topHeader th {
background-color: var(--table-header-background-color);
font-size: var(--font-size-large);
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 {
height: 2.25rem;
}
.star {
padding: 0;
}
gr-change-star {
vertical-align: middle;
}
.branch,
.star,
.label,
.number,
.owner,
.assignee,
.updated,
.size,
.status,
.project {
white-space: nowrap;
}
.star {
vertical-align: middle;
}
.leftPadding {
width: var(--default-horizontal-margin);
}
.star {
width: 30px;
}
.label {
border-left: 1px solid var(--border-color);
text-align: center;
width: 3rem;
}
.topHeader .label {
border: none;
}
.truncatedProject {
display: none;
}
@media only screen and (max-width: 100em) {
.assignee,
.branch,
.owner {
overflow: hidden;
max-width: 10rem;
text-overflow: ellipsis;
}
.truncatedProject {
display: inline-block;
}
.fullProject {
display: none;
}
}
@media only screen and (max-width: 50em) {
:host {
font-size: var(--font-size-large);
}
gr-change-list-item {
flex-wrap: wrap;
justify-content: space-between;
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 {
align-items: center;
display: flex;
}
.topHeader,
.leftPadding,
.status,
.project,
.branch,
.updated,
.label,
.assignee,
.groupHeader .star,
.noChanges .star {
display: none;
}
.groupHeader .cell,
.noChanges .cell {
padding: 0 .5em;
}
.subject {
margin-bottom: .25em;
width: calc(100% - 2em);
}
.owner,
.size {
max-width: none;
}
}
@media only screen and (min-width: 1450px) {
:host {
font-size: 14px;
}
}
</style>
</template>
</dom-module>