-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
83c2ed6
commit 6bfb3ee
Showing
3 changed files
with
937 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,298 @@ | ||
/* Prettify by @pranavdeshai: Dracula | ||
Version: 0.1.0 | ||
Readme: https://github.com/pranavdeshai/anki-prettify | ||
Links: | ||
- Reddit: https://www.reddit.com/user/Various_Breadfruit48 | ||
- GitHub: https://github.com/pranavdeshai | ||
- Buy Me a Coffee: https://www.buymeacoffee.com/pranavdeshai | ||
- Ko-fi: https://ko-fi.com/pranavdeshai | ||
/* -------------------------------------------------- PREFERENCES */ | ||
:root { | ||
--card-max-width: 40em; | ||
--card-text-align: left; | ||
--font-size-regular: 16px; | ||
--font-size-small: 14px; | ||
--font-family: "Source Sans Pro", -apple-system, sytem-ui, BlinkMacSystemFont, | ||
Segoe UI, Roboto, Helvetica, Arial, sans-serif; | ||
--img-width: 50%; | ||
--img-brightness: 1; | ||
--img-filter: none; | ||
} | ||
|
||
/* -------------------------------------------------- COLORS */ | ||
.card, | ||
.card.night_mode { | ||
/* Dark theme only */ | ||
background-color: #1d1f27; | ||
--text-fg: #f8f8f2; | ||
--text-fg-faint: #6272a4; | ||
--text-bg-selected: #323543; | ||
--card-bg: #282a36; | ||
--card-border: #44475a; | ||
--card-box-shadow: transparent; | ||
--divider: #6272a4; | ||
--tag-fg: #282a36; | ||
--tag-bg: #bd93f9; | ||
--tag-fg-active: #6272a4; | ||
--tag-bg-active: #bd93f9; | ||
--tag-border: transparent; | ||
--tag-border-active: #bd93f9; | ||
--cloze-fg: #8be9fd; | ||
--cloze-bg: transparent; | ||
--link-fg: #f8f8f2; | ||
--link-bg: transparent; | ||
--link-fg-active: #8be9fd; | ||
--link-bg-active: transparent; | ||
--bold-fg: #ff79c6; | ||
--italic-fg: #f1fa8c; | ||
--bold-italic-fg: #ff5555; | ||
--underline-fg: #50fa7b; | ||
} | ||
|
||
/* -------------------------------------------------- BACKGROUND */ | ||
.card { | ||
cursor: default; | ||
padding: 0.5em 0; | ||
} | ||
html:not(.mobile) .card { | ||
padding: 0.5em; | ||
} | ||
.card::-webkit-scrollbar { | ||
display: none; | ||
} | ||
|
||
/* -------------------------------------------------- FLASHCARD */ | ||
.prettify-flashcard { | ||
background-color: var(--card-bg); | ||
border-radius: 0.5em; | ||
border: 1px solid var(--card-border); | ||
box-shadow: var(--card-box-shadow) 0px 4px 6px; | ||
color: var(--text-fg); | ||
font-family: var(--font-family); | ||
font-size: var(--font-size-regular); | ||
line-height: 1.5; | ||
margin: 0 auto; | ||
max-width: var(--card-max-width); | ||
text-align: var(--card-text-align); | ||
word-wrap: break-word; | ||
} | ||
.prettify-flashcard ::selection { | ||
background-color: var(--text-bg-selected); | ||
} | ||
|
||
/* -------------------------------------------------- FIELDS */ | ||
.prettify-field { | ||
margin: 2em; | ||
} | ||
.mobile .prettify-field { | ||
margin: 1em; | ||
} | ||
|
||
.prettify-field--back { | ||
color: var(--text-fg); | ||
font-size: var(--font-size-small); | ||
} | ||
|
||
/* -------------------------------------------------- CLOZE */ | ||
.cloze { | ||
background-color: var(--cloze-bg); | ||
color: var(--cloze-fg); | ||
} | ||
|
||
/* -------------------------------------------------- DECK */ | ||
.prettify-deck { | ||
margin: 2em; | ||
display: flex; | ||
color: var(--text-fg-faint); | ||
font-size: var(--font-size-small); | ||
} | ||
.mobile .prettify-deck { | ||
margin: 1em; | ||
} | ||
|
||
.prettify-subdeck { | ||
text-decoration: underline; | ||
} | ||
|
||
/* -------------------------------------------------- TAGS */ | ||
.prettify-tags { | ||
margin: 2em; | ||
display: flex; | ||
font-size: var(--font-size-small); | ||
} | ||
.mobile .prettify-tags { | ||
margin: 1em; | ||
} | ||
|
||
.prettify-tag { | ||
all: initial; | ||
background-color: var(--tag-bg); | ||
border-radius: 0.25em; | ||
border: 1px solid var(--tag-border); | ||
color: var(--tag-fg); | ||
display: inline; | ||
font-size: var(--font-size-small); | ||
font-family: var(--font-family); | ||
margin-right: 0.5em; | ||
padding: 0.25em; | ||
transition: all 0.25s; | ||
} | ||
.prettify-tag:hover { | ||
background-color: var(--tag-bg-active); | ||
border: 1px solid var(--tag-border-active); | ||
color: var(--tag-fg-active); | ||
cursor: pointer; | ||
} | ||
|
||
/* -------------------------------------------------- DIVIDER */ | ||
.prettify-divider { | ||
background-color: transparent; | ||
border: none; | ||
border-bottom: 1px dashed var(--divider); | ||
margin: 1em; | ||
padding: 0; | ||
} | ||
|
||
.prettify-divider--answer { | ||
border-bottom: 1px solid var(--divider); | ||
} | ||
|
||
/* -------------------------------------------------- IMAGES */ | ||
img { | ||
border-radius: 0.25em; | ||
display: block; | ||
margin: 1em auto; | ||
max-width: var(--img-width) !important; | ||
transition: max-width 0.25s 0.1s, opacity 0.25s 0.1s, filter 0.1s, transform 0s; | ||
} | ||
.night_mode img { | ||
filter: var(--img-filter); | ||
opacity: var(--img-brightness); | ||
} | ||
img:hover { | ||
cursor: zoom-in; | ||
filter: none; | ||
max-width: 100% !important; | ||
opacity: 1; | ||
} | ||
img + br { | ||
display: none; | ||
} | ||
html:not(.mobile) img:active { | ||
border: 1px solid var(--link-fg-active); | ||
cursor: zoom-out; | ||
filter: none; | ||
left: 0; | ||
max-width: 95% !important; | ||
opacity: 1; | ||
position: fixed; | ||
top: 0; | ||
transform: translate(calc(50vw - 50%), calc(50vh - 50%)); | ||
z-index: 100; | ||
} | ||
|
||
/* -------------------------------------------------- TABLES */ | ||
table { | ||
border-collapse: separate; | ||
border-spacing: 0; | ||
margin: 0 auto; | ||
max-width: 100%; | ||
} | ||
table thead { | ||
background-color: var(--text-bg-selected); | ||
} | ||
table tr:nth-of-type(even) { | ||
background-color: var(--text-bg-selected); | ||
} | ||
table tr:first-child th:first-child { | ||
border-top-left-radius: 0.5em; | ||
} | ||
table tr:first-child th:last-child { | ||
border-top-right-radius: 0.5em; | ||
} | ||
table tr:last-child td:first-child { | ||
border-bottom-left-radius: 0.5em; | ||
} | ||
table tr:last-child td:last-child { | ||
border-bottom-right-radius: 0.5em; | ||
} | ||
table th { | ||
border-bottom: solid 1px var(--card-border); | ||
border-left: solid 1px var(--card-border); | ||
border-top: solid 1px var(--card-border); | ||
padding: 0.5em; | ||
} | ||
table th:last-child { | ||
border-right: solid 1px var(--card-border); | ||
} | ||
table td { | ||
border-bottom: solid 1px var(--card-border); | ||
border-left: solid 1px var(--card-border); | ||
padding: 0.5em; | ||
} | ||
table td:last-of-type { | ||
border-right: solid 1px var(--card-border); | ||
} | ||
|
||
/* -------------------------------------------------- HYPERLINKS */ | ||
a, a:visited { | ||
text-decoration: none; | ||
color: var(--link-fg-active); | ||
border-radius: 0.25em; | ||
padding: 0 0.1em; | ||
transition: all 0.1s; | ||
} | ||
a:hover, a:active { | ||
text-decoration: underline; | ||
color: var(--link-fg-active); | ||
background-color: var(--link-bg-active); | ||
} | ||
|
||
/* -------------------------------------------------- FORMATTING */ | ||
b, | ||
strong { | ||
color: var(--bold-fg); | ||
} | ||
|
||
i, | ||
em { | ||
color: var(--italic-fg); | ||
} | ||
|
||
b > i, | ||
i > b { | ||
color: var(--bold-italic-fg); | ||
} | ||
|
||
u { | ||
color: var(--underline-fg); | ||
} | ||
|
||
/* -------------------------------------------------- CUSTOM FONTS */ | ||
@font-face { | ||
font-family: Source Sans Pro; | ||
src: local("SourceSansPro-Regular"), url("_SourceSansPro-Regular.woff2") format("woff2"); | ||
font-style: normal; | ||
font-weight: normal; | ||
} | ||
@font-face { | ||
font-family: Source Sans Pro; | ||
src: local("SourceSansPro-Bold"), url("_SourceSansPro-Bold.woff2") format("wofff2"); | ||
font-style: normal; | ||
font-weight: bold; | ||
} | ||
@font-face { | ||
font-family: Source Sans Pro; | ||
src: local("SourceSansPro-Italic"), url("_SourceSansPro-Italic.woff2") format("wofff2"); | ||
font-style: italic; | ||
font-weight: normal; | ||
} | ||
@font-face { | ||
font-family: Source Sans Pro; | ||
src: local("SourceSansPro-BoldItalic"), url("_SourceSansPro-BoldItalic.woff2") format("wofff2"); | ||
font-style: italic; | ||
font-weight: bold; | ||
} | ||
/* -------------------------------------------------- END OF THEME */ |
Oops, something went wrong.