1
0
forked from HPR/hpr_generator
Files
hpr_generator/public_html/css/hpr.css
Roan Horning 829bdb7708 Initial accessibility tweaks based on ARC Tookit
Ran the ARC Tookit Firefox extension which pointed out
accessiblity issues with color contrasts, link display, and
skip to main link.  Some of the link colors don't look great
when they reach the recommended contrast level.
2025-07-17 16:58:29 -04:00

269 lines
4.5 KiB
CSS

@charset "utf-8";
/* Website design Copyright Ken Fallon - Released into the public domain/
https://creativecommons.org/publicdomain/
*/
/*
* See the following for the modern CSS responsive design techniques used in this file:
* - MDN web docs: Responsive design
* -- https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Responsive_Design
* - Matthew James Tayler: Responsive Font Size (Optimal Text at Every Breakpoint)
* -- https://matthewjamestaylor.com/responsive-font-size
* - CSS-Tricks: Linearly Scale font-size with CSS clamp() Based on the Viewport
* -- https://css-tricks.com/linearly-scale-font-size-with-css-clamp-based-on-the-viewport/
*/
@font-face {
font-family: "GNUTypewriter";
src:
local("GNUTypewriter"),
url("/css/gnutypewriter/gtw.woff") format("woff");
}
:root {
--background-primary: #dfdfdf;
--text-primary: #4d4d4d; /* HPR Grey */
--banner-text-primary: #000000;
--background-secondary: #4d4d4d;
--text-secondary: #dfdfdf;
--link-primary: #004852 /*#154a60*/;
--link-primary-hover: #f8961e;
--link-secondary: #a8f8ff;
--link-secondary-hover: #f9e9c2;
--font-family-hpr: Verdana, Arial, Helvetica, sans-serif; /* 1em/1.5 OpenDyslexic, */;
/* screen breakpoints */
--for-phone-only: 599px;
--for-tablet-portrait-up: 600px;
--for-tablet-landscape-up: 900px;
--for-desktop-up: 1200px;
--for-big-desktop-up: 1800px;
}
html {
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
}
body {
display: flex;
flex-direction: column;
justify-content: flex-start;
background-color: var(--background-primary);
color: var(--text-primary);
font-size: 1rem; /* fallback for browsers that don't support the clamp function) */
font-size: clamp(1rem, 15px + 0.3vw, 1.07rem);
font-family: var(--font-family-hpr);
margin: 0;
padding: 0;
}
body > nav {
background-color: var(--background-secondary);
color: var(--text-secondary);
}
body > nav a {
color: var(--link-secondary);
}
body > nav a:hover {
color: var(--link-secondary-hover);
}
body > nav ul {
background-color: inherit;
color: inherit;
margin: 0;
padding: 0.25rem;
}
body > nav ul li {
display: inline-block;
background-color: inherit;
color: inherit;
line-height: 1.5;
margin: 0;
padding: 0;
padding-right: clamp(0.5rem, -0.25rem + 3vw, 2.5rem);
}
body > header {
display: flex;
flex-direction: row;
flex-flow: wrap;
justify-content: space-between;
padding: 0.25rem;
background-image: url("/images/main-header-background.png");
color: var(--banner-text-primary);
}
body > header > * {
margin: 0;
padding: 0;
flex: 1 1 auto;
}
body > main {
padding: 0.25rem;
}
body > footer {
background-color: var(--background-secondary);
color: var(--text-secondary);
padding: 0.25rem;
text-align: center
}
body > footer hr:first-child {
display: none;
margin: 0;
padding: 0;
}
body > footer a {
color: var(--link-secondary);
}
body > footer a:hover {
color: var(--link-secondary-hover);
}
div,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
li,
dl,
dt,
dd,
img,
form,
fieldset,
input,
textarea,
blockquote {
font-family: inherit;
color: inherit;
background: inherit;
}
h1 {
font-size: 1.5rem;
margin: 1.25rem 0 0.75rem 0;
}
h2,
article * h1,
section > header:first-child {
font-size: 1.45rem;
margin: 1.25rem 0 0.75rem 0;
}
h3,
article * h2 {
font-size: 1.25rem;
margin: 1.25rem 0 0.75rem 0;
}
h4,
article * h3 {
font-size: 1.15rem;
margin: 1.25rem 0 0.75rem 0;
}
img {
max-width: 100%;
height: auto;
}
ul {
padding-left: 1.15rem;
}
li {
line-height: 1.25;
}
a {
text-decoration: none;
color: var(--link-primary);
}
a:hover {
cursor: pointer;
color: var(--link-primary-hover);
}
hr {
background: #4D4D4D;
border: 0;
height: 0.25em;
}
audio {
padding: .7em 0em .5em 0em;
clear: both;
position: relative;
z-index: auto;
}
.audcredit {
font-size: 75%;
margin-bottom: 1em;
}
p.meta {
line-height: 1.25;
}
p.meta span label {
font-weight: bold;
}
.lane {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
a.lane-button {
display: flex;
flex-direction: column;
justify-content: center;
margin: 0.5rem;
padding: 0.5rem;
border-width: 5px;
border-color: var(--link-primary);
border-style: solid;
border-radius: 5px;
}
#tag_line,
#title {
text-transform: uppercase;
}
#tag_line *,
#title * {
margin: 0;
padding: 0;
}
#title h1 {
font-size: 7.5rem;
letter-spacing: -0.65rem;
line-height: 0.75;
}
#tag_line h3 {
text-transform: capitalize;
}
#site_url {
font-family: "GNUTypewriter", monospace;
text-transform: none;
}
@media (min-width: 900px) {
#qr_code {
text-align: center;
}
#qr_code > img {
max-height: 195px;
}
}