/
spirzen
/
it-knowledge-base
Обзор
Документация
Войти
/
spirzen
/
it-knowledge-base
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
Mobile
src/components/RegexPlaygroundDemo.module.css
397 строк
7 KB
Spirzen
New components
21 май 2026, 20:58
21 май 2026, 20:58
3e1d763
Код
Авторство
О чём код?
.shell { --rx-accent: #68217a; --rx-accent-soft: rgba(104, 33, 122, 0.12); --rx-match: rgba(46, 125, 50, 0.35); --rx-group: rgba(25, 118, 210, 0.4); --rx-err: #c62828; --rx-ok: #2e7d32; --rx-panel: var(--ifm-background-surface-color); --rx-border: var(--demo-border, var(--ifm-color-emphasis-300)); --rx-muted: var(--demo-muted, var(--ifm-color-content-secondary)); font-size: 0.85rem; } [data-theme='dark'] .shell { --rx-accent: #b392c8; --rx-accent-soft: rgba(179, 146, 200, 0.18); --rx-match: rgba(76, 175, 80, 0.35); --rx-group: rgba(100, 181, 246, 0.35); } .layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--demo-gap, 1rem); } @media (max-width: 900px) { .layout { grid-template-columns: 1fr; } } .panel { display: flex; flex-direction: column; gap: 0.65rem; padding: 0.75rem; border: 1px solid var(--rx-border); border-radius: 10px; background: var(--rx-panel); } .panelTitle { margin: 0; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--rx-muted); } .patternRow { display: flex; align-items: stretch; gap: 0.35rem; } .patternSlash { display: flex; align-items: center; padding: 0 0.25rem; font-family: var(--ifm-font-family-monospace); font-size: 1.1rem; font-weight: 700; color: var(--rx-accent); user-select: none; } .patternInput { flex: 1; font-family: var(--ifm-font-family-monospace); font-size: 0.9rem; } .flags { display: flex; flex-wrap: wrap; gap: 0.35rem; } .flag { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.2rem 0.55rem; font-family: var(--ifm-font-family-monospace); font-size: 0.78rem; font-weight: 600; border: 1px solid var(--rx-border); border-radius: 6px; cursor: pointer; background: transparent; color: inherit; transition: background 0.15s, border-color 0.15s; } .flag:hover { border-color: var(--rx-accent); } .flagOn { background: var(--rx-accent-soft); border-color: var(--rx-accent); color: var(--rx-accent); } .presets { display: flex; flex-wrap: wrap; gap: 0.35rem; } .presetBtn { padding: 0.25rem 0.6rem; font-size: 0.75rem; font-weight: 600; border-radius: 999px; border: 1px solid var(--rx-border); background: transparent; cursor: pointer; color: inherit; transition: all 0.15s; } .presetBtn:hover, .presetActive { border-color: var(--rx-accent); background: var(--rx-accent-soft); color: var(--rx-accent); } .modes { display: flex; flex-wrap: wrap; gap: 0.25rem; } .modeBtn { padding: 0.35rem 0.7rem; font-size: 0.78rem; font-weight: 600; border: 1px solid var(--rx-border); border-radius: 8px; background: transparent; cursor: pointer; color: inherit; } .modeActive { background: var(--rx-accent); border-color: var(--rx-accent); color: #fff; } [data-theme='dark'] .modeActive { color: #0d1117; } .textArea { min-height: 120px; font-family: var(--ifm-font-family-monospace); font-size: 0.82rem; line-height: 1.55; resize: vertical; } .highlightBox { min-height: 120px; padding: 0.65rem 0.75rem; font-family: var(--ifm-font-family-monospace); font-size: 0.82rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word; border: 1px solid var(--rx-border); border-radius: 8px; background: var(--ifm-background-color); } .hitMatch { background: var(--rx-match); border-radius: 2px; padding: 0 1px; box-decoration-break: clone; } .hitGroup { background: var(--rx-group); outline: 1px solid rgba(25, 118, 210, 0.6); border-radius: 2px; padding: 0 1px; } .statusBar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.5rem 0.75rem; border-radius: 8px; background: var(--rx-accent-soft); font-size: 0.8rem; } .statusOk { color: var(--rx-ok); font-weight: 700; } .statusFail { color: var(--rx-err); font-weight: 700; } .statusErr { color: var(--rx-err); font-size: 0.78rem; } .matchList { display: flex; flex-direction: column; gap: 0.4rem; max-height: 200px; overflow-y: auto; } .matchCard { padding: 0.45rem 0.6rem; border: 1px solid var(--rx-border); border-radius: 8px; font-family: var(--ifm-font-family-monospace); font-size: 0.78rem; cursor: pointer; transition: border-color 0.15s; } .matchCard:hover, .matchCardActive { border-color: var(--rx-accent); } .matchMeta { font-size: 0.7rem; color: var(--rx-muted); margin-bottom: 0.2rem; } .groupsTable { width: 100%; border-collapse: collapse; font-size: 0.78rem; } .groupsTable th, .groupsTable td { padding: 0.35rem 0.5rem; text-align: left; border-bottom: 1px solid var(--rx-border); } .groupsTable th { font-size: 0.68rem; text-transform: uppercase; color: var(--rx-muted); } .groupRow { cursor: pointer; } .groupRowActive { background: var(--rx-accent-soft); } .tokenBar { display: flex; flex-wrap: wrap; gap: 0.3rem; } .token { padding: 0.15rem 0.45rem; font-family: var(--ifm-font-family-monospace); font-size: 0.72rem; border: 1px dashed var(--rx-border); border-radius: 4px; background: transparent; cursor: pointer; color: inherit; } .token:hover { border-color: var(--rx-accent); color: var(--rx-accent); } .csharp { margin: 0; padding: 0.65rem 0.75rem; font-size: 0.78rem; line-height: 1.45; border-radius: 8px; background: var(--demo-code-bg, var(--ifm-code-background)); color: var(--demo-code-fg, var(--ifm-pre-color)); overflow-x: auto; white-space: pre; } .compareGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; } @media (max-width: 640px) { .compareGrid { grid-template-columns: 1fr; } } .compareCol { padding: 0.5rem; border: 1px solid var(--rx-border); border-radius: 8px; font-size: 0.75rem; } .compareLabel { font-weight: 700; margin-bottom: 0.35rem; color: var(--rx-accent); } .replaceRow { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.5rem; align-items: start; } @media (max-width: 768px) { .replaceRow { grid-template-columns: 1fr; } } .replaceArrow { align-self: center; font-size: 1.25rem; color: var(--rx-muted); text-align: center; } .validateLines { display: flex; flex-direction: column; gap: 0.35rem; } .validateLine { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.35rem 0.5rem; border-radius: 6px; font-family: var(--ifm-font-family-monospace); font-size: 0.78rem; } .validateOk { background: rgba(46, 125, 50, 0.12); } .validateBad { background: rgba(198, 40, 40, 0.1); } .note { margin: 0; font-size: 0.78rem; color: var(--rx-muted); line-height: 1.45; } .bottomGrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--demo-gap, 1rem); margin-top: 0.5rem; } @media (max-width: 900px) { .bottomGrid { grid-template-columns: 1fr; } }