Due to LWC's Shadow DOM you cannot override those values using only the class name.
CSS styles defined in a parent component don’t leak into a child
SLDS allows to override them via styling hooks. A lot of properties are setted using var()
function, which get a custom property name as first parameter and a fallback (default) value.
I.E. font-size: var(--lwc-formLabelFontSize, 0.75rem);
.
As you can see from the browser's console, the font-size of that label is setted using --lwc-formLabelFontSize
property.
Since the element that contains that combobox already have a custom css class (statusFilter
), you could add the following rule into the css file:
:host .statusFilter {
--lwc-formLabelFontSize: .9rem;
}
Since the standard label has no font-weight configurable property, you could set lightning-input's variant attribute to label-hidden
and create your own HTML element, thus you'll be able to set every css property you need.