Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

2.2 KB
Raw Blame
/*
 *  Copyright 2026 The InfiniFlow Authors. All Rights Reserved.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

/* floating-chat-widget-markdown.less */

.referenceIcon {
  cursor: help;
  vertical-align: -0.125em;
}

.widget-citation-popover {
  max-width: 90vw;
  /* Use viewport width for better responsiveness */
  width: max-content;

  .ant-popover-inner {
    max-height: 400px;
    overflow-y: auto;
  }

  .ant-popover-inner-content {
    padding: 12px;
  }
}

/* Responsive breakpoints for popover width */
@media (min-width: 480px) {
  .widget-citation-popover {
    max-width: 360px;
  }
}

.widget-citation-content {
  p,
  div,
  span,
  button {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
  }
}

.floating-chat-widget {
  /* General styles for markdown content within the widget */
  p,
  div,
  ul,
  ol,
  blockquote {
    line-height: 1.6;
  }

  :global(details.think),
  :global(details.retrieving) {
    padding-inline-start: 0px;
    margin-bottom: 10px;
    font-size: 12px;
    color: rgb(var(--text-secondary));

    summary {
      cursor: pointer;
      font-weight: 500;
      user-select: none;
      color: var(--text-secondary);
      &:hover {
        color: rgb(var(--text-secondary));
      }
    }
  }

  :global(details.think) {
    border-inline-start: 2px solid var(--border-default);
  }

  :global(details.retrieving) {
    border-inline-start: 2px solid var(--border-button);
  }

  /* Enhanced image styles */
  img,
  .ant-image,
  .ant-image-img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    margin: 8px 0 !important;
    display: inline-block !important;
  }
}