mirror of
https://github.com/deunix-educ/PyQuest.git
synced 2026-11-25 08:19:44 +01:00
Apply visual identity: palette B, Atkinson/JetBrains fonts, split CSS, syntax-highlighted editor, owl icon
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,154 @@
|
||||
/* Cellules de code : éditeur coloré, actions, sortie, retours de validation, indices, saisie. */
|
||||
|
||||
.cell {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 0.5rem;
|
||||
padding: 1rem;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
.cell > :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.cell-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
margin: 0.5rem 0;
|
||||
}
|
||||
|
||||
.cell-shortcut {
|
||||
margin: 0.25rem 0;
|
||||
color: var(--muted);
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
/* Éditeur : un <textarea> réel (clavier, lecteurs d'écran) dont le texte est rendu transparent, au-dessus
|
||||
d'un <pre> qui affiche le même code coloré. Même police, mêmes marges et même retour à la ligne. */
|
||||
.code-editor-wrap {
|
||||
position: relative;
|
||||
background: var(--code);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 0.375rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.code-editor-wrap:focus-within {
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 2px var(--accent);
|
||||
}
|
||||
|
||||
.code-highlight,
|
||||
.code-editor {
|
||||
margin: 0;
|
||||
padding: 0.75rem;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
font-family: var(--font-code);
|
||||
font-size: 1rem;
|
||||
line-height: 1.5;
|
||||
tab-size: 4;
|
||||
white-space: pre;
|
||||
overflow: auto;
|
||||
border: 0;
|
||||
letter-spacing: 0;
|
||||
word-spacing: 0;
|
||||
font-variant-ligatures: none;
|
||||
}
|
||||
|
||||
.code-highlight {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
color: var(--text);
|
||||
pointer-events: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.code-editor {
|
||||
position: relative;
|
||||
display: block;
|
||||
resize: none;
|
||||
background: transparent;
|
||||
color: transparent;
|
||||
caret-color: var(--text);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.code-editor::selection {
|
||||
background: color-mix(in srgb, var(--accent) 35%, transparent);
|
||||
}
|
||||
|
||||
.tok-keyword {
|
||||
color: var(--tok-keyword);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.tok-string {
|
||||
color: var(--tok-string);
|
||||
}
|
||||
|
||||
.tok-number {
|
||||
color: var(--tok-number);
|
||||
}
|
||||
|
||||
.tok-comment {
|
||||
color: var(--tok-comment);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.tok-builtin {
|
||||
color: var(--tok-builtin);
|
||||
}
|
||||
|
||||
.tok-def {
|
||||
color: var(--tok-def);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.cell-output {
|
||||
min-height: 1.5rem;
|
||||
margin: 0.5rem 0;
|
||||
padding: 0.5rem 0.75rem;
|
||||
background: var(--bg);
|
||||
border-left: 4px solid var(--border);
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.feedback-ok {
|
||||
color: var(--ok);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.feedback-ko,
|
||||
.error-title {
|
||||
color: var(--ko);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.hint-list {
|
||||
flex-basis: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.cell-input {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
margin: 0.5rem 0;
|
||||
}
|
||||
|
||||
.cell-input-field {
|
||||
flex: 1 1 12rem;
|
||||
min-height: 2.5rem;
|
||||
padding: 0.25rem 0.5rem;
|
||||
font-family: var(--font-code);
|
||||
font-variant-ligatures: none;
|
||||
font-size: 1rem;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 0.375rem;
|
||||
}
|
||||
Reference in New Issue
Block a user