Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/397902 )

Change subject: Update: use content header margins for section headers
......................................................................

Update: use content header margins for section headers

Wrap section headers in a Content component and allow the default header
margins apply.

Change-Id: Idf95cef30127bcc3e7c5a2ec4c45d99338ba23bd
---
M src/common/components/content-section/content-section.tsx
M src/common/components/content/styles/content.css
2 files changed, 11 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/02/397902/1

diff --git a/src/common/components/content-section/content-section.tsx 
b/src/common/components/content-section/content-section.tsx
index e68912e..d70c1c3 100644
--- a/src/common/components/content-section/content-section.tsx
+++ b/src/common/components/content-section/content-section.tsx
@@ -21,9 +21,14 @@
       id={section.fragment}
     >
       {section.titleHTML && ( // Omit empty headers such as the lead.
-        <DynamicHeader class="ContentSection-header" level={section.level + 1}>
-          <Content dangerouslySetInnerHTML={{ __html: section.titleHTML }} />
-        </DynamicHeader>
+        <Content>
+          <DynamicHeader
+            class="ContentSection-header"
+            level={section.level + 1}
+          >
+            <div dangerouslySetInnerHTML={{ __html: section.titleHTML }} />
+          </DynamicHeader>
+        </Content>
       )}
 
       <Content dangerouslySetInnerHTML={{ __html: section.contentHTML }} />
diff --git a/src/common/components/content/styles/content.css 
b/src/common/components/content/styles/content.css
index c01d0df..2864883 100644
--- a/src/common/components/content/styles/content.css
+++ b/src/common/components/content/styles/content.css
@@ -1,7 +1,7 @@
-/* Remove margin bottom on the last and top on the first child so that content
-   wraps the inner elements exactly right. */
+/* Remove margin bottom on the last child so that content wraps the inner
+   elements exactly right. The first element of sections is usually a header
+   which should be permitted a top margin. */
 .Content > :last-child { margin-bottom: 0; }
-.Content > :first-child { margin-top: 0; }
 
 /* Typography */
 

-- 
To view, visit https://gerrit.wikimedia.org/r/397902
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf95cef30127bcc3e7c5a2ec4c45d99338ba23bd
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski <sniedziel...@wikimedia.org>
Gerrit-Reviewer: Sniedzielski <sniedziel...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to