resources/web/style/heading.pcss (116 lines of code) (raw):
#guide {
h1, h2, h3, h4, h5, h6 {
/* Relative position allows laying out the edit me links inside the header. */
position: relative;
font-family: Inter;
/* Override the "funny" line height from bootstrap. */
line-height: normal;
&:hover a[id][href] {
display: block;
position: absolute;
bottom: 3px;
margin: 0;
padding: 0;
left: -20px;
width: 100%;
height: 1em;
background-repeat: no-repeat;
background-position: 0% 50%;
background-image: inline("img/link.png");
}
}
h2 {
font-size: 29px;
margin: 20px 0;
a { font-weight: 300; }
}
h3 {
font-size: 22px;
font-weight: 600;
a { font-weight: 600; }
}
h4 {
font-size: 20px;
font-weight: 600;
}
h5 {
font-size: 18px;
font-weight: 600;
}
/* h3-h6 are generally inside the page so we space them out a bit more. */
h3 {
margin: 56px 0 16px;
}
h4 {
margin: 32px 0 12px;
}
h5, h6 {
margin: 16px 0 5px;
}
/**
Headings beyond h6 are not technically valid HTML tags,
but in the event that the nesting is deep enough we can at least bold the text.
**/
h7, h8, h9, h10, h11, h12 {
font-weight: 600;
}
/* Points folks to "edit" pages in github so they can contribute
* to the docs! */
.edit_me {
right:0;
position: absolute;
font-size: 14px;
top: 0;
padding-top: 26px;
line-height: 1;
opacity: 0.3;
background-repeat: no-repeat;
background-image: inline("img/edit-me.png");
&:hover {
opacity: 1;
}
}
.edit_me_private {
background-image: inline("img/edit-me-private.png");
display: none;
}
/* Titlepage headings don't need large gaps around them */
.titlepage {
.title {
margin: 10px 0 16px;
}
/* Styles the page header, which is always an h1
wrapped in a div with the titlepage class, and always
has the title class. */
h1.title {
margin: 18px 0;
font-size: 36px;
padding: 0;
a { font-weight: 300; }
}
&:has(h1.title) {
div {
&:has(>h1){
display: flex;
align-items: flex-start;
justify-content: space-between;
padding-bottom: 0px;
h1 {
margin-right: 12px;
}
}
}
a.edit_me {
align-self: center;
position: relative;
transform: translateY(6px);
width: 32px;
}
}
}
/* Hide the first heading within the main content
of the page since it is the same as the title */
div#content > div > .titlepage {
display: none;
}
}