Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MOODLE - custom CSS for blocks

Tags:

css

moodle

I want to create custom css for my custom block content, but moodle will take css from theme for all the blocks with similar css:

.block div.content {
    font-size: 12px;
    font-weight: 200;
    padding: 10px 15px 15px;
}

Here is the code I added to my blocks/status/styles.css:

.block_status .footer { margin-top: 5px; }
.block_status .content { border:1px dotted green; overflow:hidden; padding:0px; }
.block_status div.cname { border:1px solid blue;padding:10px; }

My css wasn't working. How could we create a new custom css for my block content. I would appreciate your help

like image 701
user2686207 Avatar asked Dec 14 '25 01:12

user2686207


1 Answers

Moodle CSS data is automatically minimized and combined into a single file, so that it can be downloaded more quickly by the end user.

If you are making changes to the stylesheets, you either need to turn on Theme Designer Mode or purge all caches (Site admin > Development > Purge all caches), before the changes are visible.

like image 50
davosmith Avatar answered Dec 16 '25 17:12

davosmith



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!