-
-
Notifications
You must be signed in to change notification settings - Fork 432
Improve Blog Post layout #3267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Improve Blog Post layout #3267
Changes from all commits
17f912c
0151aaf
afedc58
b43169d
9718836
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -29,7 +29,7 @@ article.post { | |||||
|
|
||||||
| td, | ||||||
| th { | ||||||
| padding: .5rem; | ||||||
| padding: 0.5rem; | ||||||
| border: unset; | ||||||
| border-bottom: 1px solid var(--borders-color); | ||||||
| } | ||||||
|
|
@@ -69,18 +69,28 @@ article.post { | |||||
|
|
||||||
| header { | ||||||
| margin-bottom: 1rem; | ||||||
|
|
||||||
| span { | ||||||
| font-size: 0.9rem; | ||||||
| color: var(--color-text-light); | ||||||
| } | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
| .post-main { | ||||||
| width: 100%; | ||||||
| display: flex; | ||||||
| flex-direction: row; | ||||||
| align-items: flex-start; | ||||||
| align-self: center; | ||||||
| display: grid; | ||||||
| grid-template-columns: 1fr; | ||||||
| align-items: start; | ||||||
| gap: 2rem; | ||||||
|
|
||||||
| .callout { | ||||||
| @media (min-width: 1024px) { | ||||||
| &:has(aside) { | ||||||
| grid-template-columns: 1fr 320px; | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
| .callout { | ||||||
| display: grid; | ||||||
| grid-template-columns: 300px auto; | ||||||
| color: #fff; | ||||||
|
|
@@ -119,7 +129,7 @@ article.post { | |||||
| font-size: 1.125rem; | ||||||
| font-weight: 700; | ||||||
| background-color: rgba(34, 109, 227); | ||||||
| padding: .5rem 1.5rem; | ||||||
| padding: 0.5rem 1.5rem; | ||||||
| border-radius: 9999px; | ||||||
| color: #fff; | ||||||
| margin-block-start: 1rem; | ||||||
|
|
@@ -144,29 +154,53 @@ article.post { | |||||
| } | ||||||
| } | ||||||
|
|
||||||
| &>:first-child { | ||||||
| & > :first-child { | ||||||
| margin-top: 0; | ||||||
| } | ||||||
|
|
||||||
| &>ul>li:not(:last-child) { | ||||||
| margin-bottom: .5rem; | ||||||
| & > ul > li:not(:last-child) { | ||||||
| margin-bottom: 0.5rem; | ||||||
| } | ||||||
|
|
||||||
| flex: 1 1; | ||||||
| max-width: 320px; | ||||||
| margin-left: 4rem; | ||||||
| padding: 1.5rem; | ||||||
| background-color: #f4f4f4; | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
| .post-content { | ||||||
| // Use all of the space not taken by the sidebar | ||||||
| flex: 3; | ||||||
| // Necessary to allow the pre to scroll on overflow | ||||||
| // min-width: 0 prevents grid blowout when content (e.g. pre blocks) is wider than the column | ||||||
| min-width: 0; | ||||||
|
|
||||||
| blockquote { | ||||||
| position: relative; | ||||||
| overflow: hidden; | ||||||
| border-left: none; | ||||||
| padding-left: 2rem; | ||||||
| margin: 0 0 1rem 0; | ||||||
|
|
||||||
| &::before, | ||||||
| &::after { | ||||||
| position: absolute; | ||||||
| color: #777; | ||||||
| } | ||||||
|
|
||||||
| // "//" rotated 90deg sits naturally at top-left | ||||||
| &::before { | ||||||
| content: "//"; | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks a bit strange imho. Is this a new common pattern? I think that quotes with just the | make the layout look smoother. |
||||||
| transform: rotate(90deg); | ||||||
| left: 0; | ||||||
| } | ||||||
|
|
||||||
| // Thin vertical line below the slashes, clipped by overflow: hidden | ||||||
| &::after { | ||||||
| content: ""; | ||||||
| left: 5px; | ||||||
| top: 40px; | ||||||
| width: 1px; | ||||||
| height: 100%; | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this line at 100% height has the combined lineheight of the text plus 10px top and bottom padding as defined somewhere according to my devtools. you are moving it 10px+30px=40px down, which means it exceeds the blockquote's container.
Suggested change
would bring that back so the line actually ends with the last line instead of the blockquote element. imo it looks a bit leaner. wdyt?
|
||||||
| background-color: currentColor; | ||||||
| } | ||||||
|
|
||||||
| h2 { | ||||||
| font-size: 1.5rem; | ||||||
| } | ||||||
|
|
@@ -191,7 +225,7 @@ h3 a { | |||||
| color: var(--color-link); | ||||||
| } | ||||||
|
|
||||||
| .footnote-definition>p { | ||||||
| .footnote-definition > p { | ||||||
| display: inline; | ||||||
| } | ||||||
|
|
||||||
|
|
||||||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean anything that is going over my head or is it just stylish?
It's now inconsistent with pages such as /blog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its just stylish.
I didnt want to use
"as it doesnt really feel right for twim.and I did overlook /blog indeed oops. Good catch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The inconsistency on /blog is now fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you intentionally not applying this globally?
https://d29b8cfb.matrix-website.pages.dev/foundation/working-groups/website-content/#charter