I have declare h1 tag font size in global variable,


@h1__font-size: 48px !important;

Declare inside the custom less file,


h1 {

When i see website home page, the font override by bootstrap font.

How to apply by global variables to home page?


Add the below css in your css file

h1 {
    font-size:@h1__font-size !important;    

after run the below commands,

php bin/magento s:up
php bin/magento s:s:d -f
php bin/magento c:f
  • Which css file? – zus Jan 8 at 7:15
  • 1
    C:\xampp\htdocs\mage\app\design\frontend\zero_theme\theme\web\css\source\components\common.less AS you used the css file , – madani Jan 8 at 7:18
  • My CMS static block have button, by default bootstrap design applied, how to apply my own design/ – zus Jan 8 at 8:02
  • 1
    Add the custom css class in your static block button and add the custom css in your custom added css class in your css file and also put the your css file link in default_head_blocks.xml file after the bootstrap css link. – madani Jan 8 at 8:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.