diff --git a/src/scss/_note.scss b/src/scss/_note.scss index da5dcb02..6931db09 100644 --- a/src/scss/_note.scss +++ b/src/scss/_note.scss @@ -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 @@ -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);