Gradio has many incompatibilities in its syntax between the 3.x and 4.x series.
His solution probably worked back in 3.x. The following elem_classes are easy to use in the 4.x series.
Note, however, that css often does not work without !important;, and even if it does, it is often impossible.
If you try to force a workaround in the css style (display: inline-block;, etc.), you may in turn get caught in the layout collapse bug.
css = '''
.info {text-align: center; font-size: 3em; !important}
'''
with gr.Blocks(css=css) as app:
~~
gr.Checkbox(label="test", value=False, elem_classes="info")