From b3b9184bed836d7524320d6c051056fd0e7a4cd3 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sun, 22 Apr 2018 19:59:24 +0100 Subject: [PATCH] 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. --- bedstead-faces.css | 40 ++++++++++++++++++++++++++++++++++++++++ bedstead.css | 41 +++++------------------------------------ 2 files changed, 45 insertions(+), 36 deletions(-) create mode 100644 bedstead-faces.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"); -} -- 2.30.2