-
-
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
1cf5d53
commit 83c2ed6
Showing
3 changed files
with
1,092 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,353 @@ | ||
//Dracula color palette | ||
$background: #282a36; | ||
$currentline: #44475a; | ||
$foreground: #f8f8f2; | ||
$comment: #6272a4; | ||
$cyan: #8be9fd; | ||
$green: #50fa7b; | ||
$orange: #ffb86c; | ||
$pink: #ff79c6; | ||
$purple: #bd93f9; | ||
$red: #ff5555; | ||
$yellow: #f1fa8c; | ||
|
||
/* 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: #{darken($background, 5)}; | ||
--text-fg: #{$foreground}; | ||
--text-fg-faint: #{$comment}; | ||
--text-bg-selected: #323543; | ||
--card-bg: #{$background}; | ||
--card-border: #{$currentline}; | ||
--card-box-shadow: transparent; | ||
--divider: #{$comment}; | ||
--tag-fg: #{$background}; | ||
--tag-bg: #{$purple}; | ||
--tag-fg-active: #{$comment}; | ||
--tag-bg-active: #{$purple}; | ||
--tag-border: transparent; | ||
--tag-border-active: #{$purple}; | ||
--cloze-fg: #{$cyan}; | ||
--cloze-bg: transparent; | ||
--link-fg: #{$foreground}; | ||
--link-bg: transparent; | ||
--link-fg-active: #{$cyan}; | ||
--link-bg-active: transparent; | ||
--bold-fg: #{$pink}; | ||
--italic-fg: #{$yellow}; | ||
--bold-italic-fg: #{$red}; | ||
--underline-fg: #{$green}; | ||
} | ||
|
||
/* -------------------------------------------------- BACKGROUND */ | ||
.card { | ||
cursor: default; | ||
padding: 0.5em 0; | ||
|
||
html:not(.mobile) & { | ||
padding: 0.5em; | ||
} | ||
|
||
&::-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; | ||
|
||
::selection { | ||
background-color: var(--text-bg-selected); | ||
} | ||
} | ||
|
||
/* -------------------------------------------------- FIELDS */ | ||
.prettify-field { | ||
margin: 2em; | ||
|
||
.mobile & { | ||
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 & { | ||
margin: 1em; | ||
} | ||
} | ||
|
||
.prettify-subdeck { | ||
text-decoration: underline; | ||
} | ||
|
||
/* -------------------------------------------------- TAGS */ | ||
.prettify-tags { | ||
margin: 2em; | ||
display: flex; | ||
font-size: var(--font-size-small); | ||
|
||
.mobile & { | ||
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; | ||
|
||
&: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 & { | ||
filter: var(--img-filter); | ||
opacity: var(--img-brightness); | ||
} | ||
|
||
&:hover { | ||
cursor: zoom-in; | ||
filter: none; | ||
max-width: 100% !important; | ||
opacity: 1; | ||
} | ||
|
||
& + br { | ||
display: none; | ||
} | ||
|
||
html:not(.mobile) &: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%; | ||
|
||
thead { | ||
background-color: var(--text-bg-selected); | ||
} | ||
|
||
tr { | ||
&:nth-of-type(even) { | ||
background-color: var(--text-bg-selected); | ||
} | ||
|
||
&:first-child { | ||
th { | ||
&:first-child { | ||
border-top-left-radius: 0.5em; | ||
} | ||
&:last-child { | ||
border-top-right-radius: 0.5em; | ||
} | ||
} | ||
} | ||
|
||
&:last-child { | ||
td { | ||
&:first-child { | ||
border-bottom-left-radius: 0.5em; | ||
} | ||
&:last-child { | ||
border-bottom-right-radius: 0.5em; | ||
} | ||
} | ||
} | ||
} | ||
|
||
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; | ||
|
||
&:last-child { | ||
border-right: solid 1px var(--card-border); | ||
} | ||
} | ||
td { | ||
border-bottom: solid 1px var(--card-border); | ||
border-left: solid 1px var(--card-border); | ||
padding: 0.5em; | ||
|
||
&:last-of-type { | ||
border-right: solid 1px var(--card-border); | ||
} | ||
} | ||
} | ||
|
||
/* -------------------------------------------------- HYPERLINKS */ | ||
a { | ||
&, | ||
&:visited { | ||
text-decoration: none; | ||
color: var(--link-fg-active); | ||
border-radius: 0.25em; | ||
padding: 0 0.1em; | ||
transition: all 0.1s; | ||
} | ||
|
||
&:hover, | ||
&: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.