From 4e8b4884a26c4de0cb5cb0b85e791701e48bdce8 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Sat, 29 Aug 2015 17:14:40 +0200 Subject: [PATCH] refactor: less and bullet - use `&` instead of repeat `.markup` - fix font smoothing --- styles/asciidoc.atom-text-editor.less | 80 +++++++++++++++------------ 1 file changed, 44 insertions(+), 36 deletions(-) diff --git a/styles/asciidoc.atom-text-editor.less b/styles/asciidoc.atom-text-editor.less index 6c31d1b..f109903 100644 --- a/styles/asciidoc.atom-text-editor.less +++ b/styles/asciidoc.atom-text-editor.less @@ -5,55 +5,63 @@ atom-text-editor, :host { .asciidoc { - .markup.bold { - font-weight: bold; - } + .markup{ - .markup.italic { - font-style: italic; - } + &.bold { + font-weight: bold; + } - .markup.url { - color: mix(red, @syntax-text-color, 20%); - } + &.italic { + font-style: italic; + } - .markup.htmlentity { - font-style: italic; - color: mix(red, @syntax-text-color, 20%); - } + &.url { + color: mix(red, @syntax-text-color, 20%); + } - .markup.biblioref, - .markup.blockid { - font-weight: bold; - color: mix(green, @syntax-text-color, 20%); - } + &.htmlentity { + font-style: italic; + color: mix(red, @syntax-text-color, 20%); + } - .markup.reference { - font-style: italic; - color: mix(green, @syntax-text-color, 20%); - } + &.biblioref, + &.blockid { + font-weight: bold; + color: mix(green, @syntax-text-color, 20%); + } - .markup.admonition, - .markup.explicit, - .markup.heading, - .markup.section { - font-weight: bold; + &.reference { + font-style: italic; + color: mix(green, @syntax-text-color, 20%); + } - // Lighten headers for dark themes. - & when (lightness(@syntax-background-color) < 50%){ - color: lighten(@syntax-text-color, 20%); + &.admonition, + &.explicit, + &.heading, + &.section { + font-weight: bold; + + // Lighten headers for dark themes. + & when (lightness(@syntax-background-color) < 50%){ + color: lighten(@syntax-text-color, 20%); + } + + // Darken headers for light themes. + & when (lightness(@syntax-background-color) > 50%){ + color: darken(@syntax-text-color, 20%); + } } - // Darken headers for light themes. - & when (lightness(@syntax-background-color) > 50%){ - color: darken(@syntax-text-color, 20%); + &.heading.blocktitle, + &.substitution { + color: @syntax-text-color-unobtrusive; + } + &.list.bullet { + color: mix(red, @syntax-text-color, 40%); } } .block, - .markup.heading.blocktitle, - .markup.list.bullet, - .markup.substitution, .table.spec { color: @syntax-text-color-unobtrusive; }