Skip to content

Fix deprecated Bootstrap 4 .ml-auto class for Moodle 5.0#101

Open
drjagan wants to merge 1 commit into
lmsace:v5.1from
drjagan:fix/bootstrap5-deprecated-ml-class
Open

Fix deprecated Bootstrap 4 .ml-auto class for Moodle 5.0#101
drjagan wants to merge 1 commit into
lmsace:v5.1from
drjagan:fix/bootstrap5-deprecated-ml-class

Conversation

@drjagan
Copy link
Copy Markdown

@drjagan drjagan commented Mar 9, 2026

Summary

Moodle 5.0 ships with Bootstrap 5, which renamed margin/padding utility classes from directional (.ml-*, .mr-*) to logical (.ms-*, .me-*). The academi theme still uses .ml-auto in three templates, causing a "Deprecated style in use (.ml)" warning banner on every page.

This PR replaces .ml-auto with .ms-auto in:

  • templates/drawers.mustache
  • templates/frontpage.mustache
  • templates/navbar.mustache

Screenshots

Before fix — warning banner visible on every page:

"Deprecated style in use (.ml)"

Test plan

  • Install academi theme on Moodle 5.0
  • Verify no "Deprecated style in use" warning appears
  • Verify drawer toggle and user navigation still align correctly (right-aligned)

Moodle 5.0 uses Bootstrap 5, which renamed .ml-* (margin-left) to
.ms-* (margin-start). This causes a "Deprecated style in use (.ml)"
warning banner on every page.

Replaced .ml-auto with .ms-auto in three templates:
- drawers.mustache
- frontpage.mustache
- navbar.mustache

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant