Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

2.6 KB
Raw Blame
.protyle {
  overflow-x: hidden;
  background-color: var(--b3-theme-background);
  position: relative;
  max-height: 100%;
  min-height: 155px; // 需考虑 scroll 最小高度
  display: flex;
  flex-direction: column;

  &.rtl {
    .protyle-title__input:not([dir]),
    .protyle-wysiwyg .p,
    .protyle-wysiwyg .table table,
    .protyle-wysiwyg .render-node protyle-html,
    .protyle-wysiwyg [data-type="NodeHeading"],
    .b3-typography .callout .callout-info, .protyle-wysiwyg .callout .callout-info {
      direction: rtl
    }

    .protyle-wysiwyg [data-node-id].li:not([data-auto-direction]) > .protyle-action {
      right: 0;
      left: auto;
      direction: rtl;
    }

    .protyle-wysiwyg [data-node-id].li:not([data-auto-direction]) > [data-node-id] {
      margin-right: 34px;
      margin-left: 0;
    }

    .protyle-wysiwyg [data-node-id].li:not([data-auto-direction])::before {
      right: 17px;
      left: auto;
    }

    .b3-typography table:not([style*="text-align: left"]) {
      margin-left: auto;
    }

    .b3-typography blockquote, .b3-typography .bq, .protyle-wysiwyg blockquote, .protyle-wysiwyg .bq,
    .b3-typography .callout, .protyle-wysiwyg .callout {
      padding-right: calc(0.25em + 6px);
      padding-left: 4px;

      &::before {
        right: 2px;
        left: auto;
      }
    }
  }

  &-preview {
    flex: 1;
    user-select: text;
    min-width: 1px;
    overflow: auto;
    background-color: var(--b3-theme-background);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;

    &__action {
      text-align: center;
      padding: 10px;
      background-color: var(--b3-theme-surface);

      button {
        background-color: var(--b3-theme-surface);
        color: var(--b3-theme-on-surface);
        line-height: 20px;
        border: 0;
        margin: 0 10px;
        cursor: pointer;
        padding: 0 7px;
        font-size: 12px;

        &.protyle-preview__action--current,
        &:hover {
          color: var(--b3-theme-primary);
          background-color: var(--b3-theme-surface);
        }

        &:focus {
          outline: none;
        }

        svg {
          fill: currentColor;
          height: 15px;
          width: 15px;
          vertical-align: middle;
        }
      }
    }

    & > .b3-typography {
      padding: 8px 16px;
      margin: 0 auto;
      overflow: auto;
      width: 100%;
      box-sizing: border-box;
    }
  }

  &-upload {
    position: absolute;
    height: 3px;
    left: 0;
    top: -2px;
    transition: var(--b3-transition);
    background-color: var(--b3-theme-primary);
  }
}