Commit e2effe43 authored by Cliff Smolinsky's avatar Cliff Smolinsky Committed by Commit Bot

Adjust CSS for certificate viewer dialog to support scaling.

This change makes a few updates to the certificate viewer css:
- Adds minheights to the three sections of the details tab
- Changes layout to relative
- Updates to use flex instead of -webkit-box (per presubmit)

Bug: 1023970
Change-Id: Ia782ced8132be1ece4237b86eb5692297f2dd9e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1913574Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Cliff Smolinsky <cliffsmo@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#715015}
parent c52bb558
/* Copyright (c) 2012 The Chromium Authors. All rights reserved. /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be * Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. */ * found in the LICENSE file. */
/* Using 100% width within body should exclude margins. */ /* Using 100% width within body should exclude margins. */
html, html,
body { body {
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
body { body {
-webkit-box-sizing: border-box; box-sizing: border-box;
margin: 0; margin: 0;
} }
h3 { h3 {
font-size: 100%; font-size: 100%;
margin-bottom: 15px; margin-bottom: 15px;
margin-top: 17px; margin-top: 17px;
} }
#usages-title { #usages-title {
/* Workaround until webkit bug https://bugs.webkit.org/show_bug.cgi?id=80537 /* Workaround until webkit bug https://bugs.webkit.org/show_bug.cgi?id=80537
* is resolved. */ * is resolved. */
padding-top: 17px; padding-top: 17px;
} }
#tabbox { #tabbox {
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
#tabpanels { #tabpanels {
overflow: auto; overflow: auto;
} }
#usages, #usages,
#cert-field-value { #cert-field-value {
padding-inline-start: 15px; padding-inline-start: 15px;
white-space: pre-wrap; white-space: pre-wrap;
} }
#general h3 { #general h3 {
margin-bottom: 16px; margin-bottom: 16px;
margin-top: 32px; margin-top: 32px;
} }
.groups { .groups {
display: table; display: table;
} }
.groups > * { .groups > * {
display: table-row; display: table-row;
} }
#usages, #usages,
.groups > div > div { .groups > div > div {
color: #616161; color: #616161;
line-height: 18px; line-height: 18px;
padding-inline-start: 20px; padding-inline-start: 20px;
} }
.attribute { .attribute {
display: table-cell; display: table-cell;
white-space: nowrap; white-space: nowrap;
} }
.value { .value {
display: table-cell; display: table-cell;
white-space: pre-wrap; white-space: pre-wrap;
} }
/* Used so that 100% width within tabpanel will correspond to usable space. */ /* Used so that 100% width within tabpanel will correspond to usable space. */
tabpanel { tabpanel {
position: relative; position: relative;
} }
.vertical-box { .vertical-box {
-webkit-box-align: stretch; display: flex;
-webkit-box-orient: vertical; flex-direction: column;
-webkit-box-pack: start; height: 100%;
display: -webkit-box; position: relative;
height: 100%; width: 100%;
position: absolute; }
width: 100%;
} /* The minimum heights defined for the three sections are calculated based on
* the percentage of rendered height at 100% scaling. The dialog height is
#hierarchy-section { * defined in CertificateViewerDialog::GetDialogSize. */
height: 20%; #hierarchy-section {
top: 0; height: 20%;
} min-height: 117px;
top: 0;
#cert-fields-section { }
height: 50%;
top: 20%; #cert-fields-section {
} height: 50%;
min-height: 294px;
#cert-field-value-section { }
bottom: 0;
height: 30%; #cert-field-value-section {
} bottom: 0;
height: 30%;
.section-contents { min-height: 126px;
-webkit-box-flex: 1; }
background: #fff;
border: 1px solid #c8c8c8; .section-contents {
/* Scrolling should be enabled on all tree views and value field. */ background: #fff;
overflow: auto; border: 1px solid #c8c8c8;
} flex: 1 1 auto;
/* Scrolling should be enabled on all tree views and value field. */
.tree-row[selected] { overflow: auto;
background-color: #f0f0f0; }
background-image: none;
} .tree-row[selected] {
background-color: #f0f0f0;
.tree-item > .tree-row { background-image: none;
border: 0; }
border-radius: 0;
line-height: 29px; .tree-item > .tree-row {
} border: 0;
border-radius: 0;
#export { line-height: 29px;
float: right; }
margin-bottom: 20px;
margin-inline-start: 1px; #export {
margin-top: 10px; float: right;
} margin-bottom: 20px;
margin-inline-start: 1px;
margin-top: 10px;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment