From: Ben Harris Date: Sun, 22 Apr 2018 18:59:24 +0000 (+0100) Subject: Extract @font-face rules into their own CSS file. X-Git-Tag: bedstead-002.000~6 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=b3b9184bed836d7524320d6c051056fd0e7a4cd3;p=bedstead-debian.git Extract @font-face rules into their own CSS file. This seems sensible, since the @font-face rules should be grneric to all uses of Bedstead in CSS. --- diff --git a/bedstead-faces.css b/bedstead-faces.css new file mode 100644 index 0000000..f73170f --- /dev/null +++ b/bedstead-faces.css @@ -0,0 +1,40 @@ +/* + * This file defines @font-face rules to make the various standard + * Bedstead fonts available in CSS. + */ + +@font-face { + font-family: Bedstead; + font-stretch: expanded; + src: url(bedstead-extended.otf) format("opentype"); +} + +@font-face { + font-family: Bedstead; + font-stretch: normal; + src: url(bedstead.otf) format("opentype"); +} + +@font-face { + font-family: Bedstead; + font-stretch: semi-condensed; + src: url(bedstead-semicondensed.otf) format("opentype"); +} + +@font-face { + font-family: Bedstead; + font-stretch: condensed; + src: url(bedstead-condensed.otf) format("opentype"); +} + +@font-face { + font-family: Bedstead; + font-stretch: extra-condensed; + src: url(bedstead-extracondensed.otf) format("opentype"); +} + +@font-face { + font-family: Bedstead; + font-stretch: ultra-condensed; + src: url(bedstead-ultracondensed.otf) format("opentype"); +} diff --git a/bedstead.css b/bedstead.css index 194fe53..6f46de2 100644 --- a/bedstead.css +++ b/bedstead.css @@ -1,3 +1,8 @@ +/* This is the stylesheet for the Bedstead Web pages. */ + +/* Make Bedstead usable through font-* properties. */ +@import url(bedstead-faces.css); + /* Use Bedstead with proportional spacing for everything. */ body { font-family: Bedstead; @@ -28,39 +33,3 @@ h1, h2 { ul { list-style-type: "\2022 "; } - -@font-face { - font-family: Bedstead; - font-stretch: expanded; - src: url(bedstead-extended.otf) format("opentype"); -} - -@font-face { - font-family: Bedstead; - font-stretch: normal; - src: url(bedstead.otf) format("opentype"); -} - -@font-face { - font-family: Bedstead; - font-stretch: semi-condensed; - src: url(bedstead-semicondensed.otf) format("opentype"); -} - -@font-face { - font-family: Bedstead; - font-stretch: condensed; - src: url(bedstead-condensed.otf) format("opentype"); -} - -@font-face { - font-family: Bedstead; - font-stretch: extra-condensed; - src: url(bedstead-extracondensed.otf) format("opentype"); -} - -@font-face { - font-family: Bedstead; - font-stretch: ultra-condensed; - src: url(bedstead-ultracondensed.otf) format("opentype"); -}