Jump to content

How to change default blue colors to green of forms in Prestashop 8.2.1


Peter_17

Recommended Posts

Hello,

I changed standard blue color of forms in my template this way:

.form-control:active, .form-control:hover {
  background-clip: padding-box;
  background-color: #fff;
  border: 1px solid #008082;
  border-radius: .4rem;
  color: #495057;
  display: block;
  font-size: 1rem;
  font-weight: 400;
  height: calc(1.5em + 1rem + 2px);
  line-height: 1.5;
  padding: .5rem 1rem;
  transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
  box-shadow: 0 0 5px  #008082;
}

When the input field is not "hover" is still blue? How to change that? 3rd picture.

1.png.b31bdc71f4605a439d9afc2c3c28c662.png2.png.84c2b67c0f9ee00ed59856b9b90c1c85.png3.png.7d0d2744a05114e6661b412ce2b83a00.png

How to change blue dot before Mr.?4.thumb.png.d84c2e28fa342fd5204864333bfe13e6.png

Link to comment
Share on other sites

3 minutes ago, Peter_17 said:

Hello,

I changed standard blue color of forms in my template this way:

.form-control:active, .form-control:hover {
  background-clip: padding-box;
  background-color: #fff;
  border: 1px solid #008082;
  border-radius: .4rem;
  color: #495057;
  display: block;
  font-size: 1rem;
  font-weight: 400;
  height: calc(1.5em + 1rem + 2px);
  line-height: 1.5;
  padding: .5rem 1rem;
  transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
  box-shadow: 0 0 5px  #008082;
}

When the input field is not "hover" is still blue? How to change that? 3rd picture.

1.png.b31bdc71f4605a439d9afc2c3c28c662.png2.png.84c2b67c0f9ee00ed59856b9b90c1c85.png3.png.7d0d2744a05114e6661b412ce2b83a00.png

How to change blue dot before Mr.?4.thumb.png.d84c2e28fa342fd5204864333bfe13e6.png

To take care of the regular (default state) blue styles, you’ll also want to override the base input styles, something like:

.form-control {
  border: 1px solid #008082; /* your green */
  box-shadow: none;           /* remove blue focus glow if needed */
}
 

The best way is simply to inspect the elements with your browser’s developer tools, find the exact CSS selectors for the blue colors, and replace those values with your green.

Just search for the color code (like #0d6efd) and override it in your custom CSS.

Link to comment
Share on other sites

Thanks for help.

I finally did it this way:

.form-control:active, .form-control:hover, .form-control:focus {
  background-clip: padding-box;
  background-color: #fff;
  border: 1px solid #008082;
  color: #495057;
  display: block;
  transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
  box-shadow: 0 0 5px  #008082;
}

.custom-select:active, .custom-select:hover, .custom-select:focus  {
  border: 1px solid #008082;
  color: #495057;
  transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
  box-shadow: 0 0 5px  #008082;
}

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...