UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

1 lines 4 kB
{"version":3,"file":"global.mjs","names":[],"sources":["../../../src/ThemeProvider/GlobalStyle/global.ts"],"sourcesContent":["import { Theme, css } from 'antd-style';\n\nimport { CLASSNAMES } from '@/styles/classNames';\n\nexport default (token: Theme) => css`\n :root {\n --font-settings: 'cv01', 'tnum', 'kern';\n --font-variations: 'opsz' auto, tabular-nums;\n\n text-autospace: normal;\n }\n\n html {\n overscroll-behavior: none;\n color-scheme: ${token.isDarkMode ? 'dark' : 'light'};\n }\n\n body {\n overflow: hidden auto;\n\n min-height: 100vh;\n margin: 0;\n padding: 0;\n\n font-family: ${token.fontFamily};\n font-size: ${token.fontSize}px;\n font-feature-settings: var(--font-settings);\n font-variation-settings: var(--font-variations);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n line-height: 1;\n color: ${token.colorTextBase};\n text-size-adjust: none;\n text-rendering: optimizelegibility;\n word-wrap: break-word;\n vertical-align: baseline;\n\n background-color: ${token.colorBgLayout};\n\n -webkit-overflow-scrolling: touch;\n -webkit-tap-highlight-color: transparent;\n }\n\n code {\n font-family: ${token.fontFamilyCode} !important;\n\n span {\n font-family: ${token.fontFamilyCode} !important;\n }\n }\n\n ::selection {\n color: #000;\n background: ${token.yellow9};\n\n -webkit-text-fill-color: unset !important;\n }\n\n * {\n scrollbar-color: ${token.colorFill} transparent;\n scrollbar-width: thin;\n box-sizing: border-box;\n vertical-align: baseline;\n }\n @layer lobe-popup {\n .${CLASSNAMES.ContextTrigger}[data-popup-open],\n .${CLASSNAMES.DropdownMenuTrigger}[data-popup-open] {\n background: ${token.colorFillTertiary};\n }\n }\n\n @layer lobe-base {\n :where(.lobe-flex) {\n /* Define defaults on the element itself to avoid CSS variable inheritance leaking to nested Flex */\n --lobe-flex: 0 1 auto;\n --lobe-flex-direction: column;\n --lobe-flex-wrap: nowrap;\n --lobe-flex-justify: flex-start;\n --lobe-flex-align: stretch;\n --lobe-flex-width: auto;\n --lobe-flex-height: auto;\n --lobe-flex-padding: 0;\n /* Keep padding-inline/block aligned with padding by default, and prevent inheriting from parent */\n --lobe-flex-padding-inline: var(--lobe-flex-padding);\n --lobe-flex-padding-block: var(--lobe-flex-padding);\n --lobe-flex-gap: 0;\n\n display: flex;\n\n flex: var(--lobe-flex);\n flex-direction: var(--lobe-flex-direction);\n flex-wrap: var(--lobe-flex-wrap);\n justify-content: var(--lobe-flex-justify);\n align-items: var(--lobe-flex-align);\n\n width: var(--lobe-flex-width);\n height: var(--lobe-flex-height);\n\n padding: var(--lobe-flex-padding);\n padding-inline: var(--lobe-flex-padding-inline);\n padding-block: var(--lobe-flex-padding-block);\n\n gap: var(--lobe-flex-gap);\n }\n\n .lobe-flex--hidden {\n display: none;\n }\n }\n\n /* Brand Loading */\n @keyframes draw {\n 0% {\n stroke-dashoffset: 1000;\n }\n\n 100% {\n stroke-dashoffset: 0;\n }\n }\n\n @keyframes fill {\n 30% {\n fill-opacity: 5%;\n }\n\n 100% {\n fill-opacity: 100%;\n }\n }\n\n .lobe-brand-loading path {\n fill: currentcolor;\n fill-opacity: 0%;\n stroke: currentcolor;\n stroke-dasharray: 1000;\n stroke-dashoffset: 1000;\n stroke-width: 0.25em;\n\n animation:\n draw 2s cubic-bezier(0.4, 0, 0.2, 1) infinite,\n fill 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n }\n`;\n"],"mappings":";;;;AAIA,sBAAgB,UAAiB,GAAG;;;;;;;;;;oBAUhB,MAAM,aAAa,SAAS,QAAQ;;;;;;;;;;mBAUrC,MAAM,WAAW;iBACnB,MAAM,SAAS;;;;;;aAMnB,MAAM,cAAc;;;;;;wBAMT,MAAM,cAAc;;;;;;;mBAOzB,MAAM,eAAe;;;qBAGnB,MAAM,eAAe;;;;;;kBAMxB,MAAM,QAAQ;;;;;;uBAMT,MAAM,UAAU;;;;;;OAMhC,WAAW,eAAe;SACxB,WAAW,oBAAoB;oBACpB,MAAM,kBAAkB"}