Skip to content

Instantly share code, notes, and snippets.

@movahhedi
Created May 28, 2023 08:42
Show Gist options
  • Save movahhedi/8858546a50a97d38dc580fbb2843bf04 to your computer and use it in GitHub Desktop.
Save movahhedi/8858546a50a97d38dc580fbb2843bf04 to your computer and use it in GitHub Desktop.
AdmoPro's default markdown article styles based on GitHub's dark mode styles.
@use "admin-panel/config" as *;
.Markdown-Content {
margin: 0;
font-size: 1rem;
font-family: $Font-Persian, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
line-height: 1.5;
word-wrap: break-word;
// color-scheme: dark;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #1e1e1e;
&::before {
content: "";
display: table;
}
&::after {
content: "";
display: table;
clear: both;
}
h1,
h2,
h3,
h4,
h5,
h6,
p,
img,
figure,
summary,
details,
table,
code,
kbd,
pre,
samp,
blockquote,
ul,
ol,
dl,
li {
display: block;
}
ol,
ol li {
list-style-type: decimal;
}
.octicon {
display: inline-block;
vertical-align: text-bottom;
overflow: visible !important;
fill: currentcolor;
}
h1:hover .anchor .octicon-link::before,
h2:hover .anchor .octicon-link::before,
h3:hover .anchor .octicon-link::before,
h4:hover .anchor .octicon-link::before,
h5:hover .anchor .octicon-link::before,
h6:hover .anchor .octicon-link::before {
content: " ";
display: inline-block;
width: 16px;
height: 16px;
background-color: currentcolor;
-webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
}
details,
figcaption,
figure {
display: block;
}
li,
summary {
display: list-item;
}
a {
text-decoration: none;
color: #58a6ff;
background-color: transparent;
&:active,
&:hover {
outline-width: 0;
}
&:hover {
text-decoration: underline;
}
&:not([href]) {
text-decoration: none;
color: inherit;
}
}
abbr[title] {
text-decoration: underline dotted;
border-bottom: none;
}
b,
strong {
font-weight: 600;
}
dfn {
font-style: italic;
}
mark {
color: #1e1e1e;
background-color: rgba(187, 128, 9, 0.15);
}
small {
font-size: 90%;
}
sub,
sup {
position: relative;
vertical-align: baseline;
font-size: 75%;
line-height: 0;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
> a {
&::before {
content: "[";
}
&::after {
content: "]";
}
}
}
img {
max-width: 100%;
border-style: none;
box-sizing: content-box;
// background-color: #0d1117;
&[align="right"] {
padding-left: 20px;
}
&[align="left"] {
padding-right: 20px;
}
}
code,
kbd,
pre,
samp {
font-size: 1em;
font-family: monospace;
}
figure {
margin: 1em 40px;
}
hr {
height: 0.25em;
margin: 24px 0;
padding: 0;
background: transparent;
background-color: #30363d;
border: 0;
border-bottom: 1px solid #21262d;
overflow: hidden;
box-sizing: content-box;
&::before {
content: "";
display: table;
}
&::after {
content: "";
display: table;
clear: both;
}
}
input {
margin: 0;
font: inherit;
font-size: inherit;
font-family: inherit;
line-height: inherit;
overflow: visible;
&::-webkit-outer-spin-button,
&::-webkit-inner-spin-button {
margin: 0;
-webkit-appearance: none;
appearance: none;
}
}
[hidden] {
display: none !important;
}
[data-catalyst] {
display: block;
}
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
appearance: button;
}
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
padding: 0;
border-style: none;
}
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
[type="checkbox"],
[type="radio"] {
padding: 0;
box-sizing: border-box;
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
[type="search"] {
outline-offset: -2px;
-webkit-appearance: textfield;
appearance: textfield;
&::-webkit-search-cancel-button,
&::-webkit-search-decoration {
-webkit-appearance: none;
appearance: none;
}
}
::placeholder {
opacity: 1;
color: #484f58;
}
::-webkit-input-placeholder {
opacity: 0.54;
color: inherit;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
appearance: button;
}
::-webkit-calendar-picker-indicator {
filter: invert(50%);
}
details {
&:not([open]) > *:not(summary) {
display: none !important;
}
summary {
cursor: pointer;
}
}
kbd {
display: inline-block;
vertical-align: middle;
padding: 3px 5px;
font: 11px ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
line-height: 10px;
color: #1e1e1e;
background-color: #161b22;
border: solid 1px rgba(110, 118, 129, 0.4);
border-bottom-color: rgba(110, 118, 129, 0.4);
border-radius: 6px;
box-shadow: inset 0 -1px 0 rgba(110, 118, 129, 0.4);
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 24px;
margin-bottom: 16px;
font-weight: 600;
line-height: 1.25;
}
h1 {
margin: 0.67em 0;
padding-bottom: 0.3em;
font-size: 2em;
font-weight: 600;
// border-bottom: 1px solid #21262d;
}
h2 {
padding-bottom: 0.3em;
font-size: 1.5em;
font-weight: 600;
// border-bottom: 1px solid #21262d;
}
h3 {
font-size: 1.25em;
font-weight: 600;
}
h4 {
font-size: 1em;
font-weight: 600;
}
h5 {
font-size: 0.875em;
font-weight: 600;
}
h6 {
font-size: 0.85em;
font-weight: 600;
color: #8b949e;
}
p {
margin-top: 0;
margin-bottom: 10px;
}
blockquote {
margin: 0;
padding: 0 1em;
color: #8b949e;
border-inline-end: 0.25em solid #30363d;
> :first-child {
margin-top: 0;
}
> :last-child {
margin-bottom: 0;
}
}
ul,
ol {
margin-top: 0;
margin-bottom: 0;
padding-inline-start: 2em;
&.no-list {
padding: 0;
list-style-type: none;
}
}
ol {
&[type="1"] {
list-style-type: decimal;
}
&[type="a"] {
list-style-type: lower-alpha;
}
&[type="i"] {
list-style-type: lower-roman;
}
}
ol ol,
ul ol {
list-style-type: lower-roman;
}
ul ul ol,
ul ol ol,
ol ul ol,
ol ol ol {
list-style-type: lower-alpha;
}
dd {
margin-inline-end: 0;
}
.pl-c {
color: #8b949e;
}
.pl-c1,
.pl-s .pl-v {
color: #79c0ff;
}
.pl-e,
.pl-en {
color: #d2a8ff;
}
.pl-smi,
.pl-s .pl-s1 {
color: #1e1e1e;
}
.pl-ent {
color: #7ee787;
}
.pl-k {
color: #ff7b72;
}
.pl-s,
.pl-pds,
.pl-s .pl-pse .pl-s1,
.pl-sr,
.pl-sr .pl-cce,
.pl-sr .pl-sre,
.pl-sr .pl-sra {
color: #a5d6ff;
}
.pl-v,
.pl-smw {
color: #ffa657;
}
.pl-bu {
color: #f85149;
}
.pl-ii {
color: #f0f6fc;
background-color: #8e1519;
}
.pl-c2 {
color: #f0f6fc;
background-color: #b62324;
}
.pl-sr .pl-cce {
font-weight: bold;
color: #7ee787;
}
.pl-ml {
color: #f2cc60;
}
.pl-mh,
.pl-mh .pl-en,
.pl-ms {
font-weight: bold;
color: #1f6feb;
}
.pl-mi {
font-style: italic;
color: #1e1e1e;
}
.pl-mb {
font-weight: bold;
color: #1e1e1e;
}
.pl-md {
color: #ffdcd7;
background-color: #67060c;
}
.pl-mi1 {
color: #aff5b4;
background-color: #033a16;
}
.pl-mc {
color: #ffdfb6;
background-color: #5a1e02;
}
.pl-mi2 {
color: #1e1e1e;
background-color: #1158c7;
}
.pl-mdr {
font-weight: bold;
color: #d2a8ff;
}
.pl-ba {
color: #8b949e;
}
.pl-sg {
color: #484f58;
}
.pl-corl {
text-decoration: underline;
color: #a5d6ff;
}
g-emoji {
vertical-align: -0.075em;
font-size: 1em;
font-weight: 400;
font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
font-style: normal !important;
line-height: 1;
img {
width: 1em;
height: 1em;
}
}
> *:first-child {
margin-top: 0 !important;
}
> *:last-child {
margin-bottom: 0 !important;
}
.absent {
color: #f85149;
}
.anchor {
float: left;
margin-inline-end: -20px;
padding-right: 4px;
line-height: 1;
&:focus {
outline: none;
}
}
p,
blockquote,
ul,
ol,
dl,
table,
pre,
details {
margin-top: 0;
margin-bottom: 16px;
}
h1 .octicon-link,
h2 .octicon-link,
h3 .octicon-link,
h4 .octicon-link,
h5 .octicon-link,
h6 .octicon-link {
vertical-align: middle;
visibility: hidden;
color: #1e1e1e;
}
h1:hover .anchor,
h2:hover .anchor,
h3:hover .anchor,
h4:hover .anchor,
h5:hover .anchor,
h6:hover .anchor {
text-decoration: none;
.octicon-link {
visibility: visible;
}
}
h1 tt,
h1 code,
h2 tt,
h2 code,
h3 tt,
h3 code,
h4 tt,
h4 code,
h5 tt,
h5 code,
h6 tt,
h6 code {
padding: 0 0.2em;
font-size: inherit;
}
div > ol:not([type]) {
list-style-type: decimal;
}
ul ul,
ul ol,
ol ol,
ol ul {
margin-top: 0;
margin-bottom: 0;
}
li {
> p {
margin-top: 16px;
}
+ li {
margin-top: 0.25em;
}
}
dl {
padding: 0;
dt {
margin-top: 16px;
padding: 0;
font-size: 1em;
font-weight: 600;
font-style: italic;
}
dd {
margin-bottom: 16px;
padding: 0 16px;
}
}
table {
display: block;
width: max-content;
max-width: 100%;
border-collapse: collapse;
border-spacing: 0;
overflow: auto;
th {
font-weight: 600;
}
th,
td {
padding: 6px 13px;
border: 1px solid #30363d;
}
tr {
// background-color: #0d1117;
border-top: 1px solid #21262d;
// &:nth-child(2n) {
// background-color: #161b22;
// }
}
img {
background-color: transparent;
}
}
td,
th {
padding: 0;
}
.emoji {
max-width: none;
vertical-align: text-top;
background-color: transparent;
}
span {
&.frame {
display: block;
overflow: hidden;
> span {
display: block;
width: auto;
float: left;
margin: 13px 0 0;
padding: 7px;
border: 1px solid #30363d;
overflow: hidden;
}
span {
img {
display: block;
float: left;
}
span {
display: block;
padding: 5px 0 0;
color: #1e1e1e;
clear: both;
}
}
}
&.align-center {
display: block;
overflow: hidden;
clear: both;
> span {
display: block;
margin: 13px auto 0;
text-align: center;
overflow: hidden;
}
span img {
margin: 0 auto;
text-align: center;
}
}
&.align-right {
display: block;
overflow: hidden;
clear: both;
> span {
display: block;
margin: 13px 0 0;
text-align: right;
overflow: hidden;
}
span img {
margin: 0;
text-align: right;
}
}
&.float-left {
display: block;
float: left;
margin-inline-start: 13px;
overflow: hidden;
span {
margin: 13px 0 0;
}
}
&.float-right {
display: block;
float: right;
margin-inline-end: 13px;
overflow: hidden;
> span {
display: block;
margin: 13px auto 0;
text-align: right;
overflow: hidden;
}
}
}
code,
tt {
margin: 0;
padding: 0.2em 0.4em;
font-size: 85%;
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
background-color: rgba(110, 118, 129, 0.4);
border-radius: 6px;
}
code br,
tt br {
display: none;
}
del code {
text-decoration: inherit;
}
pre {
margin-top: 0;
margin-bottom: 0;
font-size: 0.75rem;
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
word-wrap: normal;
code {
font-size: 100%;
}
> code {
margin: 0;
padding: 0;
white-space: pre;
word-break: normal;
background: transparent;
border: 0;
}
}
.highlight {
margin-bottom: 16px;
pre {
margin-bottom: 0;
word-break: normal;
}
}
.highlight pre,
pre {
padding: 16px;
font-size: 85%;
line-height: 1.45;
background-color: #161b22;
border-radius: 6px;
overflow: auto;
}
pre code,
pre tt {
display: inline;
max-width: auto;
margin: 0;
padding: 0;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
overflow: visible;
}
.csv-data {
td,
th {
padding: 5px;
white-space: nowrap;
text-align: left;
font-size: 0.75rem;
line-height: 1;
overflow: hidden;
}
.blob-num {
padding: 10px 8px 9px;
text-align: right;
background: #0d1117;
border: 0;
}
tr {
border-top: 0;
}
th {
font-weight: 600;
background: #161b22;
border-top: 0;
}
}
.footnotes {
font-size: 0.75rem;
color: #8b949e;
border-top: 1px solid #30363d;
ol {
padding-left: 16px;
}
li {
position: relative;
&:target {
color: #1e1e1e;
&::before {
content: "";
position: absolute;
top: -8px;
bottom: -8px;
inset-inline-start: -8px;
inset-inline-end: -24px;
border: 2px solid #1f6feb;
border-radius: 6px;
pointer-events: none;
}
}
}
.data-footnote-backref g-emoji {
font-family: monospace;
}
}
.task-list-item {
list-style-type: none;
label {
font-weight: 400;
}
&.enabled label {
cursor: pointer;
}
+ .task-list-item {
margin-top: 3px;
}
.handle {
display: none;
}
}
.task-list-item-checkbox {
vertical-align: middle;
margin: 0 0.2em 0.25em -1.6em;
.contains-task-list:dir(rtl) & {
margin: 0 -1.6em 0.25em 0.2em;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment