| |
| @use "breakpoints" as *; |
| @use "lmf-readout" as lmf; |
|
|
| |
| @use "violin"; |
| @use "buttons"; |
| @use "responsive"; |
| @use "dialog"; |
| @use "demo-list"; |
| @use "loaders"; |
| @use "semantic-analysis"; |
| @use "attribution-inspector"; |
| @use "attribution-sidebar"; |
|
|
| |
| :root { |
| |
| --breakpoint-mobile: #{$breakpoint-mobile}; |
| --breakpoint-tablet: #{$breakpoint-tablet}; |
|
|
| |
| --font-size-base: 10pt; |
| |
| --font-family-ui: |
| -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", "Noto Sans CJK SC", |
| "Source Han Sans SC", sans-serif; |
| |
| --page-chrome-title-size: 18px; |
| --page-chrome-title-weight: 600; |
| --page-chrome-subtitle-size: 15px; |
| --page-chrome-subtitle-weight: 400; |
| --page-chrome-line-height: 1.2; |
| |
| --font-icon: Consolas, Menlo, Monaco, "Courier New", "Droid Sans Mono", monospace; |
| --font-icon-size: 16px; |
|
|
| --bg-color: rgb(255, 255, 255); |
| --text-color: #333; |
| --text-muted: #777; |
| --panel-bg: #fafafa; |
| --border-color: #ddd; |
| --button-bg: #f8f8f8; |
| --button-hover-bg: #f0f0f0; |
| --button-active-bg: #e8e8e8; |
| --button-border: #d0d0d0; |
| --button-text: #333; |
| --input-bg: #fff; |
| --input-border: #d0d0d0; |
| --tooltip-bg: #dddddd; |
| --resizer-bg: #f0f0f0; |
| --resizer-hover: #999; |
| --loading-overlay-bg: rgba(250, 250, 250, 0.5); |
| --loading-spinner-border: #f3f3f3; |
| --loading-spinner-top: #555; |
| --text-action-btn-hover: rgba(0, 0, 0, 0.05); |
| --refresh-btn-hover: #f5f5f5; |
| --refresh-btn-color: #999; |
| --hover-bg-color: #f0f0f0; |
| --bg-hover: #f5f5f5; |
| --bg-hover-light: #f8f8f8; |
| --primary-color: #2196F3; |
| --text-disabled: #999; |
| --text-area-bg: #fff; |
| --minimap-width: 8px; |
| --tooltip-text-normal: #333; |
| --tooltip-text-selected: #933; |
| --tooltip-text-detail: #666666; |
| --tooltip-text-value: #333; |
| --token-hover-shadow: rgba(42, 158, 255, 0.6); |
| --token-hover-outline: #1e6fff; |
| |
| --dag-normal-line-color: #ddd; |
| --dag-highlight-line-color-in: rgba(0, 94, 255, 0.8); |
| --dag-highlight-line-color-out: rgba(255, 71, 64, 0.5); |
| --bin-highlight-outline: #1e6fff; |
| --bin-highlight-shadow: rgba(30, 111, 255, 0.65); |
| --avg-line-color: #8c8c8c; |
| --text-color-light: #c3c3c3; |
| --token-truncated-color: #888; |
| } |
|
|
| |
| html { |
| margin: 0; |
| padding: 0; |
| overflow-x: hidden; |
| width: 100%; |
| max-width: 100vw; |
| |
| touch-action: pan-y; |
| } |
|
|
| |
| :root { |
| color-scheme: light; |
| } |
|
|
| |
| :root[data-theme="dark"] { |
| color-scheme: dark; |
| --bg-color: #191919; |
| --text-color: var(--text-color-light); |
| --text-muted: #888; |
| --panel-bg: #2d2d2d; |
| --border-color: #444; |
| --button-bg: #353535; |
| --button-hover-bg: #454545; |
| --button-active-bg: #505050; |
| --button-border: #555; |
| --button-text: var(--text-color-light); |
| --input-bg: #282828; |
| --input-border: #555; |
| --tooltip-bg: #3a3a3a; |
| --resizer-bg: #2d2d2d; |
| --resizer-hover: #666; |
| --loading-overlay-bg: rgba(25, 25, 25, 0.7); |
| --loading-spinner-border: #3a3a3a; |
| --loading-spinner-top: #888; |
| --text-action-btn-hover: rgba(255, 255, 255, 0.1); |
| --refresh-btn-hover: #3a3a3a; |
| --refresh-btn-color: #888; |
| --hover-bg-color: #3a3a3a; |
| --bg-hover: #2d2d2d; |
| --bg-hover-light: #353535; |
| --primary-color: #5c8dff; |
| --text-disabled: #666; |
| --text-area-bg: #191919; |
| --tooltip-text-normal: #ccc; |
| --tooltip-text-selected: #ff6666; |
| --tooltip-text-detail: #888; |
| --tooltip-text-value: var(--text-color-light); |
| --token-truncated-color: #888; |
| --token-hover-shadow: rgba(66, 165, 255, 0.8); |
| --token-hover-outline: #5c8dff; |
| --dag-normal-line-color: #333; |
| |
| |
| --dag-highlight-line-color-in: rgba(92, 141, 255, 0.8); |
| --dag-highlight-line-color-out: rgba(255, 71, 64, 0.5); |
| --bin-highlight-outline: #5c8dff; |
| --bin-highlight-shadow: rgba(92, 141, 255, 0.8); |
| --avg-line-color: #b0b0b0; |
|
|
| |
| .LMF { |
| font-weight: 300; |
| } |
| } |
|
|
|
|
| |
| body { |
| margin: 0; |
| padding: 0; |
| background-color: var(--bg-color); |
| color: var(--text-color); |
| font-family: var(--font-family-ui); |
| font-weight: 400; |
| font-size: var(--font-size-base); |
| transition: background-color 0.3s ease, color 0.3s ease; |
| overflow-x: hidden; |
| width: 100%; |
| max-width: 100vw; |
| |
| } |
|
|
| a { |
| color: inherit; |
| } |
|
|
| textarea{ |
| font-family: inherit; |
| width: 100%; |
| height: 50px; |
| min-height: 50px; |
| max-height: 300px; |
| box-sizing: border-box; |
| resize: vertical; |
| background-color: var(--input-bg); |
| color: var(--text-color); |
| border: 1px solid var(--input-border); |
| transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; |
| } |
|
|
| .textarea-wrapper { |
| width: 100%; |
| box-sizing: border-box; |
| position: relative; |
| |
| textarea { |
| width: 100%; |
| box-sizing: border-box; |
| resize: vertical; |
| } |
| |
| .textarea-counter { |
| font-size: 8pt; |
| color: var(--text-muted); |
| white-space: nowrap; |
| } |
| |
| .button-group { |
| display: flex; |
| justify-content: space-between; |
| align-items: center; |
| width: 100%; |
| margin-top: 5px; |
| gap: 10px; |
| box-sizing: border-box; |
| flex-wrap: wrap; |
| |
| .button-left { |
| display: flex; |
| align-items: center; |
| gap: 10px; |
| flex-shrink: 0; |
| position: relative; |
| |
| } |
| |
| .button-right { |
| display: flex; |
| align-items: center; |
| gap: 10px; |
| flex-shrink: 0; |
| |
| } |
|
|
| .text-metrics { |
| flex: 1 1 auto; |
| display: flex; |
| flex-direction: column; |
| justify-content: center; |
| align-items: center; |
| gap: 2px; |
| font-size: 8pt; |
| color: var(--text-muted); |
| min-width: 150px; |
| min-height: 32px; |
| transition: opacity 0.2s ease; |
| } |
|
|
| .text-metrics-primary { |
| display: flex; |
| align-items: center; |
| justify-content: center; |
| gap: 6px; |
| flex-wrap: wrap; |
| text-align: center; |
| max-width: 100%; |
| } |
|
|
| .text-metrics-secondary { |
| font-size: 8pt; |
| color: var(--text-muted); |
| text-align: center; |
| } |
|
|
| .text-metrics.is-hidden { |
| visibility: hidden; |
| opacity: 0; |
| } |
|
|
| .text-metrics-secondary.is-hidden { |
| visibility: hidden; |
| opacity: 0; |
| } |
|
|
| .text-metrics-divider { |
| color: var(--text-muted); |
| } |
| } |
| } |
|
|
| |
| .text-action-buttons-top { |
| display: flex; |
| gap: 4px; |
| align-items: center; |
| |
| .textarea-counter { |
| font-size: 8pt; |
| color: var(--text-muted); |
| white-space: nowrap; |
| margin-right: 8px; |
| } |
| } |
|
|
| |
|
|
|
|
| #header { |
| display: table; |
| width: 100%; |
| background-color: lightgray; |
| height: 30px; |
| } |
|
|
| #headertext { |
| display: table-cell; |
| vertical-align: middle; |
| text-align: center; |
| font-size: 18px; |
| font-family: 'Source Sans Pro', sans-serif; |
| } |
|
|
| svg { |
| vertical-align: top; |
| } |
|
|
|
|
| select { |
| font-size: 9pt; |
| font-weight: 600; |
| background-color: var(--input-bg); |
| color: var(--text-color); |
| padding: 8px 6px; |
| -webkit-box-sizing: border-box; |
| -moz-box-sizing: border-box; |
| box-sizing: border-box; |
| border-radius: 4px; |
| border: 1px solid var(--input-border); |
| outline: 0; |
| transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; |
| } |
|
|
| .slider { |
| -webkit-appearance: none; |
| width: 100px; |
| height: 10px; |
| border-radius: 5px; |
| background: #d3d3d3; |
| outline: none; |
| opacity: 0.7; |
| -webkit-transition: .2s; |
| transition: opacity .2s; |
| } |
|
|
| .slider:hover { |
| opacity: 1; |
| } |
|
|
| .slider::-webkit-slider-thumb { |
| -webkit-appearance: none; |
| appearance: none; |
| width: 15px; |
| height: 15px; |
| border-radius: 50%; |
| background: #666666; |
| cursor: pointer; |
| } |
|
|
| #clear_highlight_btn { |
| margin-top: 10px; |
| padding: 4px 12px; |
| font-size: 9pt; |
| cursor: pointer; |
| } |
|
|
| .navbar { |
| position: absolute; |
| top: 0; |
| left: 0; |
| width: 100%; |
| height: 50px; |
| background-color: antiquewhite; |
| } |
|
|
| .navbarContent { |
| margin: 10px 20px; |
|
|
| span { |
| padding-left: 10px; |
| } |
|
|
| button { |
| margin-left: 10px; |
| } |
| } |
|
|
| .navbarTitle { |
| font-size: 12pt; |
| font-weight: bold; |
| } |
|
|
| |
| .floating_content { |
| padding: 0; |
| margin: 0; |
| width: 100%; |
| max-width: 100%; |
| box-sizing: border-box; |
| } |
|
|
| |
| .intro-section { |
| margin-bottom: 15px; |
| |
| p { |
| margin: 8px 0; |
| } |
| } |
|
|
| .intro-brief { |
| font-size: 11pt; |
| } |
|
|
| .intro-brief .intro-token { |
| background-color: rgba(var(--intro-rgb), var(--a, 0)); |
| border-radius: 6px; |
| } |
|
|
| |
| .intro-more { |
| margin-top: 10px; |
| } |
|
|
| |
| .intro-section .intro-more:not([open]) { |
| display: block; |
| width: fit-content; |
| } |
|
|
| |
| .intro-more[open] { |
| display: block; |
| margin-left: 0; |
| border: 1px solid var(--border-color); |
| border-radius: 10px; |
| background: var(--panel-bg); |
| overflow: hidden; |
| } |
|
|
| .intro-more > summary { |
| list-style: none; |
| cursor: pointer; |
| user-select: none; |
| display: flex; |
| align-items: center; |
| justify-content: space-between; |
| gap: 10px; |
| padding: 10px 12px; |
| font-weight: 500; |
| border-radius: 10px; |
| background: transparent; |
| color: var(--text-muted); |
| transition: background-color 0.15s ease, color 0.15s ease; |
|
|
| &::-webkit-details-marker { |
| display: none; |
| } |
|
|
| &::marker { |
| content: ""; |
| } |
|
|
| &::after { |
| content: "›"; |
| font-size: 18px; |
| line-height: 1; |
| opacity: 0.45; |
| transition: transform 0.15s ease, opacity 0.15s ease; |
| } |
|
|
| &:hover { |
| background-color: var(--hover-bg-color); |
| color: var(--text-color); |
| } |
| } |
|
|
| .intro-more:not([open]) > summary { |
| display: inline-flex; |
| width: fit-content; |
| padding: 4px 10px; |
| gap: 6px; |
| font-size: 9pt; |
| border: 1px solid var(--border-color); |
| border-radius: 10px; |
|
|
| &::after { |
| font-size: 16px; |
| } |
| } |
|
|
| .intro-more[open] > summary { |
| border-bottom-left-radius: 0; |
| border-bottom-right-radius: 0; |
| background: var(--button-bg); |
| color: var(--text-color); |
|
|
| &::after { |
| transform: rotate(90deg); |
| opacity: 0.85; |
| } |
| } |
|
|
| |
| .intro-more > summary .intro-summary-when-open { |
| display: none; |
| } |
|
|
| .intro-more[open] > summary .intro-summary-when-closed { |
| display: none; |
| } |
|
|
| .intro-more[open] > summary .intro-summary-when-open { |
| display: inline; |
| font-size: 90%; |
| font-weight: 400; |
| color: var(--text-muted); |
| } |
|
|
| .intro-more .intro-block { |
| padding: 10px 12px; |
|
|
| h4 { |
| margin: 0 0 6px 0; |
| font-size: 11pt; |
| } |
|
|
| pre { |
| white-space: pre-wrap; |
| word-wrap: break-word; |
| overflow-wrap: break-word; |
| overflow-x: auto; |
| max-width: 100%; |
| margin: 8px 0; |
| } |
| } |
|
|
| .intro-more .intro-block + .intro-block { |
| border-top: 1px dashed var(--border-color); |
| } |
|
|
| |
| .demo-section { |
| margin-bottom: 15px; |
| } |
|
|
| |
| .input-section { |
| margin-bottom: 15px; |
| } |
|
|
| |
| .results-section { |
| margin-top: 20px; |
| } |
|
|
| .container { |
| margin-right: auto; |
| margin-left: auto; |
| padding: 10pt; |
| } |
|
|
| #input { |
| margin-right: 5px; |
| float: left; |
| width: calc(50% - 225px); |
| height: 100%; |
| } |
|
|
| |
|
|
| |
| |
| .LMF { |
| position: relative; |
| @include lmf.lmf-readout-text; |
| background-color: var(--text-area-bg); |
| |
| |
| min-height: 350px; |
| |
| |
| &.loading { |
| |
| animation: textPulse 2s ease-in-out infinite; |
| } |
| } |
|
|
| |
| .truncated-text { |
| display: inline; |
| font-size: inherit; |
| color: var(--token-truncated-color); |
| } |
|
|
| .token { |
| display: inline; |
| font-size: inherit; |
| font-weight: 500; |
| cursor: pointer; |
| user-select: text; |
| |
| |
| border-radius: 6px; |
| transition: box-shadow 0.15s ease, outline 0.15s ease; |
|
|
| &:hover { |
| |
| |
| box-shadow: 0 0 5px var(--token-hover-shadow), 0 0 9px var(--token-hover-shadow); |
| outline: 2px solid var(--token-hover-outline); |
| outline-offset: -2px; |
| position: relative; |
| z-index: 2; |
| } |
|
|
| |
| &.bin-highlighted { |
| border-radius: 6px; |
| |
| outline: 1.5px solid var(--bin-highlight-outline); |
| outline-offset: -2px; |
| box-shadow: none; |
| position: relative; |
| z-index: 1; |
| } |
|
|
| } |
|
|
| |
| .svg-overlay { |
| position: absolute; |
| top: 0; |
| left: 0; |
| width: 100%; |
| height: 100%; |
| z-index: 1; |
| pointer-events: none; |
| |
| |
| g.token-group { |
| pointer-events: auto; |
| cursor: pointer; |
| |
| |
| &:hover rect { |
| |
| |
| |
| |
| |
| stroke: rgba(30, 111, 255, 0.9); |
| stroke-width: 2.5px; |
| } |
| |
| |
| &:hover rect.bin-highlighted { |
| |
| |
| |
| |
| |
| stroke: rgba(30, 111, 255, 0.9); |
| stroke-width: 2.5px; |
| } |
| } |
| |
| rect { |
| rx: 6px; |
| ry: 6px; |
| pointer-events: auto; |
| cursor: pointer; |
| transition: fill-opacity 0.1s ease, stroke-opacity 0.15s ease, filter 0.15s ease, stroke 0.15s ease, stroke-width 0.15s ease; |
| |
| |
| &.token-hovered { |
| |
| |
| |
| |
| |
| |
| |
| |
| stroke: rgba(30, 111, 255, 0.9); |
| stroke-width: 2.5px; |
| } |
| |
| |
| &.bin-highlighted { |
| |
| filter: none; |
| |
| } |
|
|
| |
| &.token-hovered.bin-highlighted { |
| |
| |
| |
| |
| |
| |
| stroke: rgba(30, 111, 255, 0.9); |
| stroke-width: 2.5px; |
| } |
| } |
| } |
|
|
| |
| |
| .text-layer { |
| position: relative; |
| z-index: 2; |
| pointer-events: none; |
| } |
|
|
| |
| .text-loading-overlay { |
| position: absolute; |
| top: 0; |
| left: 0; |
| right: 0; |
| bottom: 0; |
| min-height: 100%; |
| background: var(--loading-overlay-bg); |
| display: flex; |
| align-items: center; |
| justify-content: center; |
| z-index: 100; |
| pointer-events: none; |
| opacity: 0; |
| transition: opacity 0.3s ease-in-out, background-color 0.3s ease; |
| |
| &.visible { |
| opacity: 1; |
| } |
| |
| .loading-content { |
| display: flex; |
| flex-direction: column; |
| align-items: center; |
| gap: 10px; |
| color: var(--text-color); |
| font-size: 12pt; |
| |
| background: transparent; |
| padding: 0; |
| |
| .loading-spinner { |
| width: 60px; |
| height: 60px; |
| border: 4px solid var(--loading-spinner-border); |
| border-top: 4px solid var(--loading-spinner-top); |
| border-radius: 50%; |
| animation: spin 1s linear infinite; |
| } |
| } |
| } |
|
|
| |
| @keyframes textPulse { |
| 0%, 100% { |
| opacity: 1; |
| } |
| 50% { |
| opacity: 0.85; |
| } |
| } |
|
|
| .tooltip { |
| font-size: 9pt; |
| font-weight: 500; |
| border-radius: 5px; |
| padding: 5px; |
| background: var(--tooltip-bg); |
| color: var(--text-color); |
| transition-property: opacity, background-color, color; |
| transition-duration: .2s; |
| position: absolute; |
| z-index: 101; |
| pointer-events: auto; |
| cursor: pointer; |
| user-select: none; |
| -webkit-user-select: none; |
| |
| max-width: min(16rem, calc(100vw - 24px)); |
| box-sizing: border-box; |
| overflow-wrap: break-word; |
| } |
|
|
| |
| .currentToken { |
| font-family: lmf.$mono-font-stack; |
| font-size: 9pt; |
| line-height: 1.4; |
| margin-bottom: 4px; |
| } |
|
|
| |
| .predictions { |
| .row { |
| font-family: lmf.$mono-font-stack; |
| } |
| } |
|
|
| |
| .demos { |
| height: 150px; |
| } |
|
|
| |
|
|
| |
| .demo-path-nav-wrapper { |
| flex-wrap: wrap; |
| row-gap: 4px; |
| min-height: 28px; |
| align-items: center; |
| } |
|
|
| |
| .demo-path-navigator { |
| line-height: 28px; |
| } |
|
|
| |
| .demo-multiselect-bar-center { |
| display: flex; |
| align-items: center; |
| gap: 4px; |
| flex-wrap: nowrap; |
| background-color: var(--panel-bg, transparent); |
| padding: 1px 6px; |
| border-radius: 4px; |
| margin-right: 4px; |
| width: fit-content; |
| flex-shrink: 0; |
|
|
| .multiselect-count { |
| font-size: 9pt; |
| color: var(--text-muted); |
| white-space: nowrap; |
| } |
|
|
| |
| .refresh-btn { |
| font-size: 9pt; |
| padding: 1px 6px; |
| min-width: auto; |
| height: auto; |
| white-space: nowrap; |
| |
| &.inactive { |
| opacity: 0.5; |
| cursor: not-allowed; |
| pointer-events: none; |
| } |
| |
| |
| &:not(.inactive) { |
| color: var(--text-color, #333); |
| font-weight: 500; |
| |
| &:hover { |
| color: var(--primary-color, #3b82f6); |
| } |
| } |
| } |
| } |
|
|
| |
| .demo-checkbox-inline { |
| cursor: pointer; |
| margin-right: 1px; |
| width: 14px; |
| height: 14px; |
| |
| vertical-align: middle; |
| |
| display: inline-block; |
| |
| margin-top: 0; |
| margin-bottom: 0; |
| |
| flex-shrink: 0; |
| order: -1; |
| } |
|
|
| |
| .demo-checkbox-inline { |
| |
| appearance: none; |
| -webkit-appearance: none; |
| -moz-appearance: none; |
| |
| |
| background-color: transparent; |
| border: 1px solid var(--text-muted, #888); |
| border-radius: 2px; |
| |
| |
| &:checked { |
| background-color: var(--primary-color, #3b82f6); |
| border-color: var(--primary-color, #3b82f6); |
| |
| background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 6l3 3 5-5'/%3E%3C/svg%3E"); |
| background-repeat: no-repeat; |
| background-position: center; |
| background-size: 10px 10px; |
| } |
| |
| |
| &:hover:not(:disabled) { |
| border-color: var(--text-color, #333); |
| } |
| |
| |
| &:focus:not(:disabled) { |
| outline: 1px solid var(--primary-color, #3b82f6); |
| outline-offset: 1px; |
| } |
| |
| |
| &:disabled { |
| opacity: 0.3; |
| cursor: not-allowed; |
| pointer-events: none; |
| } |
| } |
|
|
| |
| :root[data-theme="dark"] { |
| .demo-checkbox-inline { |
| |
| &:hover:not(:disabled) { |
| border-color: var(--text-color, var(--text-color-light)); |
| } |
| } |
| } |
|
|
| .demo-history-promote-btn { |
| background: transparent !important; |
| border: none !important; |
| color: var(--text-color); |
| cursor: pointer; |
| font-family: var(--font-icon); |
| font-size: var(--font-icon-size); |
| line-height: 1; |
| padding: 6px 6px; |
| opacity: 0.6; |
| transition: opacity 0.2s; |
| flex-shrink: 0; |
|
|
| &:hover { |
| opacity: 1; |
| color: var(--accent-color, #3498db); |
| } |
| } |
|
|
| .demo-delete-btn { |
| background: transparent !important; |
| border: none !important; |
| color: var(--text-color); |
| cursor: pointer; |
| font-family: var(--font-icon); |
| font-size: var(--font-icon-size); |
| line-height: 1; |
| padding: 6px 6px; |
| opacity: 0.6; |
| transition: opacity 0.2s; |
| flex-shrink: 0; |
|
|
| &:hover { |
| opacity: 1; |
| color: var(--error-color, #e74c3c); |
| } |
| } |
|
|
| |
| .analyze-progress { |
| display: none; |
| font-size: 9pt; |
| color: var(--text-muted, #666); |
| white-space: nowrap; |
| line-height: 1.2; |
| position: absolute; |
| left: 100%; |
| margin-left: 30px; |
| z-index: 10; |
| |
| |
| :root[data-theme="dark"] & { |
| color: var(--text-muted, #999); |
| } |
| } |
|
|
| |
| #loader { |
| top: 0px; |
| opacity: 1; |
| transition-property: opacity; |
| transition-duration: 0.5s; |
| } |
|
|
| |
| .main_frame { |
| opacity: 1; |
| transition-property: opacity; |
| transition-duration: 1s; |
| } |
|
|
| |
|
|
| .app-page-toolbar { |
| position: relative; |
| z-index: 1000; |
| border-bottom: 1px solid var(--border-color); |
| display: flex; |
| justify-content: space-between; |
| align-items: center; |
| flex-wrap: wrap; |
| gap: 10px; |
| row-gap: 6px; |
| background-color: var(--bg-color); |
| box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); |
| box-sizing: border-box; |
| padding: max(10px, env(safe-area-inset-top)) 20px 10px 20px; |
| transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; |
| } |
|
|
| |
| .app-page-toolbar--bleed { |
| margin: 0 -20px 10px -20px; |
| padding: max(10px, env(safe-area-inset-top)) 20px 10px 20px; |
| } |
|
|
| .app-page-toolbar-actions { |
| display: flex; |
| align-items: center; |
| justify-content: flex-end; |
| flex-wrap: wrap; |
| gap: 10px; |
| flex: 0 0 auto; |
| max-width: 100%; |
| margin-left: auto; |
| } |
|
|
| |
| .page-toolbar-title { |
| margin: 0; |
| font-size: var(--page-chrome-title-size); |
| font-weight: var(--page-chrome-title-weight); |
| line-height: var(--page-chrome-line-height); |
| display: flex; |
| flex-direction: column; |
| align-items: flex-start; |
| gap: 2px; |
| white-space: normal; |
| overflow: visible; |
| flex: 1 1 240px; |
| min-width: 0; |
|
|
| .title-main-line { |
| display: flex; |
| flex-wrap: wrap; |
| align-items: baseline; |
| column-gap: 1em; |
| row-gap: 2px; |
| } |
|
|
| .title-tagline { |
| font-size: var(--page-chrome-subtitle-size); |
| font-weight: var(--page-chrome-subtitle-weight); |
| line-height: var(--page-chrome-line-height); |
| } |
|
|
| .title-formula { |
| font-size: 10px; |
| font-weight: 400; |
| color: var(--text-muted); |
| opacity: 0.75; |
| font-style: italic; |
| } |
| } |
|
|
| |
| .language-toggle-btn { |
| padding: 4px 10px; |
| border: 1px solid var(--button-border); |
| background: var(--button-bg); |
| color: var(--button-text); |
| border-radius: 4px; |
| cursor: pointer; |
| font-size: 13px; |
| transition: background-color 0.2s, border-color 0.2s; |
|
|
| &:hover { |
| background-color: var(--button-hover-bg); |
| } |
|
|
| &:active { |
| background-color: var(--button-active-bg); |
| } |
| } |
|
|
| |
| .settings-menu-wrapper { |
| position: relative; |
| display: inline-block; |
| } |
|
|
| .settings-btn { |
| display: inline-flex; |
| align-items: center; |
| justify-content: center; |
| width: 28px; |
| height: 28px; |
| padding: 0; |
| border: 1px solid var(--border-color); |
| border-radius: 4px; |
| background: var(--button-bg); |
| color: var(--text-color); |
| cursor: pointer; |
| font-size: 14px; |
| line-height: 1; |
| transition: background-color 0.2s ease, border-color 0.2s ease; |
|
|
| .settings-icon { |
| font-size: 16px; |
| line-height: 1; |
| } |
|
|
| &:hover { |
| background-color: var(--button-hover-bg); |
| } |
|
|
| &:active { |
| background-color: var(--button-active-bg); |
| } |
| } |
|
|
| .settings-menu { |
| position: absolute; |
| top: 100%; |
| right: 0; |
| margin-top: 4px; |
| background: var(--button-bg); |
| border: 1px solid var(--border-color); |
| border-radius: 4px; |
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); |
| z-index: 1000; |
| width: max-content; |
| min-width: 180px; |
| } |
|
|
| .settings-menu-item { |
| padding: 8px 12px; |
| box-sizing: border-box; |
| } |
|
|
| .settings-menu-row { |
| display: flex; |
| align-items: center; |
| justify-content: space-between; |
| gap: 12px; |
| } |
|
|
| .settings-menu-label { |
| white-space: nowrap; |
| flex-shrink: 0; |
| } |
|
|
| .settings-menu-control { |
| flex-shrink: 0; |
| } |
|
|
| .settings-menu-checkbox input[type="checkbox"] { |
| cursor: pointer; |
| margin: 0; |
| } |
|
|
| .settings-menu-btn { |
| padding: 4px 8px; |
| border: 1px solid var(--border-color); |
| border-radius: 4px; |
| background: var(--button-bg); |
| color: var(--text-color); |
| cursor: pointer; |
| font-size: inherit; |
| white-space: nowrap; |
| transition: background-color 0.2s ease; |
| |
| &:hover { |
| background-color: var(--button-hover-bg); |
| } |
| |
| &:active { |
| background-color: var(--button-active-bg); |
| } |
| } |
|
|
| .settings-menu-divider { |
| height: 1px; |
| background-color: var(--border-color); |
| margin: 4px 0; |
| } |
|
|
| |
| #dark_mode_toggle, |
| .settings-dropdown-in-menu { |
| padding: 0; |
| border: none; |
| background: transparent; |
| cursor: pointer; |
|
|
| .settings-dropdown { |
| position: relative; |
| display: inline-block; |
|
|
| .settings-dropdown-btn { |
| display: flex; |
| align-items: center; |
| gap: 6px; |
| padding: 4px 8px; |
| border: 1px solid var(--border-color); |
| border-radius: 4px; |
| background: var(--button-bg); |
| color: var(--text-color); |
| cursor: pointer; |
| font-size: inherit; |
| font-family: inherit; |
| transition: background-color 0.2s ease, border-color 0.2s ease; |
| white-space: nowrap; |
|
|
| &:hover { |
| background-color: var(--button-hover-bg); |
| } |
|
|
| &.active { |
| background-color: var(--button-hover-bg); |
| border-color: var(--button-border); |
| } |
|
|
| &:active { |
| background-color: var(--button-active-bg); |
| } |
| } |
|
|
| .settings-dropdown-menu { |
| position: absolute; |
| top: 100%; |
| left: 0; |
| margin-top: 4px; |
| min-width: 100%; |
| width: max-content; |
| box-sizing: border-box; |
| background: var(--panel-bg); |
| border: 1px solid var(--border-color); |
| border-radius: 4px; |
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); |
| z-index: 1001; |
| opacity: 0; |
| visibility: hidden; |
| transform: translateY(-10px); |
| transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease; |
| pointer-events: none; |
| overflow: hidden; |
|
|
| &.open { |
| opacity: 1; |
| visibility: visible; |
| transform: translateY(0); |
| pointer-events: auto; |
| } |
|
|
| .settings-dropdown-option { |
| display: flex; |
| align-items: center; |
| gap: 6px; |
| width: 100%; |
| padding: 8px 12px; |
| border: none; |
| background: transparent; |
| color: var(--text-color); |
| cursor: pointer; |
| font-size: inherit; |
| font-family: inherit; |
| text-align: left; |
| transition: background-color 0.2s ease; |
| white-space: nowrap; |
|
|
| &:hover { |
| background-color: var(--hover-bg-color); |
| } |
|
|
| &.active { |
| background-color: var(--hover-bg-color); |
| font-weight: 500; |
| cursor: not-allowed; |
| pointer-events: none; |
| opacity: 0.5; |
| } |
|
|
| &:first-child { |
| border-radius: 4px 4px 0 0; |
| } |
|
|
| &:last-child { |
| border-radius: 0 0 4px 4px; |
| } |
|
|
| &:only-child { |
| border-radius: 4px; |
| } |
| } |
| } |
| } |
| } |
|
|
| |
| .settings-menu .settings-dropdown-btn { |
| padding: 2px 6px; |
| font-size: inherit; |
| } |
|
|
| :root[data-theme="dark"] { |
| #dark_mode_toggle .settings-dropdown-menu, |
| .settings-dropdown-in-menu .settings-dropdown-menu { |
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); |
| } |
| } |
|
|
|
|
| |
| .demo-header { |
| font-weight: bold; |
| display: flex; |
| align-items: center; |
| gap: 5px; |
| } |
|
|
| |
| .file-input-wrapper { |
| display: inline-flex; |
| align-items: stretch; |
| border: 1px solid var(--input-border); |
| border-radius: 4px; |
| background-color: var(--input-bg); |
| overflow: visible; |
| font-size: 9pt; |
| |
| |
| .file-input-button { |
| |
| padding: 3px 8px; |
| border-radius: 0; |
| border-right: 1px solid var(--input-border); |
| white-space: nowrap; |
| display: inline-flex; |
| align-items: center; |
| } |
| |
| |
| :root[data-theme="dark"] & { |
| .file-input-button { |
| background-color: #3a3a3a; |
| color: var(--text-color); |
| |
| &:hover { |
| background-color: #4a4a4a; |
| } |
| |
| &:active { |
| background-color: #505050; |
| } |
| } |
| } |
| |
| .file-input-filename { |
| padding: 3px 2px; |
| color: var(--text-muted); |
| overflow-wrap: break-word; |
| word-wrap: break-word; |
| word-break: break-word; |
| max-width: 200px; |
| min-width: 100px; |
| font-size: clamp(7pt, 2vw, 9pt); |
| display: flex; |
| align-items: center; |
| justify-content: center; |
| text-align: center; |
| flex: 1; |
| line-height: 1.3; |
| } |
| } |
|
|
| |
| .demos-loading { |
| display: none; |
| color: #666; |
| font-size: 9pt; |
| margin-left: 5px; |
| } |
|
|
| |
| .input-header { |
| padding-top: 10px; |
| display: flex; |
| align-items: center; |
| justify-content: space-between; |
| gap: 5px; |
| } |
|
|
| |
| .loader-small-container { |
| position: absolute; |
| left: 100%; |
| margin-left: 10px; |
| z-index: 10; |
| } |
|
|
|
|
| |
| .stats-container { |
| text-align: center; |
| } |
|
|
| |
| .histogram-item { |
| display: block; |
| text-align: center; |
| margin-bottom: 20px; |
| } |
|
|
| |
| #major_tooltip { |
| position: absolute; |
| pointer-events: none; |
| opacity: 0; |
| |
| transition-property: background-color, color; |
| } |
|
|
| #attribution_panel_tooltip { |
| transition-property: background-color, color; |
| } |
|
|
| |
| @media (max-width: $breakpoint-mobile) { |
| #major_tooltip { |
| position: fixed; |
| } |
| } |
|
|
| |
| .predictions-table { |
| display: table; |
|
|
| |
| .topk-chart-row { |
| display: table-row; |
| color: var(--tooltip-text-normal); |
| } |
|
|
| .topk-chart-row--ellipsis { |
| display: block !important; |
| text-align: left; |
| padding-left: 30px; |
| font-weight: bold; |
| } |
|
|
| .topk-chart-row--selected { |
| color: var(--tooltip-text-selected); |
| } |
|
|
| .topk-chart-row--pickable { |
| cursor: pointer; |
| } |
|
|
| .topk-chart-bar-cell { |
| display: table-cell; |
| padding-left: 5px; |
| vertical-align: baseline; |
| } |
|
|
| .topk-chart-bar-fill { |
| display: inline-block; |
| height: 10px; |
| background-color: currentColor; |
| vertical-align: middle; |
| } |
|
|
| .topk-chart-prob { |
| display: inline-block; |
| } |
|
|
| .topk-chart-token-cell { |
| display: table-cell; |
| padding-right: 5px; |
| } |
|
|
| .topk-chart-info-row { |
| display: block; |
| } |
|
|
| .topk-chart-info-msg { |
| color: var(--tooltip-text-detail); |
| padding-left: 5px; |
| } |
|
|
| .topk-chart-info-parts { |
| color: var(--tooltip-text-detail); |
| padding-left: 5px; |
| margin-top: 4px; |
| font-family: lmf.$mono-font-stack; |
| font-size: 8.5pt; |
| line-height: 1.3; |
| word-break: break-word; |
| } |
| } |
|
|
| |
| .tooltip .predictions-table { |
| table-layout: fixed; |
| } |
|
|
| .tooltip .topk-chart-token-cell { |
| word-break: break-word; |
| overflow-wrap: anywhere; |
| } |
|
|
| .tooltip .topk-chart-info-msg { |
| overflow-wrap: break-word; |
| } |
|
|
| .tooltip .currentToken { |
| overflow-wrap: break-word; |
| } |
|
|
| @keyframes spin { |
| 0% { transform: rotate(0deg); } |
| 100% { transform: rotate(360deg); } |
| } |
|
|
|
|
| #all_result{ |
| display: flex; |
| flex-flow: column; |
| width: 100%; |
| max-width: 100%; |
| box-sizing: border-box; |
| opacity: 0; |
| transition-duration: 0.5s; |
| margin-top: 20px; |
| } |
|
|
| |
| #stats { |
| width: 100%; |
| max-width: 100%; |
| box-sizing: border-box; |
| padding: 0; |
| |
| svg { |
| max-width: 100%; |
| box-sizing: border-box; |
| } |
| } |
|
|
| |
| .toast { |
| position: fixed; |
| top: 20px; |
| right: 20px; |
| background-color: var(--panel-bg); |
| color: var(--text-color); |
| padding: 12px 20px; |
| border-radius: 4px; |
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); |
| z-index: 102; |
| opacity: 0; |
| transform: translateY(-20px); |
| transition: opacity 0.3s ease, transform 0.3s ease; |
| pointer-events: none; |
| max-width: 300px; |
| word-wrap: break-word; |
| border: 1px solid var(--border-color); |
| display: flex; |
| align-items: flex-start; |
| gap: 12px; |
|
|
| &.show { |
| opacity: 1; |
| transform: translateY(0); |
| } |
|
|
| &.success { |
| border-left: 4px solid #4caf50; |
| } |
|
|
| &.error { |
| border-left: 4px solid #f44336; |
| } |
|
|
| &.dismissible { |
| pointer-events: auto; |
| } |
|
|
| .toast-message { |
| flex: 1; |
| min-width: 0; |
| } |
|
|
| .toast-close { |
| flex-shrink: 0; |
| padding: 0 4px; |
| font-size: 18px; |
| line-height: 1; |
| color: inherit; |
| background: none; |
| border: none; |
| cursor: pointer; |
| opacity: 0.7; |
|
|
| &:hover { |
| opacity: 1; |
| } |
| } |
| } |
|
|
| |
|
|
| |
|
|