Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

Commit

Permalink
refactor: less and bullet
Browse files Browse the repository at this point in the history
- use `&` instead of repeat `.markup`
- fix font smoothing
  • Loading branch information
ldez committed Apr 16, 2016
1 parent 4095463 commit 4e8b488
Showing 1 changed file with 44 additions and 36 deletions.
80 changes: 44 additions & 36 deletions styles/asciidoc.atom-text-editor.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4e8b488

Please sign in to comment.