From 37370bce72b35c2743b68ff0d89efc5765be608d Mon Sep 17 00:00:00 2001 From: r0b0_s1av3 <55931329+r0b0-s1av3@users.noreply.github.com> Date: Tue, 1 Oct 2019 11:21:41 -0500 Subject: [PATCH] Create lobotomizedOwlSelector.md --- snippets/lobotomizedOwlSelector.md | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 snippets/lobotomizedOwlSelector.md diff --git a/snippets/lobotomizedOwlSelector.md b/snippets/lobotomizedOwlSelector.md new file mode 100644 index 000000000..4e557ae97 --- /dev/null +++ b/snippets/lobotomizedOwlSelector.md @@ -0,0 +1,31 @@ +--- +title: Lobotomized Owl Selector +tags: layout, beginner +--- + +Sets an automatically inherited margin for all elements that follow other elements in the document. + +```html +
+
Parent 01
+
Parent 02 +
Child 01
+
Child 02
+
+
Parent 03
+
+``` + +```css +* + * { + margin-top: 1.5em; +} +``` + +#### Explanation + +- [View this link for a detailed explanation.](https://alistapart.com/article/axiomatic-css-and-lobotomized-owls/) +- In this example, all elements in the flow of the document that follow other elements will receive `margin-top: 1.5em`. +- This example assumes that the paragraphs' `font-size` is 1em and its `line-height` is 1.5. + +#### Browser support