Commit graph

19 commits

Author SHA1 Message Date
1ec5084c66 Typography: Use Source Code Pro for the monospace font
Grab variable woff2 files from GitHub.

https://github.com/adobe-fonts/source-code-pro/
2024-08-02 16:10:28 -07:00
8a00cc6de9 Colors: Allow setting the color scheme explicitly
In addition to the color scheme changing based on the system setting, enable
setting the color scheme explicitly by adding a color-scheme="light | dark" attribute
on the <html> element.

Doing this was a bit tricky. I originally implemented the grayscale ramp by
reversing it when prefers-color-scheme: dark. This was convenient, but meant that
setting the color scheme explicitly didn't work.

Along the way I discovered the light-dark() CSS function. Deploy that as the preferred
style if the browser supports it. Otherwise, fall back on the prefers-color-scheme
media queries. This function only works if color-scheme: light dark is set on the
:root element.
2024-07-27 23:01:31 -07:00
c1456a6ee2 Typography: Remove explicit font-size from <p> and <pre>
Rely on <body> for font-size.
2024-07-25 13:14:04 -07:00
f705d612ed Typography: Bring back the font-size ramp 🙃 2024-07-25 13:13:41 -07:00
98fc4867e1 Typography: Remove --text-base-size variable
<html> unconditionally sets its font-size to 100%.
2024-07-25 13:13:20 -07:00
737ec20e3c Meta: Remove all the block comments at the top of CSS assets 2024-07-25 13:11:40 -07:00
cbde0f7be2 Typography: Restyle <sup> so it doesn't mess with line spacing
Give <sup> elements a line height of 1 and set vertical-align to text-top instead
of sup so it bumps up against the top of the line, rather than pushing above it.

Use a computed text size, rather than a relative percentage too.
2024-07-25 11:08:29 -07:00
fa1c957b7c Revert "Typography: Scale the font size according to screen size"
This reverts commit 1fd1eb9bfd.

I don't think it looks good on mobile.
2024-07-25 10:21:32 -07:00
1fd1eb9bfd Typography: Scale the font size according to screen size
Use viewport width units to scale the font size between 100% and 125%.
2024-07-25 09:56:26 -07:00
2e28c27f9d Don't default <header> elements to bold 2024-07-23 09:08:12 -07:00
266e2da090 Simplify the font families
Just use the system fonts. Nothing special yet.
2024-07-23 09:06:14 -07:00
4328f31ad2 Break out font family sets into separate variables based on style
Make CSS variables for sans, serif, and mono font families. Create utility classes
to apply them to an element.

Add a .text--small style to style an element like <small>.
2024-07-06 10:21:54 -07:00
975b56a6be Move anchor styles to their own stylesheet 2024-07-06 10:20:40 -07:00
b4148c3584 Typography: Fix up indentation of text size scale classes 2024-07-03 07:42:57 -07:00
4f147b6b7a Typography: Implement a hover animation for <a> elements 2024-07-03 07:42:39 -07:00
7fd398bd01 Typography: Declare Merriweather @font-faces 2024-07-03 07:42:22 -07:00
b50f4c6a92 Move styles for content elements to 099_content.css 2024-07-03 07:41:23 -07:00
45b0c117e0 Reimplement the size_scale partial as base/_size_scale.html
I accidentally deleted it. Move it here and reimplement it.
2024-06-29 10:29:49 -07:00
4bc1390b3c CSS Checkpoint
- Add the system_css template
- Name the CSS files in the css directory with a numeric prefix so they sort by
  priority.
2024-06-28 09:03:28 -07:00