Overview
Solution
To add a custom CSS Class to Gutenberg Blocks, you need to select the Gutenberg block. Now, on the right side panel under the Block TAB look for Advanced section and enter the class name [Additional CSS Class(es)] here. See the image below for reference.

Now you can use this Custom CSS Class to handle the styling of Gutenberg block level elements under the customization options of WordPress.
See a sample code below that justifies the any paragraph under the justify class.
p.justify { text-align: justify; }
Where do we add Custom CSS Code in WordPress?
Now that we have the custom CSS code in a hand we need to know where to put this code in WordPress so that we can see the styling in action. You should now Navigate to yourwebsite.com/wp-admin to access the administration area of your WordPress website.
Now you should select the options in the following order to be able to insert the custom CSS code for your WordPress website. Navigate to yourwebsite.com/wp-admin to access the administration area and follow the steps below:
- Go to Appearance [see image below]
- Click on Customize [see image below]

3. Now click on CSS [see image below]

4. Enter the custom code in the code area [see image below]
5. Click on Publish Button to save the changes [see image below]

Now you should go to the front of your website and see whether the changes you have applied for styling are visible to make sure work is properly saved.
We hope you find this article useful. In case if you are unable to apply custom CSS class Gutenberg blocks under WordPress, you may add a comment or submit your question to us. If you find it useful, do share it further.
I wish there was some place that listed all (or even some basic) css class(es) that can be used. If you don’t know any css, you can’t use these fields. wordpress needs a list that basically says, “If you want to do this… copy and paste this code.” Then at least we can start to learn what options are available to us.
That is doable for basic elements such as Headings, Paragraph elements, etc. Most of the elements are theme-specific and have to follow the classes used in the respective themes. So, getting ready to use code blocks would be a bit of a challenge. Maybe, WP team can consider this approach for most trending themes or the themes developed by them.
[…] Sulla base di questo articolo e del resto ho letto … LINK […]