You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
As in the topic, currently I use it with the Hover option my code in Anki Styling looks like this. What should I change to have "Image expansion to screen width on click"
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
As in the topic, currently I use it with the Hover option my code in Anki Styling looks like this. What should I change to have "Image expansion to screen width on click"
/* Prettify by @pranavdeshai: Dracula
Version: 0.1.1
Readme: https://github.com/pranavdeshai/anki-prettify
Links:
/* -------------------------------------------------- PREFERENCES */
:root {
--card-max-width: 80em;
--card-text-align: center;
--font-size-regular: 32px;
--font-size-small: 28px;
--font-family: "Dubai Light", -apple-system, sytem-ui, BlinkMacSystemFont,
Segoe UI, Roboto, Helvetica, Arial, sans-serif;
--img-width: 25%;
--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;
}
/* -------------------------------------------------- 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;
max-height: 90% !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 */
Beta Was this translation helpful? Give feedback.
All reactions