CSS样式  |  360行  |  7.53 KB

/* Copyright 2013 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file. */

/*******************************************************************************
 *
 * Note:  This is also used by a file in chrome/browser/resources/ssl.  When
 *        updating this file, make sure nothing in that directory regresses.
 *
 ******************************************************************************/

body {
  background-color: #E6E6E6;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 10pt;
  margin: 50px 40px 20px 40px;
}

#main-frame-error {
  margin: auto;
  max-width: 540px;
  min-width: 200px;
}

/* Don't use the main frame div when the error is in a subframe. */
html[subframe] #main-frame-error {
  display: none;
}

/* Don't use the subframe error div when the error is in a main frame. */
html:not([subframe]) #sub-frame-error {
  display: none;
}

#box {
  background-color: #fbfbfb;
  border: 1px solid #AAA;
  border-bottom: 1px solid #888;
  border-radius: 3px;
  color: black;
<if expr="not is_android and not is_ios">
  /* Not done on mobile for performance reasons. */
  box-shadow: 0px 2px 2px #AAA;
</if>
}

#diagnose-button {
  margin-top: 20px;
  margin-bottom: 10px;
  -webkit-margin-start: 0px;
}

#content-top #buttons,
#content-top h1 {
  color: #666;
  margin: 10px 0px 30px 0px;
  font-weight: normal;
  font-size: 1.5em;
  text-align: center;
}

h2 {
  color: #666;
  font-size: 1.2em;
  font-weight: normal;
  margin: 10px 0;
}

a {
  color: #15c;
  text-decoration: none;
}

.icon {
  -webkit-user-select: none;
}

.icon-generic {
  /**
   * Can't access chrome://theme/IDR_ERROR_NETWORK_GENERIC from an untrusted
   * renderer process, so embed the resource manually.
   */
  content: -webkit-image-set(
      url('../../app/theme/default_100_percent/common/error_network_generic.png') 1x,
      url('../../app/theme/default_200_percent/common/error_network_generic.png') 2x);
}

.icon-offline {
  content: -webkit-image-set(
      url('../../app/theme/default_100_percent/common/error_network_offline.png') 1x,
      url('../../app/theme/default_200_percent/common/error_network_offline.png') 2x);
}

#content-top {
  margin: 20px;
}

#help-box-outer {
  overflow: hidden;
  -webkit-transition: height ease-in 218ms;
}

#help-box-inner {
  background-color: #f9f9f9;
  border-top: 1px solid #EEE;
  color: #444;
  padding: 20px;
  text-align: start;
}

#suggestion {
  margin-top: 15px;
}

#short-suggestion {
  margin-top: 5px;
}

#sub-frame-error-details {
  color: #8F8F8F;
<if expr="not is_android and not is_ios">
  /* Not done on mobile for performance reasons. */
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
</if>
}

[jscontent=failedUrl] {
  overflow-wrap: break-word;
}

button {
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 2px;
  color: #444;
  -webkit-user-select: none;
<if expr="not is_android">
  /* iOS does not support linear-gradient without a prefix. */
  background-image: -webkit-linear-gradient(#ededed, #ededed 38%, #dedede);
  text-shadow: 0 1px 0 rgb(240, 240, 240);
</if>
<if expr="is_android">
  /* Android uses flat background colors. */
  background-color: #ededed;
  font-weight: bold;
</if>
<if expr="not is_android and not is_ios">
  /* Not done on mobile for performance reasons. */
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.75);
</if>
}

button:hover {
  border: 1px solid rgba(0, 0, 0, 0.3);
  color: #000;
<if expr="not is_android">
  background-image: -webkit-linear-gradient(#f0f0f0, #f0f0f0 38%, #e0e0e0);
</if>
<if expr="is_android">
  background-color: #f0f0f0;
</if>
<if expr="not is_android and not is_ios">
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12), inset 0 1px 2px rgba(255, 255, 255, 0.95);
</if>
}

button:active {
  border: 1px solid rgba(0, 0, 0, 0.3);
  color: #444;
<if expr="not is_android">
  background-image: -webkit-linear-gradient(#e7e7e7, #e7e7e7 38%, #d7d7d7);
</if>
<if expr="is_android">
  background-color: #e7e7e7;
</if>
<if expr="not is_android and not is_ios">
  box-shadow: none;
</if>
}

.text-button {
  margin: 0px 5px;
  min-height: 29px;
  min-width: 65px;
  padding: 7px 13px;
}

.blue-button {
  color: #fff;
<if expr="not is_android">
  background-image: -webkit-linear-gradient(#5d9aff, #5d9aff 38%, #5891f0);
  border: 1px solid rgba(45, 102, 195, 1);
  text-shadow: 0 1px 0 rgba(0,0,0,0.5);
</if>
<if expr="is_android">
  background-color: rgb(39, 180, 231);
  border: 1px solid rgb(0, 152, 206);
</if>
<if expr="not is_android and not is_ios">
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.2);
</if>
}

.blue-button:hover {
  color: #fff;
<if expr="not is_android">
  background-image: -webkit-linear-gradient(#659efd, #659efd 38%, #6097f1);
  border: 1px solid rgba(45, 102, 195, 1);
</if>
<if expr="not is_android and not is_ios">
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.2);
</if>
}

.blue-button:active {
<if expr="not is_android">
  background-image: -webkit-linear-gradient(#6095ed, #6095ed 38%, #6095ed);
  border: 1px solid rgb(38, 84, 160);
</if>
<if expr="is_android">
  background-color: rgb(0, 152, 206);
</if>
<if expr="not is_android and not is_ios">
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
</if>
}

#search-container {
  /* Prevents a space between controls. */
  display: flex;
  margin-top: 20px;
}

#search-box {
  border: 1px solid #cdcdcd;
  flex-grow: 1;
  font-size: 16px;
  height: 26px;
  margin-right: 0;
  padding: 1px 9px;
}

#search-box:focus {
  border: 1px solid #5d9aff;
  outline: none;
}

#search-button {
  border: none;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  box-shadow: none;
  display: flex;
  height: 30px;
  margin: 0;
  width: 60px;
  padding: 0;
}

#search-image {
  content:
      -webkit-image-set(
          url('../../app/theme/default_100_percent/common/omnibox_search_button_loupe.png') 1x,
          url('../../app/theme/default_200_percent/common/omnibox_search_button_loupe.png') 2x);
  margin: auto;
}

.hidden {
  display: none;
}

.suggestions {
  margin-top: 18px;
}

.suggestion-header {
  font-weight: bold;
  margin-bottom: 4px;
}

.suggestion-body {
  color: #777;
}

.error-code {
  color: #A0A0A0;
  margin-top: 15px;
}

/* Increase line height at higher resolutions. */
@media (min-width: 641px) and (min-height: 641px) {
  #help-box-inner {
    line-height: 18px;
  }
}

/* Decrease padding at low sizes. */
@media (max-width: 640px), (max-height: 640px) {
  body {
    margin: 15px;
  }
  h1 {
    margin: 10px 0px 15px 0px;
  }
  #content-top {
    margin: 15px;
  }
  #help-box-inner {
    padding: 20px;
  }
  .suggestions {
    margin-top: 10px;
  }
  .suggestion-header {
    margin-bottom: 0px;
  }
  .error-code {
    margin-top: 10px;
  }
}

/* Don't allow overflow when in a subframe. */
html[subframe] body {
  overflow: hidden;
}

#sub-frame-error {
  -webkit-align-items: center;
  background-color: #DDD;
  display: -webkit-flex;
  -webkit-flex-flow: column;
  height: 100%;
  -webkit-justify-content: center;
  left: 0px;
  position: absolute;
  top: 0px;
  width: 100%;
}

#sub-frame-error:hover {
  background-color: #EEE;
}

#sub-frame-error-details {
  margin: 0 10px;
  visibility: hidden;
}

/* Show details only when hovering. */
#sub-frame-error:hover #sub-frame-error-details {
  visibility: visible;
}

/* If the iframe is too small, always hide the error code. */
/* TODO(mmenke): See if overflow: no-display works better, once supported. */
@media (max-width: 200px), (max-height: 95px) {
  #sub-frame-error-details {
    display: none;
  }
}