Skip to content

[docs] Documentation for MDL-84450 #1297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions general/development/policies/deprecation/scss-deprecation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ To deprecate SCSS code, follow these steps:

1. Remove the SCSS code that is no longer in use from the original file.
2. Add the removed SCSS code to the `deprecated.scss` file under the comment for the current version `// Deprecated since Moodle X.Y.`
3. Add the `deprecated-styles` mixin to the removed SCSS code.
3. Add the `deprecated-styles` mixin to the removed SCSS code, with the deprecated selector as parameter.
4. Add a comment to the removed SCSS code explaining why it has been deprecated.

:::note
Expand All @@ -51,7 +51,7 @@ If there is no section for the current version in the `deprecated.scss` file, it
```scss title="theme/boost/scss/moodle/deprecated.scss"
// The class ".foo" is deprecated. Use ".bar" instead.
.foo {
@include deprecated-styles();
@include deprecated-styles(".foo");

color: $pink;
@include border-right-radius(0);
Expand All @@ -71,7 +71,7 @@ If there is no section for the current version in the `deprecated.scss` file, it
// The following styles are deprecated because they are no longer in use.
// Deprecating the parent selector that contains all the deprecated styles.
.path-course-view li.activity .foo {
@include deprecated-styles();
@include deprecated-styles(".path-course-view li.activity .foo");
}
.path-course-view li.activity .foo > a {
text-decoration: none;
Expand Down Expand Up @@ -115,5 +115,6 @@ Run optional tests:
If deprecated styles are being used, the test will fail with the following message:

```bash
Deprecated style in use (Exception)
Deprecated styles found:
.foo (found in: d-flex align-items-center foo)
```