Header Breaking changenavigation, top, menu, top navigation, navbar, nav bar, navigation bar, second level, 2-level menu, sub navigation, Skatt & Bokslut
Add .no-hover to a control to turn off its hover effect. The control keeps its resting border, background, and shadow when the pointer is over it, while focus, selected, disabled, and error states are left untouched.
This is useful when a hover change would be distracting rather than helpful — for example inside an input group, where hovering the field would otherwise highlight it while the user is interacting with an adjacent control.
The class is supported on the following controls:
.no-hover
Turns off the hover effect on text inputs, textareas, selects, search fields, input groups, and table header cells. On .table-active tables it also suppresses the pressed/active highlight on the header cell it is applied to.
<inputtype="text"class="form-control no-hover">
Form controls
Demonstrates .no-hover on a text input, textarea, select, search field, and numeric input group. These examples are also used by our Playwright CSS property assertion tests.
Hover over each control below. The controls on the left react to hover with a changed border and background; the controls on the right carry .no-hover, so they keep their resting appearance.
<p>Hover over each control below. The controls on the left react to hover with a changed border and background; the controls on the right carry <code>.no-hover</code>, so they keep their resting appearance.</p><divclass="d-flex flex-wrap gap-24"><!-- Default text input — hover effect active --><divclass="form-group docs-form-state-width"><labelfor="hoverDefaultInput">Default</label><inputtype="text"class="form-control"id="hoverDefaultInput"placeholder="Hover over me"aria-describedby="hoverDefaultInputHelp"><spanid="hoverDefaultInputHelp"class="help-block">Hovering changes the border and background.</span></div><!-- Text input with .no-hover — hover effect suppressed --><divclass="form-group docs-form-state-width"><labelfor="hoverNoneInput">With <code>.no-hover</code></label><inputtype="text"class="form-control no-hover"id="hoverNoneInput"placeholder="Hover over me"aria-describedby="hoverNoneInputHelp"><spanid="hoverNoneInputHelp"class="help-block">Hovering leaves the resting style unchanged.</span></div></div><divclass="d-flex flex-wrap gap-24 mt-24"><!-- Default textarea — hover effect active --><divclass="form-group docs-form-state-width"><labelfor="hoverDefaultTextarea">Default</label><textareaclass="form-control"id="hoverDefaultTextarea"rows="2"placeholder="Hover over me"></textarea></div><!-- Textarea with .no-hover — hover effect suppressed --><divclass="form-group docs-form-state-width"><labelfor="hoverNoneTextarea">With <code>.no-hover</code></label><textareaclass="form-control no-hover"id="hoverNoneTextarea"rows="2"placeholder="Hover over me"></textarea></div></div><divclass="d-flex flex-wrap gap-24 mt-24"><!-- Default select — hover effect active --><divclass="form-group docs-form-state-width"><labelfor="hoverDefaultSelect">Default</label><selectclass="form-control"id="hoverDefaultSelect"><option>Option 1</option><option>Option 2</option><option>Option 3</option></select></div><!-- Select with .no-hover — hover effect suppressed --><divclass="form-group docs-form-state-width"><labelfor="hoverNoneSelect">With <code>.no-hover</code></label><selectclass="form-control no-hover"id="hoverNoneSelect"><option>Option 1</option><option>Option 2</option><option>Option 3</option></select></div></div><divclass="d-flex flex-wrap gap-24 mt-24"><!-- Default search field — hover effect active --><divclass="form-group search-group docs-form-state-width"><labelclass="sr-only"for="hoverDefaultSearch">Search</label><inputtype="search"class="form-control"id="hoverDefaultSearch"placeholder="Hover over me"><spanaria-hidden="true"class="search-icon">Search icon</span></div><!-- Search field with .no-hover — hover effect suppressed --><divclass="form-group search-group docs-form-state-width"><labelclass="sr-only"for="hoverNoneSearch">Search</label><inputtype="search"class="form-control no-hover"id="hoverNoneSearch"placeholder="Hover over me"><spanaria-hidden="true"class="search-icon">Search icon</span></div></div><divclass="d-flex flex-wrap gap-24 mt-24"><!-- Default numeric input group — hover effect active --><divclass="form-group docs-form-state-width"><labelfor="hoverDefaultGroupInput">Default</label><divclass="input-group"id="hoverDefaultGroup"><inputtype="number"class="form-control"id="hoverDefaultGroupInput"value="500"aria-describedby="hoverDefaultGroupCurrency"><spanclass="input-group-text"id="hoverDefaultGroupCurrency"aria-label="Currency: SEK">SEK</span></div></div><!-- Numeric input group with .no-hover — hover effect suppressed --><divclass="form-group docs-form-state-width"><labelfor="hoverNoneGroupInput">With <code>.no-hover</code></label><divclass="input-group no-hover"id="hoverNoneGroup"><inputtype="number"class="form-control"id="hoverNoneGroupInput"value="500"aria-describedby="hoverNoneGroupCurrency"><spanclass="input-group-text"id="hoverNoneGroupCurrency"aria-label="Currency: SEK">SEK</span></div></div></div>