Yeah.. The core styles are not great in CSS variable structure / usage. IMHO it's better to have str

Yeah.. The core styles are not great in CSS variable structure / usage. IMHO it's better to have structural styles like the following....

:root {
  --color-shadow-primary: #ff0000;

  --default-focus-box-shadow: 0 0 5px var(--color-shadow-primary);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="search"]:focus {
  box-shadow: var(--input-focus-box-shadow, var(--default-focus-box-shadow));
}


For reference so folks don't have to look it up this is what it looks like in core Foundry:
input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="search"]:focus {
  box-shadow: 0 0 5px var(--color-shadow-primary);
}
Was this page helpful?