Skip to content

Commit

Permalink
feat: ✨ add markup styling for rendered markdown content
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-labs committed Jan 25, 2025
1 parent 1ac2103 commit ab5fc4a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
35 changes: 35 additions & 0 deletions src/themes/scss/theme/components/_markup.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@use '@lucas-labs/lui-micro/color' as color;
@use '@lucas-labs/lui-micro/var' as var;

@mixin markup {
.markup {
.task-list-item input[type=checkbox] {
margin: 0 .5em .25em -1.4em;
}

input[type=checkbox] {
--border-radius: #{var.get('measure/.25x')};
width: var.get('measure/1x');
height: var.get('measure/1x');
margin-right: 4px;
--color-input-background: #{color.get('elevation/5')};

&:checked {
background-color: var(--color-primary);
}

&:after {
--color-text: var(--color-primary-contrast);
}

&:not([disabled]):hover, &:not([disabled]):active {
border-color: var(--color-secondary);
background-color: color.get('elevation/6');

&:checked {
background-color: var(--color-primary-hover);
}
}
}
}
}
3 changes: 2 additions & 1 deletion src/themes/scss/theme/components/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
@forward './file-content';
@forward './avatar';
@forward './button';
@forward './boxes';
@forward './boxes';
@forward './markup';
1 change: 1 addition & 0 deletions src/themes/scss/theme/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
@include components.gitea-button; // github-style buttons
@include components.segment;
@include components.comments; // github-style comment boxes
@include components.markup; // styling rendered for markdown content

// code highlighting
@include modules.chroma($is-dark); // syntax highlighting
Expand Down

0 comments on commit ab5fc4a

Please sign in to comment.