3
0
mirror of https://git.coop/cotech/website.git synced 2025-12-20 16:17:31 +00:00
Files
cotech-website/assets/css/app.css
Chris Lowis 631c9a4fe6 Typography defaults
I've translated the two font sizes shown in Figma[1] to a responsive
scale using an online tool[2].

I've chosen a 70ch base measure as this seems to fit the designs based
on eyeballing them.

[1] https://www.figma.com/design/J0usguWJyGJSAqWSoozGos/Cotech--External-?node-id=2073-3627&t=H31i8C467gbX3TAJ-4
[2] https://websemantics.uk/tools/responsive-font-calculator/
2025-12-16 15:48:32 +00:00

246 lines
4.5 KiB
CSS

@font-face {
font-family: 'open_sansregular';
src: url("/assets/fonts/OpenSans-Regular-webfont.ttf");
}
@font-face {
font-family: 'open_sansbold';
src: url("/assets/fonts/OpenSans-Bold-webfont.ttf");
}
@font-face {
font-family: 'source_serif_regular';
src: url("/assets/fonts/SourceSerif4-Regular.ttf");
}
@font-face {
font-family: 'source_serif_bold';
src: url("/assets/fonts/SourceSerif4-Bold.ttf");
}
:root {
--measure: 70ch;
--space-unit: 1em;
--space-xxs: calc(0.25 * var(--space-unit));
--space-xs: calc(0.5 * var(--space-unit));
--space-sm: calc(0.75 * var(--space-unit));
--space-md: calc(1.25 * var(--space-unit));
--space-lg: calc(2 * var(--space-unit));
--space-xl: calc(3.25 * var(--space-unit));
--space-xxl: calc(5.25 * var(--space-unit));
--cotech-white: white;
--cotech-black: #000000;
--cotech-light-grey: #646464;
}
* {
max-inline-size: var(--measure);
}
html,
body,
div,
header,
nav,
main,
footer {
max-inline-size: none;
}
p, li, a {
font-family: "open_sansregular", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
color: var(--cotech-white);
font-weight: 400;
}
h1, h2, h3, h4, h5, h6 {
font-family: "source_serif_regular", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif;
color: var(--cotech-white);
font-weight: 400;
}
h3.title {
font-family: "open_sansregular", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
color: var(--cotech-white);
font-weight: 700;
}
@media (min-width: 48em) {
h1 {
font-size: calc(2.625rem + ((1vw - 0.48rem) * 2.8646));
line-height: calc(1.2 + ((1vw - 0.48) * -0.2083));
min-height: 0vw;
}
h2 {
font-size: calc(2rem + ((1vw - 0.48rem) * 1.7361));
line-height: calc(1.2 + ((1vw - 0.48) * -0.1389));
min-height: 0vw;
}
h3 {
font-size: calc(1.625rem + ((1vw - 0.48rem) * 1.2153));
line-height: calc(1.2 + ((1vw - 0.48) * -0.1389));
min-height: 0vw;
}
h3.title {
font-size: calc(1.25rem + ((1vw - 0.48rem) * 0.3472));
min-height: 0vw;
}
p.large {
font-size: calc(1.375rem + ((1vw - 0.48rem) * 0.6944));
min-height: 0vw;
line-height: 1.4;
}
p.intro {
font-size: calc(1.125rem + ((1vw - 0.48rem) * 0.1736));
min-height: 0vw;
line-height: 1.4;
}
p, li, a {
font-size: calc(0.875rem + ((1vw - 0.48rem) * 0.1736));
min-height: 0vw;
line-height: 1.4;
}
}
@media (min-width: 120em) {
h1 {
font-size: 4.6875rem;
line-height: 1.05;
}
h2 {
font-size: 3.25rem;
line-height: 1.1;
}
h3 {
font-size: 2.5rem;
line-height: 1.1;
}
h3.title {
font-size: 1.5rem;
}
p.large {
font-size: 1.875rem;
line-height: 1.4;
}
p.intro {
font-size: 1.25rem;
line-height: 1.4;
}
p, li, a {
font-size: 1rem;
line-height: 1.4;
}
}
body {
background-color: var(--cotech-black);
}
img.greyscale {
filter: grayscale(100);
}
.header {
display: flex;
padding: var(--space-lg) var(--space-md);
align-items: center;
justify-content: space-between;
}
.header a {
text-decoration: none;
}
.header a:hover {
text-decoration: underline;
}
.header_logo-link {
display: flex;
align-items: center;
gap: var(--space-sm);
}
.header_menu-list {
font-family: 'open_sansbold';
list-style-type: none;
display: flex;
gap: var(--space-md);
font-size: 1rem;
letter-spacing: 0.05em;
}
.header_menu-list a {
font-family: 'open_sansbold';
}
.header_burger-btn {
display: none;
background: none;
border: none;
cursor: pointer;
padding: var(--space-xs);
color: var(--cotech-white);
}
.header_close-icon {
display: none;
}
@media screen and (width < 480px) {
.header {
position: relative;
}
.header_burger-btn {
display: block;
}
.header_menu-list {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: var(--cotech-black);
flex-direction: column;
justify-content: center;
align-items: center;
gap: var(--space-lg);
font-size: 1.5rem;
z-index: 1000;
transform: translateX(-100%);
}
.header_menu-list.active {
transform: translateX(0);
}
.header_burger-btn.active .header_burger-icon {
display: none;
}
.header_burger-btn.active .header_close-icon {
display: block;
}
.header_burger-btn {
position: relative;
z-index: 1001;
}
}