Met en place les fondations du template Bulma décrit dans regles/FORGE_ENGINE_TEMPLATE_BULMA.md : palette orange/ambre Forge (--accent:#ff5f2e/--accent-2:#ffb020), typographie, rayons — appliqués en recompilant Bulma lui-même plutôt qu'en le surchargeant après coup en CSS, pour recolorer automatiquement ses composants internes (tags, notifications, dropdowns...) sans avoir à les surcharger un par un. - Bulma 0.9.4 vendoré en local (styles/bulma/, source Sass classique $variable + @import) — PAS 1.0.2 (la version jusqu'ici en CDN) : 1.0.2 utilise le nouveau système de modules @use/@forward, que libsass (choisi pour rester 100% Python, sans Node/npm) ne sait pas compiler (testé : il ignore silencieusement le @use au lieu de le traiter). 0.9.4 est la dernière version compatible avec libsass et couvre à l'identique tous les composants utilisés ici (boutons, tableaux, onglets, modales, formulaires, navbar). - requirements.txt : +libsass (pip pur, aucun binaire/Node.js). - styles/forge-theme.scss (nouveau, point d'entrée) : variables Sass Bulma ($primary, $radius...) posées avant l'import, tokens Forge exposés en :root (--forge-bg, --accent, --gradient, --status-*...) avec des alias vers les noms de variables déjà utilisés par tout le CSS custom existant (--bg/--panel/--border/--text/--danger...) — pas besoin de renommer les ~600 lignes de règles déjà écrites, seules leurs VALEURS changent. - styles/forge-custom.scss : ancien static/style.css, structurellement inchangé — seuls les hex/rgba en dur qui échappaient aux variables (ancien accent bleu #5b8cff, danger #e2685f, couleurs de types de nœuds du graphe de logique, fond du QR code recovery...) sont remplacés par les tokens de la charte. - build_css.py (nouveau) : compile styles/forge-theme.scss en static/style.css via libsass — un seul fichier, un seul <link> inchangé dans les templates, à relancer manuellement après toute modification sous styles/. - base.html/play.html : suppression du <link> CDN Bulma (auto-hébergé désormais), ajout d'un favicon (absent jusqu'ici) et du vrai logo Forge dans la navbar (assets/*.svg copiés dans static/branding/, seul dossier réellement servi par Flask). 197 tests toujours verts (aucune assertion sur des valeurs CSS). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
163 lines
3.8 KiB
Sass
163 lines
3.8 KiB
Sass
@import "../utilities/mixins"
|
|
|
|
$content-heading-color: $text-strong !default
|
|
$content-heading-weight: $weight-semibold !default
|
|
$content-heading-line-height: 1.125 !default
|
|
|
|
$content-block-margin-bottom: 1em !default
|
|
|
|
$content-blockquote-background-color: $background !default
|
|
$content-blockquote-border-left: 5px solid $border !default
|
|
$content-blockquote-padding: 1.25em 1.5em !default
|
|
|
|
$content-pre-padding: 1.25em 1.5em !default
|
|
|
|
$content-table-cell-border: 1px solid $border !default
|
|
$content-table-cell-border-width: 0 0 1px !default
|
|
$content-table-cell-padding: 0.5em 0.75em !default
|
|
$content-table-cell-heading-color: $text-strong !default
|
|
$content-table-head-cell-border-width: 0 0 2px !default
|
|
$content-table-head-cell-color: $text-strong !default
|
|
$content-table-body-last-row-cell-border-bottom-width: 0 !default
|
|
$content-table-foot-cell-border-width: 2px 0 0 !default
|
|
$content-table-foot-cell-color: $text-strong !default
|
|
|
|
.content
|
|
@extend %block
|
|
// Inline
|
|
li + li
|
|
margin-top: 0.25em
|
|
// Block
|
|
p,
|
|
dl,
|
|
ol,
|
|
ul,
|
|
blockquote,
|
|
pre,
|
|
table
|
|
&:not(:last-child)
|
|
margin-bottom: $content-block-margin-bottom
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6
|
|
color: $content-heading-color
|
|
font-weight: $content-heading-weight
|
|
line-height: $content-heading-line-height
|
|
h1
|
|
font-size: 2em
|
|
margin-bottom: 0.5em
|
|
&:not(:first-child)
|
|
margin-top: 1em
|
|
h2
|
|
font-size: 1.75em
|
|
margin-bottom: 0.5714em
|
|
&:not(:first-child)
|
|
margin-top: 1.1428em
|
|
h3
|
|
font-size: 1.5em
|
|
margin-bottom: 0.6666em
|
|
&:not(:first-child)
|
|
margin-top: 1.3333em
|
|
h4
|
|
font-size: 1.25em
|
|
margin-bottom: 0.8em
|
|
h5
|
|
font-size: 1.125em
|
|
margin-bottom: 0.8888em
|
|
h6
|
|
font-size: 1em
|
|
margin-bottom: 1em
|
|
blockquote
|
|
background-color: $content-blockquote-background-color
|
|
+ltr-property("border", $content-blockquote-border-left, false)
|
|
padding: $content-blockquote-padding
|
|
ol
|
|
list-style-position: outside
|
|
+ltr-property("margin", 2em, false)
|
|
margin-top: 1em
|
|
&:not([type])
|
|
list-style-type: decimal
|
|
&.is-lower-alpha
|
|
list-style-type: lower-alpha
|
|
&.is-lower-roman
|
|
list-style-type: lower-roman
|
|
&.is-upper-alpha
|
|
list-style-type: upper-alpha
|
|
&.is-upper-roman
|
|
list-style-type: upper-roman
|
|
ul
|
|
list-style: disc outside
|
|
+ltr-property("margin", 2em, false)
|
|
margin-top: 1em
|
|
ul
|
|
list-style-type: circle
|
|
margin-top: 0.5em
|
|
ul
|
|
list-style-type: square
|
|
dd
|
|
+ltr-property("margin", 2em, false)
|
|
figure
|
|
margin-left: 2em
|
|
margin-right: 2em
|
|
text-align: center
|
|
&:not(:first-child)
|
|
margin-top: 2em
|
|
&:not(:last-child)
|
|
margin-bottom: 2em
|
|
img
|
|
display: inline-block
|
|
figcaption
|
|
font-style: italic
|
|
pre
|
|
+overflow-touch
|
|
overflow-x: auto
|
|
padding: $content-pre-padding
|
|
white-space: pre
|
|
word-wrap: normal
|
|
sup,
|
|
sub
|
|
font-size: 75%
|
|
table
|
|
width: 100%
|
|
td,
|
|
th
|
|
border: $content-table-cell-border
|
|
border-width: $content-table-cell-border-width
|
|
padding: $content-table-cell-padding
|
|
vertical-align: top
|
|
th
|
|
color: $content-table-cell-heading-color
|
|
&:not([align])
|
|
text-align: inherit
|
|
thead
|
|
td,
|
|
th
|
|
border-width: $content-table-head-cell-border-width
|
|
color: $content-table-head-cell-color
|
|
tfoot
|
|
td,
|
|
th
|
|
border-width: $content-table-foot-cell-border-width
|
|
color: $content-table-foot-cell-color
|
|
tbody
|
|
tr
|
|
&:last-child
|
|
td,
|
|
th
|
|
border-bottom-width: $content-table-body-last-row-cell-border-bottom-width
|
|
.tabs
|
|
li + li
|
|
margin-top: 0
|
|
// Sizes
|
|
&.is-small
|
|
font-size: $size-small
|
|
&.is-normal
|
|
font-size: $size-normal
|
|
&.is-medium
|
|
font-size: $size-medium
|
|
&.is-large
|
|
font-size: $size-large
|