Skip to content

Commit

Permalink
fix(code): Fix Display Issues with Untitled Notes
Browse files Browse the repository at this point in the history
  • Loading branch information
obenjiro authored and 3y3 committed Nov 8, 2024
1 parent a053f4c commit d8ad8a5
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions src/scss/_note.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,29 @@
padding: 20px 20px 20px 64px;
border-radius: 10px;

// First paragraph should show the icon regardless of title presence
> p:first-child {
&::before {
box-sizing: content-box;
display: block;
width: 24px;
height: 24px;
margin-top: -2px;
margin-left: -44px;
padding-right: 20px;
float: left;
}
}

.yfm-note-title {
font-weight: 700;
margin: 0 0 10px;
}

.yfm-note-content > p:first-child {
margin-top: 0;
}
& > * {
margin: 0 0 10px;

&:first-child {
&::before {
box-sizing: content-box;
display: block;
width: 24px;
height: 24px;
margin-top: -2px;
margin-left: -44px;
padding-right: 20px;
float: left;
}
}

.yfm-note-content > p:last-child {
margin-bottom: 0;
&:last-child {
margin-bottom: 0;
}
}

// @todo replace with variables
Expand All @@ -41,7 +39,7 @@
);

@each $type, $color in $colors {
&.#{$type} > p:first-child::before {
&.#{$type} > :first-child::before {
$r: red($color);
$g: green($color);
$b: blue($color);
Expand Down

0 comments on commit d8ad8a5

Please sign in to comment.