-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It's a bit icky to have to do this, and it could always be moved to the specific location it's needed (notes etc) ... but put it in `_root.less` for now. - Move @font-face outside `:root` - Create a `partials/_root.less` file This is the same setup as print-first-css now. Copy everything from `:root` to use `body` to override Anki defaults. Closes #117
- Loading branch information
1 parent
7e66789
commit 308e022
Showing
4 changed files
with
47 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Notes ================================================================== | ||
// #1: Anki (app) sets default `body` styles and `:root` doesn't override this. | ||
// Might have to override all the styles in print-first-css `:root`? | ||
// @ https://github.com/badlydrawnrob/anki/issues/117 | ||
// | ||
// #2: @font-face should live outside of `:root` I found out. See issue #12 | ||
// | ||
// - Add your custom `--font-variable` and `@font-face` | ||
// - https://www.hacksoft.io/blog/using-multiple-font-files-the-right-way | ||
|
||
// #1 !# | ||
body { | ||
color: var(--font-color); | ||
font-family: var(--font-family); | ||
font-size: var(--font-size); | ||
line-height: var(--line-height); | ||
background: transparent; | ||
} | ||
|
||
// #2 | ||
@font-face { | ||
font-family: "DejaVu Sans"; | ||
src: url("_DejaVuSans.ttf"); | ||
font-style: normal; | ||
font-weight: 400; | ||
} | ||
|
||
@font-face { | ||
font-family: "DejaVu Sans Mono"; | ||
src: url("_DejaVuSansMono.ttf"); | ||
font-style: normal; | ||
font-weight: 400; | ||
} |