CSS and Tailwind
Stylesheet Architecture
Chamilo's styles are layered in this order:
Tailwind CSS — Utility classes for layout, spacing, and color. Configured with
important: trueso utilities override PrimeVue component defaults.SCSS — Custom styles in
assets/css/scss/, organized into atoms, molecules, organisms, layout, and components layers.PrimeVue component styles — Overridden per-component inside
assets/css/scss/atoms/.Theme
colors.css— CSS custom properties for the active color theme, loaded last so they cascade over everything else.
PrimeFlex is listed in package.json but is not imported — Tailwind covers all utility needs.
Main Stylesheet (assets/css/app.scss)
assets/css/app.scss)app.scss is the Webpack entry point for the main stylesheet. It imports:
_tailwind.scss— Tailwind's@tailwind base / components / utilitiesdirectivesscss/index.scss— Barrel file that imports all SCSS partialsThird-party CSS (cropper, select2, daterangepicker, TinyMCE skin, fancybox, timepicker, qtip)
editor_content.scss— Styles injected into the TinyMCE editor iframe body
Tailwind Configuration (tailwind.config.js)
tailwind.config.js)Key settings:
Content paths scan Vue components, legacy PHP pages, plugin files, and Twig templates so unused utilities are purged on production builds.
CSS-Variable Color System
All color tokens are backed by CSS custom properties rather than hardcoded values:
The colorWithOpacity helper emits rgb(var(--color-primary-base) / <opacity>), enabling opacity variants such as bg-primary/50. The actual RGB values are defined per theme in var/themes/{slug}/colors.css and loaded at runtime — see Color Themes.
Tailwind Plugins
@tailwindcss/forms and @tailwindcss/typography are enabled.
Custom Type Scale
Four extra font-size/line-height pairs are added via theme.extend.fontSize:
text-body-1
16px / 24px
text-body-2
14px / 16px
text-caption
13px / 16px
text-tiny
11px / 16px
PostCSS
PostCSS (Tailwind + Autoprefixer) is configured inline inside webpack.config.js via enablePostCssLoader(). There is no standalone postcss.config.js file.
Specialized Stylesheets
assets/css/app.scss
app
Main application styles
assets/css/chat.scss
css/chat
Chat interface styles
assets/css/document.scss
css/document
Document viewer styles
assets/css/editor.scss
css/editor
TinyMCE editor shell styles
assets/css/editor_content.scss
css/editor_content
Styles injected into the editor iframe body
assets/css/markdown.scss
css/markdown
Markdown-rendered content
assets/css/print.scss
css/print
Print stylesheet
assets/css/responsive.scss
css/responsive
Responsive overrides
assets/css/scorm.scss
css/scorm
SCORM player styles
SCSS Module Structure (assets/css/scss/)
assets/css/scss/)Using Tailwind in Vue Components
Because important: true is set in tailwind.config.js, Tailwind utilities reliably override PrimeVue component styles without needing extra specificity.
Last updated
Was this helpful?