From 8e7429d10f0bd91c55ac678dc68061358ccaa88d Mon Sep 17 00:00:00 2001 From: mawowo67 Date: Tue, 3 Feb 2026 19:13:18 +0800 Subject: [PATCH 1/2] Add CSS term margin-block --- .../terms/margin-block/margin-block.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 content/css/concepts/margins/terms/margin-block/margin-block.md diff --git a/content/css/concepts/margins/terms/margin-block/margin-block.md b/content/css/concepts/margins/terms/margin-block/margin-block.md new file mode 100644 index 00000000000..0b4ac56da5a --- /dev/null +++ b/content/css/concepts/margins/terms/margin-block/margin-block.md @@ -0,0 +1,22 @@ +# margin-block + +The `margin-block` CSS property defines the logical block-start and block-end margins of an element. It is used to control vertical spacing in writing modes where the block direction may vary, such as top-to-bottom or right-to-left layouts. + +## Syntax + +margin-block: ; +- ``: sets the margin at the start of the block (top in normal writing mode) +- ``: sets the margin at the end of the block (bottom in normal writing mode) + +## Example + +``` +.box { + margin-block: 10px 20px; +} +``` + +In this example, the `.box` element will have a 10px margin at the start of the block and a 20px margin at the end of the block. + +## Notes +`margin-block` is a logical property and will adapt based on writing mode, unlike `margin-top` and `margin-bottom`. \ No newline at end of file From 81c9a13b95d7c3b404d7c0da247abd81d461a89b Mon Sep 17 00:00:00 2001 From: mawowo67 Date: Tue, 3 Feb 2026 19:35:49 +0800 Subject: [PATCH 2/2] Updated the markdown formatting --- .../css/concepts/margins/terms/margin-block/margin-block.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/content/css/concepts/margins/terms/margin-block/margin-block.md b/content/css/concepts/margins/terms/margin-block/margin-block.md index 0b4ac56da5a..588dc51cb92 100644 --- a/content/css/concepts/margins/terms/margin-block/margin-block.md +++ b/content/css/concepts/margins/terms/margin-block/margin-block.md @@ -9,14 +9,12 @@ margin-block: ; - ``: sets the margin at the end of the block (bottom in normal writing mode) ## Example - ``` .box { margin-block: 10px 20px; } ``` - In this example, the `.box` element will have a 10px margin at the start of the block and a 20px margin at the end of the block. -## Notes -`margin-block` is a logical property and will adapt based on writing mode, unlike `margin-top` and `margin-bottom`. \ No newline at end of file +> [!NOTE] +> `margin-block` is a logical property and will adapt based on writing mode, unlike `margin-top` and `margin-bottom`. \ No newline at end of file