CSS Snippets
All Bliptown sites intentionally work with minimal CSS, but you can make whatever additions you like. Below are some examples.
Opaque Header
header {
background-color: inherit;
}
Fading Links
Make links (and linked images) fade to semitransparent with mouse hover:
a {
transition: opacity 0.5s ease;
}
a:hover {
opacity: 0.5;
}
Custom Layouts
Limit the horizontal size of wide layouts:
.wide, .gallery-horizontal {
max-width: 1280px;
}
Decorate Selected Menu Item
Add an underline to the current page in the sidebar menu:
nav menu a.selected {
border-bottom: 1px solid;
}
Add an arrow in the sidebar menu pointing to the current page:
nav menu li {
position: relative;
}
nav menu a.selected::before {
content: "\2192\00A0";
position: absolute;
left: -2.5ex;
}
Invisible Spacers
Add space vertical space by using --- (three dashes on its own
line), which render as a <hr> HTML element.
hr {
visibility: hidden;
margin: 3em 0;
}
Custom Fonts
Use a font from fonts.bunny.net:
@import url(https://fonts.bunny.net/css?family=inter:200,200i,500,500i;
body {
font-family: "Inter";
font-weight: 200;
}
main h1 {
font-weight: 500;
}
Use a variable WOFF2 font uploaded to directory /fonts:
@font-face {
font-family: 'Archivo';
src: url("/fonts/Archivo-VariableFont_wdth,wght.woff2") format("woff2");
}
body {
font-family: "Archivo";
font-variation-settings: "wght" 300, "wdth" 90;
}
main h1 {
font-variation-settings: "wght" 900, "wdth" 120;
}
Fade Content
Fade in your main content opacity over 1 second:
@keyframes fade-in {
from { opacity: 0; }
to { opacity: 1; }
}
main {
animation: fade-in 1s forwards;
}