content/static: style fixes for sidebar details section
Adds responsive styles to sidebar details
to prevent overflow issue on smaller screens.
Change-Id: I1b8da3830e7bdd8a4311c3d71c1066dcfb22d944
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/278536
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
diff --git a/content/static/css/unit_details.css b/content/static/css/unit_details.css
index 5ade0f3..9013b92 100644
--- a/content/static/css/unit_details.css
+++ b/content/static/css/unit_details.css
@@ -36,7 +36,7 @@
}
@media only screen and (min-width: 64rem) {
.UnitDetails {
- grid-template-columns: 15.5rem minmax(32.5rem, 43.125rem) minmax(10rem, 15.5rem);
+ grid-template-columns: 15.5rem minmax(30.5rem, 43.125rem) minmax(10rem, 15.5rem);
}
}
@media only screen and (min-width: 80rem) {
diff --git a/content/static/css/unit_meta.css b/content/static/css/unit_meta.css
index 154952b..48f7846 100644
--- a/content/static/css/unit_meta.css
+++ b/content/static/css/unit_meta.css
@@ -43,6 +43,7 @@
.UnitMetaDetails li {
font-size: 0.875rem;
margin-bottom: 0.75rem;
+ white-space: nowrap;
}
.UnitMetaDetails a {
font-size: 0.8125rem;
@@ -73,11 +74,27 @@
border-radius: 0.25rem;
display: block;
font-size: 0.75rem;
- left: -6rem;
+ left: -12rem;
letter-spacing: 0.01875rem;
line-height: 1rem;
padding: 0.5rem;
position: relative;
top: 1.5rem;
+ white-space: initial;
width: 12rem;
}
+@media only screen and (min-width: 65rem) {
+ .UnitMetaDetails-toggletipBubble {
+ left: -10rem;
+ }
+}
+@media only screen and (min-width: 70rem) {
+ .UnitMetaDetails-toggletipBubble {
+ left: -8rem;
+ }
+}
+@media only screen and (min-width: 82rem) {
+ .UnitMetaDetails-toggletipBubble {
+ left: -6rem;
+ }
+}