Hello,
If you’re using child theme you can add that code in style.css in child theme folder. Please try it.
Thank you. Regards, Eva Kemp.