Skip to content

Commit

Permalink
update anchor header styles
Browse files Browse the repository at this point in the history
  • Loading branch information
josuebran committed Nov 1, 2023
1 parent bc69787 commit 15cba76
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 28 deletions.
9 changes: 6 additions & 3 deletions src/css/doc.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
.doc h4,
.doc h5,
.doc h6 {
display: flex;
flex-direction: row-reverse;
justify-content: flex-end;
align-items: center;
gap: var(--ds-space-h);
color: var(--heading-font-color);
hyphens: none;
line-height: 1.5;
Expand Down Expand Up @@ -120,10 +125,8 @@
.doc h4 .anchor,
.doc h5 .anchor,
.doc h6 .anchor {
position: absolute;
display: flex;
text-decoration: none;
width: 2.75ex;
margin-left: -2ex;
visibility: hidden;
font-weight: normal;
color: var(--ds-primary-soft-hover-bg);
Expand Down
54 changes: 29 additions & 25 deletions src/css/ds-layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,41 @@
}
}

html[data-layout="full"] main > .content {
justify-content: center;
}
html[data-layout="full"] {
main > .content {
justify-content: center;
}

html[data-layout="full"] .content-container {
flex-wrap: wrap;
align-content: center;
.content-container {
flex-wrap: wrap;
align-content: center;
}
}

html[data-layout="landing"] .toolbar,
html[data-layout="full"] .toolbar {
justify-content: flex-end;
}
html[data-layout="landing"],
html[data-layout="full"] {
.toolbar {
justify-content: flex-end;
}

html[data-layout="landing"] .doc > h1.page:first-child,
html[data-layout="full"] .doc > h1.page:first-child {
font-size: calc(34 / var(--rem-base) * 1rem);
margin-top: var(--ds-space-3);
margin-top: var(--ds-space-2);
}
.doc > h1.page:first-child {
font-size: calc(34 / var(--rem-base) * 1rem);
margin-top: var(--ds-space-3);
margin-top: var(--ds-space-2);
}

html[data-layout="landing"] #preamble,
html[data-layout="full"] #preamble {
max-width: 650px;
}
#preamble {
max-width: 650px;
}

html[data-layout="landing"] .doc .olist li + li,
html[data-layout="landing"] .doc .ulist li + li,
html[data-layout="full"] .doc .olist li + li,
html[data-layout="full"] .doc .ulist li + li {
margin-top: var(--ds-space-2);
.anchor {
display: none;
}

.doc .olist li + li,
.doc .ulist li + li {
margin-top: var(--ds-space-2);
}
}

.text-h1 > h2 {
Expand Down

0 comments on commit 15cba76

Please sign in to comment.