I'm using a BlueprintJS Numeric Input component and want to remove the blue outline when you focus on the component. I want to remove it because it's inside something else that has its own border when you focus it. I've built the following example:
// Numeric input
const input = (
<Blueprint.Core.NumericInput
className={"inputTest"}
value={1}
buttonPosition={"none"}
/>);
// styling.scss
.inputTest {
width: 50px;
* > * {
:focus {
border: none;
}
}
}
But when you click on the input, it still has a blue border. Is there some other way to remove this?
Your selector is bad:
* > *
means "the immediate child of any child" and a nested:focus
is another child but the input isn't nested that deep. Additionally, you need to override box-shadow:https://jsfiddle.net/k9uLjwyf/