Skip to content

Commit

Permalink
Merge branch 'darkmode'
Browse files Browse the repository at this point in the history
  • Loading branch information
gskinner committed Mar 16, 2019
2 parents 4268b90 + 50c7f68 commit f7bb3e3
Show file tree
Hide file tree
Showing 31 changed files with 1,761 additions and 1,394 deletions.
1 change: 1 addition & 0 deletions assets/themes/dark.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions dev/icons/moon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dev/inject/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions dev/sass/codemirror.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

div.CodeMirror-cursor {
pointer-events: none; /* this doesn't work in IE<11 */
border-left: 1px solid $doc-black;
}
}

Expand Down
20 changes: 13 additions & 7 deletions dev/sass/colors.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// base colors:
$theme-color: #80C0F0; /* #66CCFF */
$theme-color: #70B0E0; /* #66CCFF */
$base-color: mix(#808080, $theme-color, 85);

// core colors:
Expand Down Expand Up @@ -30,18 +30,24 @@ $doc-light: mix($doc-white, $base-color, 50%);

// control colors:
$title-bg: $doc-light;
$tooltip-bg: rgba($doc-black,0.9);
$selected-stroke-color: rgba($black, 0.4);
$match-color: rgba($theme-color, 0.6);
$tooltip-bg: rgba($doc-black,0.85);
$selected-stroke-color: rgba($doc-black, 0.3);
$match-color: rgba($theme-color, 0.5);

$dark-shadow: rgba(0,0,0, 0.25);
$light-shadow: rgba(0,0,0, 0.1);
$strong-shadow: rgba(0,0,0, 0.45);

// syntax coloring:
$error-color: #C22;
$details-group-alpha: 0.5;

// notice colors:
$error-color: #D22;
$warning-color: $error-color;
$fail-color: $error-color;
$pass-color: #0A0;

$group-color: #090;
// syntax colors:
$group-color: #0A0;
$groupbg-color: #0E0;
$alt-color: $group-color;

Expand Down
60 changes: 20 additions & 40 deletions dev/sass/colors_dark.scss
Original file line number Diff line number Diff line change
@@ -1,59 +1,39 @@
@import "colors";

// base colors:
$theme-color: darken(#80C0F0, 15);
$base-color: mix(#808080, adjust-hue($theme-color, 20), 85);
$theme-color: desaturate(darken($theme-color, 18), 20);
$base-color: mix(#808080, darken($theme-color, 20), 90);

// core colors:
$black: darken($base-color, 44%);
$darkest: mix($black, $base-color, 80%);
$darker: mix($black, $base-color, 64%);
$dark: mix($black, $base-color, 35%);

$mid: $base-color;

$white: lighten($base-color, 45%);
$lightest: mix($white, $base-color, 92%);
$lighter: mix($white, $base-color, 78%);
$light: mix($white, $base-color, 50%);
// inherited

// doc colors:
$doc-black: $white;
$doc-black: $lighter;
$doc-darkest: mix($doc-black, $base-color, 90%);
$doc-darker: mix($doc-black, $base-color, 72%);
$doc-dark: mix($doc-black, $base-color, 50%);

$doc-mid: $base-color;
$doc-mid: $mid;

$doc-white: $darkest;
$doc-white: mix($black, $darkest, 30%);
$doc-lightest: mix($doc-white, $base-color, 92%);
$doc-lighter: mix($doc-white, $base-color, 78%);
$doc-light: mix($doc-white, $base-color, 50%);
$doc-lighter: mix($doc-white, $base-color, 80%);
$doc-light: mix($doc-white, $base-color, 60%);

// control colors:
$title-bg: $doc-light;
$tooltip-bg: rgba($doc-black,0.9);
$selected-stroke-color: rgba($black, 0.4);
$tooltip-bg: rgba($doc-black, 0.85);
$selected-stroke-color: rgba($doc-black, 0.4);
$match-color: rgba($theme-color, 0.6);
$dark-shadow: rgba(0,0,0, 0.35);
$light-shadow: rgba(0,0,0, 0.15);
$strong-shadow: rgba(0,0,0, 0.55);

$details-group-alpha: 0.33;

// shadows inherited

// notice colors:

// syntax coloring:
$group-color: #090;
$groupbg-color: #0E0;
$set-color: #D70;
$setbg-color: #FE0;
$error-color: #C24;
$anchor-color: #840;
$quant-color: #58F;
$alt-color: $group-color;
$esc-color: #C0C;
$special-color: $esc-color;
// inherited

// invisible char color:
// this isn't bound to the theme color, because it's used in the tab bitmap:
$invischar-color: rgba(127,127,127,0.5);

// this shares the colors with js:
#library > #colors {
.theme { color: $theme-color; }
}
// inherited
28 changes: 8 additions & 20 deletions dev/sass/colors_light.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@import "colors";

// base colors:
$theme-color: darken(#80C0F0, 8);
// inherit theme-color
$theme-color: darken($theme-color, 6);
$base-color: mix(#808080, invert($theme-color), 95);

// core colors:
Expand Down Expand Up @@ -31,29 +34,14 @@ $doc-light: mix($doc-white, $base-color, 50%);
// control colors:
$title-bg: $doc-light;
$tooltip-bg: rgba($doc-black,0.9);
$selected-stroke-color: rgba($black, 0.4);
$match-color: rgba($theme-color, 0.6);
$selected-stroke-color: rgba($doc-black, 0.4);
$match-color: rgba($theme-color, 0.45);
$dark-shadow: rgba(0,0,0, 0.25);
$light-shadow: rgba(0,0,0, 0.1);
$strong-shadow: rgba(0,0,0, 0.35);

// syntax coloring:
$group-color: #090;
$groupbg-color: #0E0;
$set-color: #D70;
$setbg-color: #FE0;
$error-color: #C24;
$anchor-color: #840;
$quant-color: #58F;
$alt-color: $group-color;
$esc-color: #C0C;
$special-color: $esc-color;
// inherited

// invisible char color:
// this isn't bound to the theme color, because it's used in the tab bitmap:
$invischar-color: rgba(127,127,127,0.5);

// this shares the colors with js:
#library > #colors {
.theme { color: $theme-color; }
}
// inherited
79 changes: 47 additions & 32 deletions dev/sass/controls.scss
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
%control {
background: rgba($doc-white, 0.25);
padding: 0.375rem 0.75rem;
font-size: 0.875rem;
border-radius: $control-radius;
}

.controlbar {
display: flex;
padding: 0;
margin: 0; // Firefox injects a 16px margin for some reason without this.

> * {
margin-left: $pad*0.25;
}
}

input, textarea {
@extend %control;

border-radius: 0;
background: rgba($white, 0.05);
background: rgba($white, $input-opacity);
border: none;
border-bottom: solid 1px rgba($white, 0.05);
border-bottom: solid 1px rgba($white, $input-opacity);
font-family: $font-family;
font-size: 1rem;
display: block;
Expand Down Expand Up @@ -77,11 +67,14 @@ svg.icon {

.control {
@extend %control;

background: rgba($white, $control-opacity);
}

.button {
.button, .buttonbar > *, .segcontrol > * {
@extend %control;

background: rgba($white, $button-opacity);
display: inline-block;
cursor: pointer;
transition: background-color $transition-t ease-out;
Expand All @@ -95,12 +88,12 @@ svg.icon {
color: $black;

&:hover {
background: $doc-white;
background: $white;
}
}

&:hover, &.selected {
background: rgba($doc-white, 0.75);
background: rgba($white, $button-hover-opacity);

> svg.icon.dropdown {
margin-top: 0.5em;
Expand All @@ -114,7 +107,9 @@ svg.icon {
}

> svg.icon {
margin-right: 0.25em;
& + * {
margin-left: 0.25em;
}
margin-top: -0.125em;

&.dropdown {
Expand All @@ -126,25 +121,44 @@ svg.icon {
}
}

.segcontrol {
@extend .controlbar;
> * {
@extend .button;
margin-left: 1px;
border-radius: 0;
display: inline-block;

&:first-child {
border-radius: $control-radius 0 0 $control-radius;
}

&:last-child {
border-radius: 0 $control-radius $control-radius 0;
}
.controlbar, .buttonbar, .segcontrol {
display: flex;
padding: 0;
margin: 0; // Firefox injects a 16px margin for some reason without this.

> * {
margin-left: $pad*0.25;
}
}

.buttonbar, .segcontrol {
> * {
margin-left: 1px;
border-radius: 0;
display: inline-block;

&:first-child {
border-radius: $control-radius 0 0 $control-radius;
}

&:last-child {
border-radius: 0 $control-radius $control-radius 0;
}
}
}

.segcontrol > * {
&:first-child {
border-radius: $control-radius 0 0 $control-radius;
}

&:last-child {
border-radius: 0 $control-radius $control-radius 0;
}
}



.tooltip {
display: flex;
flex-flow: column;
Expand All @@ -165,6 +179,7 @@ svg.icon {
max-width: 15rem;
box-shadow: 0px 3px 4px $dark-shadow;
overflow-wrap: break-word;
backdrop-filter: blur(3px);

code {
font-weight: bold;
Expand Down
4 changes: 2 additions & 2 deletions dev/sass/mobile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
> .container > .app {
display: block;
position:relative;
background: $lightest;
background: $doc-lightest;


> .doc {
Expand All @@ -31,7 +31,7 @@
width: 100%;
height: 100%;
position: fixed;
background: rgba($lighter, 0.5);
background: rgba($doc-lighter, 0.5);
z-index: 10;
}

Expand Down
2 changes: 1 addition & 1 deletion dev/sass/regexr.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "colors";
@import "colors"; // colors_dark
@import "variables";
@import "fonts";

Expand Down
Loading

0 comments on commit f7bb3e3

Please sign in to comment.