mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 12:19:37 +03:00
LibWeb: Don't try to be clever about -libweb-center relative position
Let's just say that -libweb-center centers the block in its containing block for now. We can get fancy with relative offsets later.
This commit is contained in:
parent
bc5a862cbe
commit
1e15fa30e4
Notes:
sideshowbarker
2024-07-19 05:40:10 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/1e15fa30e4e
@ -454,7 +454,7 @@ void LayoutBlock::compute_position()
|
||||
+ box_model().offset().left.to_px(*this);
|
||||
|
||||
if (parent()->is_block() && parent()->style().text_align() == CSS::ValueID::VendorSpecificCenter) {
|
||||
position_x += (containing_block.width() / 2) - width() / 2;
|
||||
position_x = (containing_block.width() / 2) - width() / 2;
|
||||
}
|
||||
|
||||
float position_y = box_model().margin_box(*this).top
|
||||
|
Loading…
Reference in New Issue
Block a user