원클릭으로
css-styling
Apply DjangoSpire app CSS variables in templates instead of inline styles
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Apply DjangoSpire app CSS variables in templates instead of inline styles
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Best practices for writing Django tests (updated template)
GlueFetchHelper patterns for making AJAX calls in templates
Advanced seeding patterns for linking specific foreign keys
Django URL configuration patterns, namespaces, and nested structure conventions
Best practices for AI bots, prompts, and intel in scope_of_work
Examples on how we build our form views.
| name | css-styling |
| description | Apply DjangoSpire app CSS variables in templates instead of inline styles |
DjangoSpire provides a layered CSS system that allows your project to define a theme, and DjangoSpire components automatically adapt.
Never use:
style attributes for colors/backgrounds#198754 or rgba(0,0,0,0.1)<!-- DO -->
<div class="card shadow border-0 rounded-3 bg-app-layer-two text-center text-app-default-text-color p-4">
Content
</div>
<!-- DON'T -->
<div class="card" style="background-color: #FBFCF8; color: #2C3E36;">
Content
</div>
DjangoSpire defines CSS classes that reference theme variables. To find what classes exist:
DjangoSpire Core (built-in classes):
.venv/Lib/site-packages/django_spire/core/static/django_spire/css/app-background.css → bg-app-* classesapp-text.css → text-app-* classesapp-border.css → border-app-* classesYour Project Theme (custom variables):
static_files/django_spire/css/themes/default/app-light.cssstatic_files/django_spire/css/themes/default/app-dark.cssAll app-* classes automatically use your theme's CSS variables, so they work in both light and dark modes.
<!-- Text colors -->
<span class="text-app-primary">Primary</span>
<span class="text-app-success">Success</span>
<span class="text-app-danger">Danger</span>
<span class="text-app-default-text-color">Default text</span>
<!-- Backgrounds -->
<div class="bg-app-layer-one">...</div>
<div class="bg-app-layer-two">...</div>
<div class="bg-app-primary-soft">Soft primary</div>
<!-- Borders -->
<div class="border-app-primary">...</div>
<div class="border-0">No border</div>
<!-- Combined -->
<div class="card shadow bg-app-layer-two text-app-default-text-color rounded-3">
max-height: calc(100vh - 120px)style="background-color: #000" for labels# hex codes, rgb(, rgba( in HTMLstyle="color: ...", it should be a classbg-app-layer-two over custom CSSvar(--app-border-color, rgba(0,0,0,0.1))