Skip to content

Commit 854094f

Browse files
authored
Merge pull request #1297 from roland04/devdocs-scss-deprecations-update
[docs] Documentation for MDL-84450
2 parents c5afd9f + 4f52cf1 commit 854094f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

general/development/policies/deprecation/scss-deprecation.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ To deprecate SCSS code, follow these steps:
3737

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

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

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

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

0 commit comments

Comments
 (0)