mirror of
https://github.com/servo/servo.git
synced 2025-08-13 01:15:34 +01:00
Style input-text pseudo with user-agent CSS
This commit is contained in:
parent
83f687a7be
commit
8500f3c8b8
5 changed files with 18 additions and 19 deletions
|
@ -2278,20 +2278,6 @@ pub fn modify_style_for_text(style: &mut Arc<ComputedValues>) {
|
|||
}
|
||||
}
|
||||
|
||||
/// Adjusts the `margin` property as necessary to account for the text of an `input` element.
|
||||
///
|
||||
/// Margins apply to the `input` element itself, so including them in the text will cause them to
|
||||
/// be double-counted.
|
||||
#[cfg(feature = "servo")]
|
||||
pub fn modify_style_for_input_text(style: &mut Arc<ComputedValues>) {
|
||||
let mut style = Arc::make_mut(style);
|
||||
let margin_style = Arc::make_mut(&mut style.margin);
|
||||
margin_style.margin_top = computed::LengthOrPercentageOrAuto::Length(Au(0));
|
||||
margin_style.margin_right = computed::LengthOrPercentageOrAuto::Length(Au(0));
|
||||
margin_style.margin_bottom = computed::LengthOrPercentageOrAuto::Length(Au(0));
|
||||
margin_style.margin_left = computed::LengthOrPercentageOrAuto::Length(Au(0));
|
||||
}
|
||||
|
||||
/// Adjusts the `clip` property so that an inline absolute hypothetical fragment doesn't clip its
|
||||
/// children.
|
||||
#[cfg(feature = "servo")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue