@@ -37,7 +37,7 @@ To deprecate SCSS code, follow these steps:
37
37
38
38
1 . Remove the SCSS code that is no longer in use from the original file.
39
39
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 .
41
41
4 . Add a comment to the removed SCSS code explaining why it has been deprecated.
42
42
43
43
::: note
@@ -51,7 +51,7 @@ If there is no section for the current version in the `deprecated.scss` file, it
51
51
``` scss title="theme/boost/scss/moodle/deprecated.scss"
52
52
// The class ".foo" is deprecated. Use ".bar" instead.
53
53
.foo {
54
- @include deprecated-styles ();
54
+ @include deprecated-styles (" .foo " );
55
55
56
56
color : $pink ;
57
57
@include border-right-radius (0 );
@@ -71,7 +71,7 @@ If there is no section for the current version in the `deprecated.scss` file, it
71
71
// The following styles are deprecated because they are no longer in use.
72
72
// Deprecating the parent selector that contains all the deprecated styles.
73
73
.path-course-view li .activity .foo {
74
- @include deprecated-styles ();
74
+ @include deprecated-styles (" .path-course-view li.activity .foo " );
75
75
}
76
76
.path-course-view li .activity .foo > a {
77
77
text-decoration : none ;
@@ -115,5 +115,6 @@ Run optional tests:
115
115
If deprecated styles are being used, the test will fail with the following message:
116
116
117
117
``` bash
118
- Deprecated style in use (Exception)
118
+ Deprecated styles found:
119
+ .foo (found in: d-flex align-items-center foo)
119
120
```
0 commit comments