1

I would like to change the color and the border thickness of input fields, but I can't find the way to do this. I've tried to use _extend.less but that doesn't work. It looks like styles-m.css is overriding it. So I think I have to change styles-m.css? I've tried to add a styles-m.less but I can't get it to override. Can anyone help me?

This is what a need:

.block-search input { left: -300%; margin: 15px 0; position: absolute; border: 2px solid #296db6; }

0

enter image description here

=> Add this css code :

.block-search input {
 left: -300%;
 margin: 15px 0;
 position: absolute;
 border: 2px solid #296db6;
}

Now, you need to add CSS and use these commands:

php bin/magento setup:static-content:deploy
php bin/magento cache:clean
  • Thank you ravindrasinh zala. I found a something else what looks also quit good. I've added a file called _theme.less and added: @input-text__border: 2px solid #296db6; this had the same result i wanted. Thx for you're answer – Ton Oct 3 '17 at 12:31
0

Just add these variables to your theme _extend.less

@form-element-input__border-color:#296db6; @form-element-input__border: 2px solid @form-element-input__border-color;

You can find all variables in magento root folder -> lib\web\css\source\lib\variables

see Magento docs https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-guide/css_quick_guide_approach.html

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.