Repository navigation
Fix the plaintext floating label border width - #43446
Draft
julien-deramond wants to merge 35 commits into
Draft
julien-deramond wants to merge 35 commits into
julien-deramond wants to merge 35 commits into
Conversation
…lors() mixin Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lors() mixin Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…m/coliff/bootstrap into dev/coliff/forced-colors-css-mode
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n skill Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A transparent outline outside the media query replaced the browser focus ring on a focusable avatar, and ignored $enable-forced-colors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Deploy Preview for twbs-bootstrap ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
julien-deramond
marked this pull request as draft
November 23, 2026 07:49
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
This PR is built on top of #43441 (forced colors) and must be merged after it. Until #43441 is merged, the diff here also shows its commits: this PR's change is only the last commit, 44d2c2c.
The floating label for a
.form-control-plaintextsetsborder-width: var(--control-border-width) 0, but--control-border-widthis defined on the control, not on the label, which is its sibling. The declaration is invalid at computed-value time, so the label falls back tomedium(3px) on every side, and its text sits about 2px to the right of the plaintext value. This uses--border-widthinstead, as the base floating label rule already does, so the label gets 1px top and bottom and no inline border, which is what the rule intends.The red line marks the start of the input's text. Before, the plaintext labels start to its right; after, they line up with the value, like the regular input below them.
The regression came with the move from Sass variables to tokens (#41983), which replaced
$input-border-widthwith the custom property.Checks
Compiled CSS (
dist/css/bootstrap.css):.form-floating > label:has(~ .form-control-plaintext) { - border-width: var(--bs-control-border-width) 0; + border-width: var(--bs-border-width) 0; }Measured in Chromium on the "Readonly plaintext" docs examples, with a regular floating input as reference (label text start minus input text start):
The small negative offsets come from the floated label's
scale(). The vertical position of the label doesn't change.Checks:
npm run css-lintpasses, and the compiled CSS diff is the one line above. In forced colors mode, #43441 replaces this label's border with padding of the same width, so the label text there also lines up with the value (-0.21px, the same as in normal mode). In right to left, the plaintext label borders are also 1px / 0 after the fix. The floated label offsets there are larger for every input, the regular one too, because of the label's transform; that is unrelated to this change and wasn't investigated here.Not checked: Firefox and Safari (the change only makes an invalid declaration valid).
In DevTools, the label's computed
border-top-widthandborder-inline-start-widthare 3px onmainand 1px / 0 with the fix.