Fixing Code Block Alignment

I’m using the Enlighter plugin for WordPress to syntax highlight code snippets in posts. When using the TwentyTwenty theme the code snippets are left-aligned instead of centered in the post. This is a known compatibility issue for this plugin, and there is a fix detailed on Github.

.enlighter-default{
    margin: 0 auto 1.25em auto;
}

I’ve already created a child theme based on TwentyTwenty so it was easy to add the above CSS to the stylesheet, and et viola, the code snippets are correctly aligned now.