aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2021-11-09 14:15:41 -0500
committerRuss Cox <rsc@golang.org>2021-11-17 17:48:26 +0000
commit44e466c7fc58471c854ae9b98f9e55c8cd5cd341 (patch)
tree8d5019883fd62a3531e83d623537bc81ef575b20
parenta7260f247f2464ef8d9198145a1902df814529c7 (diff)
downloadgo-x-website-44e466c7fc58471c854ae9b98f9e55c8cd5cd341.tar.xz
go.dev/_content/css: various tweaks for golang.org merge
- scroll-behavior: smooth is incredibly frustrating on Macs at least. It's way too slow. Go back to the regular behavior when you click a #Link. - Make printed docs look reasonable (no invisible banner covering up content on subsequent pages, no lines of text sliced in half). - Make .Article margins better defaults. We can always adjust specific pages, but these defaults seem to have been overfitted to the specific uses of <h1> <h2> and so on in specific pages. The changes do not make those pages look noticeably worse, and they do make other pages look noticeably better. Preparation for the golang.org -> go.dev move. Change-Id: Ia0b5783e9db35785252dc37c443f3f25114f8b4a Reviewed-on: https://go-review.googlesource.com/c/website/+/362501 Trust: Russ Cox <rsc@golang.org> Reviewed-by: Jamal Carvalho <jamal@golang.org>
-rw-r--r--go.dev/_content/css/styles.css38
1 files changed, 16 insertions, 22 deletions
diff --git a/go.dev/_content/css/styles.css b/go.dev/_content/css/styles.css
index 27ada053..28bef832 100644
--- a/go.dev/_content/css/styles.css
+++ b/go.dev/_content/css/styles.css
@@ -71,7 +71,6 @@ html,
.Site {
max-height: 100%;
min-height: 100vh;
- scroll-behavior: smooth;
scroll-padding-top: 4.6875rem;
}
a,
@@ -88,6 +87,10 @@ a:hover {
flex-direction: column;
margin: 0;
}
+@media print {
+ /* display: flex makes the printer slice text lines in half */
+ .Site { display: block; }
+}
.bluebg {
background: #007d9c;
}
@@ -190,6 +193,9 @@ a:hover {
.UseCase-halfColumn > h2 {
line-height: 1.55;
}
+@media print {
+ .Site-header { display: none; }
+}
.Header,
.Container {
margin: 0 auto;
@@ -445,9 +451,13 @@ a.Footer-link--primary {
max-width: 75.75rem;
padding: 0 1.5rem;
}
-.Doc h1 {
+.Dir h1, .Doc h1, .Error h1, .Pkg h1, .Texthtml h1 {
padding-top: 1rem;
}
+h2.subtitle {
+ font-size: 1.2rem !important;
+ padding-left: 1.5rem;
+}
.Article-author,
.Article-date {
font-size: 0.875rem;
@@ -462,16 +472,16 @@ a.Footer-link--primary {
.Article h5,
.Article h6 {
color: #202224;
+ margin: initial;
}
.Article h1 {
font-size: 2.25rem;
line-height: 3rem;
- margin: 1rem 0 1rem;
}
.Article h2 {
font-size: 1.4rem;
line-height: 2rem;
- margin-top: 2.25rem;
+ margin-top: 1rem;
}
.Article h3 {
font-size: 1.125rem;
@@ -505,24 +515,8 @@ a.Footer-link--primary {
.Article code {
color: #202224;
}
-@media only screen and (min-width: 57.7rem) {
- .Article h1,
- .Article h2,
- .Article h4,
- .Article h5,
- .Article h6 {
- margin: initial;
- }
- .Article h2 + h3 {
- margin-top: 1.5rem;
- }
- .Article h3 {
- margin-top: 1.875rem;
- }
- .Article h2 {
- font-size: 1.5rem;
- line-height: 2.25rem;
- }
+.Article pre {
+ margin-left: 1.5rem;
}
.BreadcrumbNav-inner {
display: flex;