antoni-oliver / moodle-block_graderanking

MIT License
0 stars 0 forks source link

styles.css not specific enough. #7

Closed danmarsden closed 4 months ago

danmarsden commented 2 years ago

in your styles.css you define a number of generic styles that could clash with core moodle code or other locations where simliar names are used.

Moodle helpfully adds a number of classes to the body tag based on the path that you can use such as: eg if you are have a file in mod/assign you would see the following class added to the body tag path-mod-assign so if you have an item with the class "filething" on the page you would target it like:

.path-mod-assign .filething {
   color: red;
}

Content rendered within a block will also have the block frankenstyle class name added - see example below from blog_tags block:

.block_blog_tags .s19 {
    font-size: 1.5em;
}

Please make sure your css classes in styles.css are specific enough so they cannot clash with other core code.

antoni-oliver commented 4 months ago

Fixed in 65a299a5f34ed0f358dda167c9cd0d607562bc19.

Thank you for the input.