1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88

ash / webui / diagnostics_ui / resources / data_point.html [blame]

<style include="diagnostics-shared">
  :host([orientation=horizontal]) {
    line-height: 18px;
  }

  :host([orientation=horizontal]) .header,
  :host([orientation=horizontal]) .value {
    font-size: 12px;
  }

  :host-context(body.jelly-enabled) .header {
    font: var(--cros-body-2-font);
  }

  :host-context(body.jelly-enabled) .value {
    font: var(--cros-body-2-font);
  }


  .data-point {
    display: flex;
  }

  :host([orientation=vertical]) .data-point {
    flex-direction: column;
    height: 40px;
    justify-content: space-between;
    margin: 12px 0;
    width: max-content;
  }

  .header {
    color: var(--cros-text-color-primary);
    font-family: var(--diagnostics-roboto-font-family);
    font-size: 13px;
    font-weight: var(--diagnostics-regular-font-weight);
  }

  :host([orientation=horizontal]) .header {
    margin-inline-end: 16px;
    max-width: 96px;
    min-width: 90px;
  }

  :host([orientation=horizontal]) #headerText::after {
    content: ':';
  }

  #infoIcon {
    --iron-icon-height: 20px;
    --iron-icon-width: 20px;
    bottom: 1px;
    fill: var(--cros-icon-color-secondary);
    left: 4px;
  }

  .value {
    color: var(--cros-text-color-secondary);
    font-family: var(--diagnostics-roboto-font-family);
    font-size: 13px;
    font-weight: var(--diagnostics-regular-font-weight);
    word-wrap: break-word;
  }

  :host([orientation=horizontal]) .value {
    max-width: 150px;
    min-width: 108px;
  }

  .text-red {
    color: var(--cros-color-alert);
  }
</style>
<div class="data-point" tabindex="0" aria-labelledby="headerText value"
    aria-describedby="tooltipText">
  <div class="header">
    <span id="headerText" aria-hidden="true">[[header]]</span>
    <iron-icon slot="icon" icon="diagnostics:info" id="infoIcon"
        hidden$="[[!tooltipText]]">
    </iron-icon>
    <paper-tooltip for="infoIcon" aria-hidden="true">
      <span id="tooltipText">[[tooltipText]]</span>
    </paper-tooltip>
  </div>
  <div class$="[[getValueClass(warningState)]]" id="value" aria-hidden="true">
    [[value]]
  </div>
</div>