mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibWeb: Fix input field placeholder vertical alignment
Input elements with a placeholder were positioned lower than inputs without a placeholder or inputs with text. This was caused by the placeholder element missing height height and overflow properties that the inner text element had. This fix makes sure both the placeholder and inner text elements let show the same position of the input field.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
9ee2bb5570
commit
98f1813f5d
Notes:
github-actions[bot]
2026-03-02 12:25:39 +00:00
Author: https://github.com/punthenk 🔰 Commit: https://github.com/LadybirdBrowser/ladybird/commit/98f1813f5dc Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8062 Reviewed-by: https://github.com/gmta ✅
@@ -8,6 +8,7 @@
|
||||
* Copyright (c) 2024, Fernando Kiotheka <fer@k6a.dev>
|
||||
* Copyright (c) 2025, Felipe Muñoz Mazur <felipe.munoz.mazur@protonmail.com>
|
||||
* Copyright (c) 2025, Glenn Skrzypczak <glenn.skrzypczak@gmail.com>
|
||||
* Copyright (c) 2026, Michiel Nijenhuis <michielmitsjol@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
@@ -861,7 +862,10 @@ static GC::Ref<CSS::CSSStyleProperties> placeholder_style_when_visible()
|
||||
style = CSS::CSSStyleProperties::create(internal_css_realm(), {}, {});
|
||||
style->set_declarations_from_text(R"~~~(
|
||||
width: 100%;
|
||||
height: 1lh;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
scrollbar-width: none;
|
||||
text-overflow: clip;
|
||||
white-space: nowrap;
|
||||
)~~~"sv);
|
||||
|
||||
Reference in New Issue
Block a user