Currently, I am in the process of developing a search box similar to Google's for an e-commerce platform. Unfortunately, I am facing difficulties with the border-color, transition, and :focus properties. To further elaborate on the issues:
border-color: The specified hex color is only displayed in the bottom half of the input box, whereas the default color is retained in the upper half.
:focus: I intended for the input box to transition to a green shade when focused, but it remains at its default color instead.
transition: Despite setting a 1-second delay for the color change on focus, the transition occurs instantly without any delay.
I attempted to add '!important' to all properties as a precaution in case there was a conflict with Bootstrap (utilized mainly for its grid system). However, the issues persist. Below is the code snippet:
input {
border-radius: 3rem;
height: 5rem;
border-color: #999999;
font-family: "Poppins";
font-size: 1.5rem;
transition: border-color 1s;
}
input[type=text]:focus {
border-color: #85de46;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8be9e4e4ff8bfabdb8aab9f2a5b8a5b8">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<link href='https://fonts.googleapis.com/css?family=Poppins' rel='stylesheet'>
</head>
<body>
<div class="container-fluid no-gutters">
<div class="row d-flex min-vh-100 align-items-center justify-content-center">
<input class="col-sm-10 col-md-5" placeholder="Example text">
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="afcdc0c0dbdbeefccbdcdcdabe9cecec">[email protected]</a>/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
</body>
</html>