zu 0.3.3

Yew web components, implementing Material Design
Documentation
// Copyright (c) 2024 Xu Shaohua <shaohua@biofan.org>. All rights reserved.
// Use of this source is governed by Lesser General Public License
// that can be found in the LICENSE file.

/* Styles for Code */

.ZuCode-root {
  position: relative;

  color: var(--zu-palette-primary-contrastText);
}

.ZuCode-pre {
  line-height: 1.5;
  margin: 16px auto;
  padding: 16px;
  overflow: auto;
  max-width: calc(100vw - 32px);
  max-height: 400px;

  background-color: var(--zu-palette-primary-dark, #001E3C);
  //color: #f8f8f2;
  border-radius: var(--zu-shape-borderRadius);
  border: 1px solid;
  border-color: var(--zu-palette-primary-dark, #132F4C);

  font-size: 0.8125rem;
}

.ZuCode-code {
  -webkit-font-smoothing: subpixel-antialiased;
}

.ZuCode-code,
.ZuCode-pre {
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  hyphens: none;
}

.ZuCode-copy {
  position: absolute;
  top: 8px;
  right: 8px;

  display: none;
  min-width: 64px;
  padding: 4px 8px;

  border-radius: var(--zu-shape-borderRadius);
  border: 1px solid #1E4976;
  color: #E2EDF8;
  background-color: rgba(23, 58, 94, 0.5);

  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;

  cursor: pointer;
}

.ZuCode-root:hover .ZuCode-copy {
  display: block;
}