History

Switch from SASS variables to CSS variables

* Switch from SASS variables to CSS variables for most styling These are the simple cases, and the more complex ones will be covered by future commits. I’ve also replaced $fooZ Β± 1 with the appropriate variable to avoid a runtime `calc()`. * Eliminate the `$style` variable πŸ”₯ I’ve added a `--absolute` variable that’s `white` in dark mode and `black` in regular mode. * Remove `$inputFocusBorder` πŸ”₯ * Switch the Prism styles to CSS variables * Convert `$mediumScreen` to a mixin * πŸ”₯ `$selectionText` * Eliminate the final uses of SCSS variables I’ve dropped the 95% opacity on the background of the method source code overlay in RDoc since the difference isn’t noticeable but it makes implementation a lot easier. * Misc fixes * Extract the common variables from the two themes to a new file * Remove illegal usages of CSS variables in SCSS functions This flattens out the buttons on the settings page which makes the styles simpler (and more modern-looking IMO) and removes the box-shadow on the button, which was completely invisible to me. * Fix usages of SCSS functions in CSS variables * Use `html._theme-*` selectors * Eliminate `application-dark.css`; switch themes by toggling classes This also means that the Application Cache doesn’t have to get updated when toggling themes, and a new CSS file that’s nearly the same doesn’t need to be downloaded.

Jed Fox committed 8 years ago

Commit a30fcf91 parent 2ad466253 files Β· +434 βˆ’582Browse files

Unified Β· Split

53 files
  1. assets/javascripts/views/content/settings_page.coffee +3 βˆ’5
  2. assets/stylesheets/application-dark.css.scss +0 βˆ’108
  3. assets/stylesheets/application.css.scss +3 βˆ’1
  4. assets/stylesheets/components/_app.scss +5 βˆ’5
  5. assets/stylesheets/components/_content.scss +27 βˆ’32
  6. assets/stylesheets/components/_fail.scss +1 βˆ’1
  7. assets/stylesheets/components/_header.scss +25 βˆ’35
  8. assets/stylesheets/components/_mobile.scss +2 βˆ’2
  9. assets/stylesheets/components/_notice.scss +5 βˆ’5
  10. assets/stylesheets/components/_notif.scss +12 βˆ’12
  11. assets/stylesheets/components/_page.scss +4 βˆ’4
  12. assets/stylesheets/components/_path.scss +6 βˆ’6
  13. assets/stylesheets/components/_prism.scss +25 βˆ’32
  14. assets/stylesheets/components/_settings.scss +12 βˆ’12
  15. assets/stylesheets/components/_sidebar.scss +37 βˆ’39
  16. assets/stylesheets/global/_base.scss +33 βˆ’33
  17. assets/stylesheets/global/_classes.scss +24 βˆ’25
  18. assets/stylesheets/global/_icons.scss +2 βˆ’2
  19. assets/stylesheets/global/_mixins.scss +6 βˆ’0
  20. assets/stylesheets/global/_print.scss +2 βˆ’2
  21. assets/stylesheets/global/_variables-dark.scss +53 βˆ’71
  22. assets/stylesheets/global/_variables-light.scss +76 βˆ’0
  23. assets/stylesheets/global/_variables.scss +24 βˆ’87
  24. assets/stylesheets/pages/_angularjs.scss +1 βˆ’1
  25. assets/stylesheets/pages/_async.scss +2 βˆ’2
  26. assets/stylesheets/pages/_bootstrap.scss +1 βˆ’1
  27. assets/stylesheets/pages/_c.scss +2 βˆ’2
  28. assets/stylesheets/pages/_clojure.scss +1 βˆ’1
  29. assets/stylesheets/pages/_d.scss +3 βˆ’3
  30. assets/stylesheets/pages/_dojo.scss +1 βˆ’1
  31. assets/stylesheets/pages/_ember.scss +2 βˆ’2
  32. assets/stylesheets/pages/_erlang.scss +1 βˆ’1
  33. assets/stylesheets/pages/_jquery.scss +2 βˆ’2
  34. assets/stylesheets/pages/_love.scss +2 βˆ’2
  35. assets/stylesheets/pages/_mdn.scss +3 βˆ’3
  36. assets/stylesheets/pages/_meteor.scss +2 βˆ’2
  37. assets/stylesheets/pages/_npm.scss +1 βˆ’1
  38. assets/stylesheets/pages/_phalcon.scss +1 βˆ’1
  39. assets/stylesheets/pages/_php.scss +2 βˆ’2
  40. assets/stylesheets/pages/_postgres.scss +1 βˆ’1
  41. assets/stylesheets/pages/_rdoc.scss +4 βˆ’4
  42. assets/stylesheets/pages/_react_native.scss +1 βˆ’1
  43. assets/stylesheets/pages/_redis.scss +2 βˆ’2
  44. assets/stylesheets/pages/_rfc.scss +1 βˆ’1
  45. assets/stylesheets/pages/_sphinx.scss +2 βˆ’2
  46. assets/stylesheets/pages/_sphinx_simple.scss +1 βˆ’1
  47. assets/stylesheets/pages/_support_tables.scss +1 βˆ’1
  48. assets/stylesheets/pages/_yard.scss +1 βˆ’1
  49. assets/stylesheets/pages/_yii.scss +1 βˆ’1
  50. lib/app.rb +0 βˆ’16
  51. views/index.erb +2 βˆ’2
  52. views/manifest.erb +1 βˆ’1
  53. views/other.erb +2 βˆ’2
assets/javascripts/views/content/settings_page.coffee+3βˆ’5
@@ -24,12 +24,10 @@ class app.views.SettingsPage extends app.View Β· 23 unmodified lines
2424 'Preferences'
2525
2626 toggleDark: (enable) ->
27βˆ’ css = $('link[rel="stylesheet"][data-alt]')
28βˆ’ alt = css.getAttribute('data-alt')
29βˆ’ css.setAttribute('data-alt', css.getAttribute('href'))
30βˆ’ css.setAttribute('href', alt)
27+ html = document.documentElement
28+ html.classList.toggle('_theme-default')
29+ html.classList.toggle('_theme-dark')
3130 app.settings.set('dark', !!enable)
32βˆ’ app.appCache?.updateInBackground()
3331 return
3432
3533 toggleLayout: (layout, enable) ->
assets/stylesheets/application-dark.css.scss+0βˆ’108
@@ -1,108 +0,0 @@
1βˆ’//= depend_on docs-1.png
2βˆ’//= depend_on docs-1@2x.png
3βˆ’//= depend_on docs-2.png
4βˆ’//= depend_on docs-2@2x.png
5βˆ’
6βˆ’/*!
7βˆ’ * Copyright 2013-2018 Thibaut Courouble and other contributors
8βˆ’ *
9βˆ’ * This source code is licensed under the terms of the Mozilla
10βˆ’ * Public License, v. 2.0, a copy of which may be obtained at:
11βˆ’ * http://mozilla.org/MPL/2.0/
12βˆ’ */
13βˆ’
14βˆ’@import 'global/variables-dark',
15βˆ’ 'global/mixins',
16βˆ’ 'global/icons',
17βˆ’ 'global/classes',
18βˆ’ 'global/base';
19βˆ’
20βˆ’@import 'components/app',
21βˆ’ 'components/header',
22βˆ’ 'components/notif',
23βˆ’ 'components/sidebar',
24βˆ’ 'components/settings',
25βˆ’ 'components/content',
26βˆ’ 'components/page',
27βˆ’ 'components/fail',
28βˆ’ 'components/path',
29βˆ’ 'components/notice',
30βˆ’ 'components/prism',
31βˆ’ 'components/mobile';
32βˆ’
33βˆ’@import 'pages/simple',
34βˆ’ 'pages/angular',
35βˆ’ 'pages/angularjs',
36βˆ’ 'pages/apache',
37βˆ’ 'pages/async',
38βˆ’ 'pages/bash',
39βˆ’ 'pages/bootstrap',
40βˆ’ 'pages/c',
41βˆ’ 'pages/cakephp',
42βˆ’ 'pages/clojure',
43βˆ’ 'pages/codeception',
44βˆ’ 'pages/coffeescript',
45βˆ’ 'pages/cordova',
46βˆ’ 'pages/crystal',
47βˆ’ 'pages/d',
48βˆ’ 'pages/d3',
49βˆ’ 'pages/dart',
50βˆ’ 'pages/dojo',
51βˆ’ 'pages/drupal',
52βˆ’ 'pages/elixir',
53βˆ’ 'pages/ember',
54βˆ’ 'pages/erlang',
55βˆ’ 'pages/express',
56βˆ’ 'pages/git',
57βˆ’ 'pages/github',
58βˆ’ 'pages/go',
59βˆ’ 'pages/graphite',
60βˆ’ 'pages/haskell',
61βˆ’ 'pages/jekyll',
62βˆ’ 'pages/jquery',
63βˆ’ 'pages/julia',
64βˆ’ 'pages/knockout',
65βˆ’ 'pages/kotlin',
66βˆ’ 'pages/laravel',
67βˆ’ 'pages/liquid',
68βˆ’ 'pages/love',
69βˆ’ 'pages/lua',
70βˆ’ 'pages/mdn',
71βˆ’ 'pages/meteor',
72βˆ’ 'pages/modernizr',
73βˆ’ 'pages/moment',
74βˆ’ 'pages/nginx',
75βˆ’ 'pages/node',
76βˆ’ 'pages/npm',
77βˆ’ 'pages/openjdk',
78βˆ’ 'pages/perl',
79βˆ’ 'pages/phalcon',
80βˆ’ 'pages/phaser',
81βˆ’ 'pages/php',
82βˆ’ 'pages/phpunit',
83βˆ’ 'pages/postgres',
84βˆ’ 'pages/pug',
85βˆ’ 'pages/python',
86βˆ’ 'pages/qt',
87βˆ’ 'pages/ramda',
88βˆ’ 'pages/rdoc',
89βˆ’ 'pages/react_native',
90βˆ’ 'pages/redis',
91βˆ’ 'pages/rethinkdb',
92βˆ’ 'pages/rfc',
93βˆ’ 'pages/rubydoc',
94βˆ’ 'pages/rust',
95βˆ’ 'pages/sinon',
96βˆ’ 'pages/socketio',
97βˆ’ 'pages/sphinx',
98βˆ’ 'pages/sphinx_simple',
99βˆ’ 'pages/sqlite',
100βˆ’ 'pages/support_tables',
101βˆ’ 'pages/tcl_tk',
102βˆ’ 'pages/tensorflow',
103βˆ’ 'pages/terraform',
104βˆ’ 'pages/underscore',
105βˆ’ 'pages/vue',
106βˆ’ 'pages/webpack',
107βˆ’ 'pages/yard',
108βˆ’ 'pages/yii';
assets/stylesheets/application.css.scss+3βˆ’1
@@ -11,7 +11,9 @@ Β· 10 unmodified lines
1111 * http://mozilla.org/MPL/2.0/
1212 */
1313
14βˆ’@import 'global/variables',
14+@import 'global/variables-light',
15+ 'global/variables-dark',
16+ 'global/variables',
1517 'global/mixins',
1618 'global/icons',
1719 'global/classes',
assets/stylesheets/components/_app.scss+5βˆ’5
@@ -1,6 +1,6 @@
1βˆ’html._booting { background: $contentBackground; }
1+html._booting { background: var(--contentBackground); }
22 body._max-width { background: none; }
3βˆ’html._booting body._max-width { background: $documentBackground; }
3+html._booting body._max-width { background: var(--documentBackground); }
44
55 ._app {
66 position: relative;
@@ -15,8 +15,8 @@ html._booting body._max-width { background: $documentBackground; } Β· 8 unmodified lines
1515
1616 ._max-width & {
1717 margin: 0 auto;
18βˆ’ max-width: $maxWidth;
19βˆ’ background: $contentBackground;
20βˆ’ box-shadow: 1px 0 $headerBorder, -1px 0 $headerBorder;
18+ max-width: var(--maxWidth);
19+ background: var(--contentBackground);
20+ box-shadow: 1px 0 var(--headerBorder), -1px 0 var(--headerBorder);
2121 }
2222 }
assets/stylesheets/components/_content.scss+27βˆ’32
@@ -4,13 +4,13 @@ Β· 3 unmodified lines
44
55 ._container {
66 position: relative;
7βˆ’ z-index: $contentZ;
7+ z-index: var(--contentZ);
88 height: 100%;
9βˆ’ margin-left: $sidebarWidth;
9+ margin-left: var(--sidebarWidth);
1010 pointer-events: none;
1111 @extend %border-box;
1212
13βˆ’ @media #{$mediumScreen} { margin-left: $sidebarMediumWidth; }
13+ @include mobile { margin-left: var(--sidebarMediumWidth); }
1414
1515 ._sidebar-hidden & { margin-left: 0; }
1616 body:not(._native-scrollbars) & { -webkit-margin-end: -1px; }
@@ -30,7 +30,7 @@ Β· 13 unmodified lines
3030 ._sidebar-hidden &:before {
3131 content: '';
3232 display: block;
33βˆ’ margin-top: $headerHeight;
33+ margin-top: var(--headerHeight);
3434 }
3535
3636 ._overlay-scrollbars & { padding-left: .625rem; }
@@ -54,7 +54,7 @@ Β· 17 unmodified lines
5454 font-size: 4rem;
5555 font-weight: 300;
5656 letter-spacing: -.125rem;
57βˆ’ color: $loadingText;
57+ color: var(--loadingText);
5858 text-align: center;
5959 cursor: default;
6060 }
@@ -68,7 +68,7 @@ Β· 7 unmodified lines
6868 //
6969
7070 ._splash-title {
71βˆ’ color: $splashText;
71+ color: var(--splashText);
7272 @extend %loading, %user-select-none;
7373 }
7474
@@ -88,7 +88,7 @@ Β· 13 unmodified lines
8888 min-height: calc(100vh - 2.375rem);
8989
9090 ._sidebar-hidden & {
91βˆ’ min-height: calc(100vh - 2.375rem - #{$headerHeight});
91+ min-height: calc(100vh - 2.375rem - var(--headerHeight));
9292 }
9393 }
9494
@@ -140,12 +140,12 @@ Β· 45 unmodified lines
140140
141141 ._error-text {
142142 margin: 0 0 1rem;
143βˆ’ color: $textColorLight;
143+ color: var(--textColorLight);
144144 }
145145
146146 ._error-links {
147147 font-size: 1rem;
148βˆ’ font-weight: $boldFontWeight;
148+ font-weight: var(--boldFontWeight);
149149 }
150150
151151 ._error-link { padding: 0 .5rem; }
@@ -167,7 +167,7 @@ Β· 15 unmodified lines
167167 height: 1px;
168168 margin-top: .25rem;
169169 margin-left: 1rem;
170βˆ’ background: $boxBorderLight;
170+ background: var(--boxBorderLight);
171171 }
172172 }
173173
@@ -197,7 +197,7 @@ Β· 23 unmodified lines
197197 ._toc-title {
198198 margin: 0 0 .5rem;
199199 font-size: inherit;
200βˆ’ font-weight: $boldFontWeight;
200+ font-weight: var(--boldFontWeight);
201201 }
202202
203203 ._toc-list {
@@ -252,7 +252,7 @@ Β· 48 unmodified lines
252252 ._docs-size {
253253 text-align: right;
254254
255βˆ’ > small { color: $textColorLight; }
255+ > small { color: var(--textColorLight); }
256256 }
257257
258258 ._docs-tools {
@@ -285,7 +285,7 @@ Β· 26 unmodified lines
285285 padding: 0 .75rem;
286286 }
287287 ._btn-link:not(._show) { display: none; }
288βˆ’ ._btn-link._show ~ ._btn-link._show { border-left: 1px solid $boxBorder; }
288+ ._btn-link._show ~ ._btn-link._show { border-left: 1px solid var(--boxBorder); }
289289 }
290290
291291 //
@@ -297,7 +297,7 @@ Β· 5 unmodified lines
297297 position: relative;
298298 padding-left: 10em;
299299 font-size: .8125rem;
300βˆ’ color: $textColorLight;
300+ color: var(--textColorLight);
301301
302302 + ._news-row { margin-top: 1em; }
303303 }
@@ -305,7 +305,7 @@ Β· 1 unmodified line
305305 ._news-title {
306306 display: block;
307307 font-size: .875rem;
308βˆ’ color: $textColor;
308+ color: var(--textColor);
309309 }
310310
311311 ._news-date {
@@ -372,12 +372,12 @@ Β· 60 unmodified lines
372372 // Utilities
373373 //
374374
375βˆ’._bold { font-weight: $boldFontWeight; }
375+._bold { font-weight: var(--boldFontWeight); }
376376 ._note { @extend %note; }
377377 ._note-green { @extend %note-green; }
378378 ._label { @extend %label; }
379379 ._code { @extend %code; }
380βˆ’._highlight { background: $highlightBackground !important; }
380+._highlight { background: var(--highlightBackground) !important; }
381381
382382 ._table { width: 100%; }
383383 ._mobile ._table { overflow-x: auto; }
@@ -396,12 +396,9 @@ Β· 12 unmodified lines
396396 pre:hover > & { display: block; }
397397 &:hover { opacity: 1; }
398398
399βˆ’ > svg { @extend %svg-icon; }
400βˆ’
401βˆ’ @if $style == 'dark' {
402βˆ’ > svg { fill: white; }
403βˆ’ } @else {
404βˆ’ > svg { fill: black; }
399+ > svg {
400+ @extend %svg-icon;
401+ fill: var(--absolute);
405402 }
406403
407404 &._pre-clip-success > svg,
@@ -419,15 +416,13 @@ Β· 11 unmodified lines
419416 line-height: normal;
420417 white-space: nowrap;
421418 padding: .375rem .675rem;
422βˆ’ background-image: linear-gradient(lighten($boxBackground, 4%), darken($boxBackground, 2%));
423βˆ’ border: 1px solid $boxBorder;
419+ background-color: var(--boxBackground);
420+ border: 1px solid var(--boxBorder);
424421 border-radius: 3px;
425βˆ’ box-shadow: 0 1px rgba($boxBorder, .08);
426422 cursor: pointer;
427423
428424 &:active {
429βˆ’ background-color: $boxBackground;
430βˆ’ box-shadow: inset 0 1px 1px rgba(black, .05), inset 0 1px 4px $boxBorder;
425+ box-shadow: inset 0 1px 1px rgba(black, .05), inset 0 1px 4px var(--boxBorder);
431426 }
432427 }
433428
@@ -447,18 +442,18 @@ Β· 13 unmodified lines
447442
448443 ._btn-link {
449444 line-height: inherit;
450βˆ’ color: $linkColor;
451βˆ’ text-decoration: $linkTextDecoration;
445+ color: var(--linkColor);
446+ text-decoration: var(--linkTextDecoration);
452447
453448 &:hover {
454βˆ’ color: $linkColorHover;
449+ color: var(--linkColorHover);
455450 text-decoration: underline;
456451 }
457452 }
458453
459454 ._reset-btn,
460455 ._reset-btn:hover {
461βˆ’ color: $textColorRed;
456+ color: var(--textColorRed);
462457 }
463458
464459 ._github-btn {
assets/stylesheets/components/_fail.scss+1βˆ’1
@@ -23,7 +23,7 @@ Β· 22 unmodified lines
2323 ._fail-title {
2424 margin: 0 0 1rem;
2525 font-size: 1rem;
26βˆ’ font-weight: $boldFontWeight;
26+ font-weight: var(--boldFontWeight);
2727 }
2828
2929 ._fail-text, ._fail-list {
assets/stylesheets/components/_header.scss+25βˆ’35
@@ -4,20 +4,20 @@ Β· 3 unmodified lines
44
55 ._header {
66 position: absolute;
7βˆ’ z-index: $headerZ;
7+ z-index: var(--headerZ);
88 top: 0;
99 left: 0;
1010 display: -ms-flexbox;
1111 display: flex;
12βˆ’ width: $sidebarWidth;
13βˆ’ height: $headerHeight;
14βˆ’ background: $headerBackground;
15βˆ’ border-bottom: 1px solid $headerBorder;
16βˆ’ border-right: 1px solid $headerBorder;
12+ width: var(--sidebarWidth);
13+ height: var(--headerHeight);
14+ background: var(--headerBackground);
15+ border-bottom: 1px solid var(--headerBorder);
16+ border-right: 1px solid var(--headerBorder);
1717 @extend %border-box;
1818 @extend %user-select-none;
1919
20βˆ’ @media #{$mediumScreen} { width: $sidebarMediumWidth; }
20+ @include mobile { width: var(--sidebarMediumWidth); }
2121 }
2222
2323 ._header-left {
@@ -35,7 +35,7 @@ Β· 11 unmodified lines
3535 flex: 0 0 auto;
3636 width: 2.25rem;
3737 height: 100%;
38βˆ’ color: $textColorLight;
38+ color: var(--textColorLight);
3939 text-align: center;
4040
4141 &[hidden] { display: none; }
@@ -67,8 +67,8 @@ Β· 25 unmodified lines
6767 word-wrap: normal;
6868 overflow-wrap: normal;
6969 font-size: .875rem;
70βˆ’ background: $contentBackground;
71βˆ’ border: 1px solid $headerBorder;
70+ background: var(--contentBackground);
71+ border: 1px solid var(--headerBorder);
7272 border-radius: 3px;
7373 box-shadow: -1px 1px 1px rgba(black, .05);
7474 transition: all 0ms cubic-bezier(0.23, 1, 0.32, 1) 1ms;
@@ -98,10 +98,10 @@ Β· 23 unmodified lines
9898 margin: 0;
9999 line-height: 1.5rem;
100100 font-size: 1rem;
101βˆ’ font-weight: $boldFontWeight;
101+ font-weight: var(--boldFontWeight);
102102 letter-spacing: -.5px;
103βˆ’ background: $sidebarBackground;
104βˆ’ border-bottom: 1px solid $sidebarBorder;
103+ background: var(--sidebarBackground);
104+ border-bottom: 1px solid var(--sidebarBorder);
105105 border-radius: 2px 2px 0 0;
106106 }
107107
@@ -109,7 +109,7 @@ Β· 1 unmodified line
109109 ._menu-title-link:hover {
110110 display: block;
111111 padding: .5rem 1rem;
112βˆ’ color: $focusText;
112+ color: var(--focusText);
113113 text-decoration: none;
114114 }
115115
@@ -121,9 +121,9 @@ Β· 5 unmodified lines
121121 text-decoration: none;
122122
123123 &:hover {
124βˆ’ color: $focusText;
124+ color: var(--focusText);
125125 text-decoration: none;
126βˆ’ background: $sidebarBackground;
126+ background: var(--sidebarBackground);
127127 }
128128
129129 &:last-child { border-radius: 0 0 2px 2px; }
@@ -151,11 +151,7 @@ Β· 21 unmodified lines
151151 opacity: .42;
152152 @extend %svg-icon;
153153
154βˆ’ @if $style == 'dark' {
155βˆ’ fill: white;
156βˆ’ } @else {
157βˆ’ fill: black;
158βˆ’ }
154+ fill: var(--absolute);
159155 }
160156 }
161157
@@ -166,21 +162,19 @@ Β· 4 unmodified lines
166162 height: 100%;
167163 padding: 0 .75rem 1px 1.75rem;
168164 font-size: .875rem;
169βˆ’ background: $contentBackground;
165+ background: var(--contentBackground);
170166 border: 1px solid;
171βˆ’ border-color: darken($headerBorder, 2%);
167+ border-color: var(--searchBorder);
172168 border-radius: 3px;
173169
174170 &:focus {
175171 outline: 0;
176βˆ’ @if $inputFocusBorder {
177βˆ’ border-color: $inputFocusBorder;
178βˆ’ box-shadow: 0 0 1px $inputFocusBorder;
179βˆ’ }
172+ border-color: var(--inputFocusBorder);
173+ box-shadow: 0 0 1px var(--inputFocusBorder);
180174 }
181175
182176 &[disabled] {
183βˆ’ background: $sidebarBackground;
177+ background: var(--sidebarBackground);
184178 cursor: not-allowed;
185179 }
186180 }
@@ -202,13 +196,9 @@ Β· 15 unmodified lines
202196 top: .5rem;
203197 left: .375rem;
204198 @extend %svg-icon;
199+ fill: var(--absolute);
205200 }
206201
207βˆ’ @if $style == 'dark' {
208βˆ’ > svg { fill: white; }
209βˆ’ } @else {
210βˆ’ > svg { fill: black; }
211βˆ’ }
212202 ._search-active > & { display: block; }
213203 }
214204
@@ -222,8 +212,8 @@ Β· 7 unmodified lines
222212 line-height: 1.25rem;
223213 max-width: 50%;
224214 font-size: .8125rem;
225βˆ’ color: $textColorLight;
226βˆ’ background: darken($headerBackground, 5%);
215+ color: var(--textColorLight);
216+ background: var(--searchTagBackground);
227217 border-radius: 2px;
228218 @extend %truncate-text;
229219 }
assets/stylesheets/components/_mobile.scss+2βˆ’2
@@ -4,7 +4,7 @@ Β· 3 unmodified lines
44
55 ._mobile {
66 font-size: 100%;
7βˆ’ background: $contentBackground;
7+ background: var(--contentBackground);
88
99 ._hide-on-mobile { display: none; }
1010
@@ -18,7 +18,7 @@ Β· 7 unmodified lines
1818
1919 ._container {
2020 margin: 0;
21βˆ’ padding-top: $headerHeight;
21+ padding-top: var(--headerHeight);
2222 }
2323
2424 ._content {
assets/stylesheets/components/_notice.scss+5βˆ’5
@@ -1,15 +1,15 @@
11 ._notice {
22 position: absolute;
3βˆ’ z-index: $noticeZ;
3+ z-index: var(--noticeZ);
44 bottom: 0;
5βˆ’ left: $sidebarWidth;
5+ left: var(--sidebarWidth);
66 right: 0;
77 height: 2.5rem;
88 padding: 0 1.25rem;
9βˆ’ background: $noticeBackground;
10βˆ’ box-shadow: inset 0 1px $noticeBorder;
9+ background: var(--noticeBackground);
10+ box-shadow: inset 0 1px var(--noticeBorder);
1111
12βˆ’ @media #{$mediumScreen} { left: $sidebarMediumWidth; }
12+ @include mobile { left: var(--sidebarMediumWidth); }
1313
1414 ._sidebar-hidden & { left: 0; }
1515
assets/stylesheets/components/_notif.scss+12βˆ’12
@@ -7,9 +7,9 @@ Β· 6 unmodified lines
77 max-width: 90%;
88 padding: .625rem 1rem;
99 font-size: .75rem;
10βˆ’ color: $notifColor;
11βˆ’ background: $notifBackground;
12βˆ’ border: $notifBorder;
10+ color: var(--notifColor);
11+ background: var(--notifBackground);
12+ border: var(--notifBorder);
1313 border-radius: .25rem;
1414 transition: opacity .2s;
1515 opacity: 0;
@@ -30,7 +30,7 @@ Β· 14 unmodified lines
3030
3131 ._notif-info {
3232 float: right;
33βˆ’ color: $notifColorLight;
33+ color: var(--notifColorLight);
3434 }
3535
3636 ._notif-link,
@@ -69,13 +69,13 @@ Β· 32 unmodified lines
6969 &::-webkit-scrollbar { width: 10px !important; }
7070
7171 &::-webkit-scrollbar-track {
72βˆ’ background: $notifBackground !important;
72+ background: var(--notifBackground) !important;
7373 border: 0 !important;
7474 border-radius: 5px !important;
7575 }
7676
7777 &::-webkit-scrollbar-thumb {
78βˆ’ border: 3px solid $notifBackground !important;
78+ border: 3px solid var(--notifBackground) !important;
7979
8080 &:hover, &:active { border-width: 2px !important; }
8181 }
@@ -90,7 +90,7 @@ Β· 8 unmodified lines
9090 > ._news-row {
9191 line-height: 1.125rem;
9292 font-size: .6875rem;
93βˆ’ color: $notifColorLight;
93+ color: var(--notifColorLight);
9494 margin-bottom: .25rem;
9595
9696 + ._news-row { margin-top: .625rem; }
@@ -107,7 +107,7 @@ Β· 10 unmodified lines
107107 ._news-date {
108108 float: right;
109109 margin-left: 1rem;
110βˆ’ font-weight: $boldFontWeight;
110+ font-weight: var(--boldFontWeight);
111111 }
112112
113113 code {
@@ -128,9 +128,9 @@ Β· 14 unmodified lines
128128 }
129129
130130 ._notif-tip {
131βˆ’ color: $textColor;
132βˆ’ background: $tipBackground;
133βˆ’ border: $tipBorder;
131+ color: var(--textColor);
132+ background: var(--tipBackground);
133+ border: var(--tipBorder);
134134
135βˆ’ ._notif-info { color: $textColorLight; }
135+ ._notif-info { color: var(--textColorLight); }
136136 }
assets/stylesheets/components/_page.scss+4βˆ’4
@@ -23,7 +23,7 @@ Β· 22 unmodified lines
2323 max-width: 100%;
2424 margin-bottom: 1em;
2525 padding: 1px;
26βˆ’ border: 1px dotted $boxBorder;
26+ border: 1px dotted var(--boxBorder);
2727 border-radius: 3px;
2828 @extend %border-box;
2929 }
@@ -50,7 +50,7 @@ Β· 20 unmodified lines
5050 display: inline-block;
5151 vertical-align: top;
5252 padding: 0 .5rem;
53βˆ’ background: $contentBackground;
53+ background: var(--contentBackground);
5454 @extend %internal-link;
5555
5656 & + & { margin-left: .75rem; }
@@ -66,7 +66,7 @@ Β· 9 unmodified lines
6666 clear: both;
6767 margin: 2rem 0 1.5rem;
6868 font-size: .75rem;
69βˆ’ color: $textColorLight;
69+ color: var(--textColorLight);
7070 text-align: center;
7171 -webkit-font-smoothing: subpixel-antialiased;
7272
@@ -78,7 +78,7 @@ Β· 5 unmodified lines
7878 display: inline-block;
7979 margin: 0;
8080 padding: .25rem .75rem;
81βˆ’ background: $labelBackground;
81+ background: var(--labelBackground);
8282 border-radius: 3px;
8383 }
8484
assets/stylesheets/components/_path.scss+6βˆ’6
@@ -1,17 +1,17 @@
11 ._path {
22 position: absolute;
3βˆ’ z-index: $noticeZ - 1;
3+ z-index: var(--headerZ);
44 bottom: 0;
5βˆ’ left: $sidebarWidth;
5+ left: var(--sidebarWidth);
66 right: 0;
77 height: 2rem;
88 line-height: 2rem;
99 padding: 0 .375rem;
1010 font-size: .875rem;
11βˆ’ background: $pathBackground;
12βˆ’ box-shadow: inset 0 1px $pathBorder;
11+ background: var(--pathBackground);
12+ box-shadow: inset 0 1px var(--pathBorder);
1313
14βˆ’ @media #{$mediumScreen} { left: $sidebarMediumWidth; }
14+ @include mobile { left: var(--sidebarMediumWidth); }
1515
1616 ._sidebar-hidden & { left: 0; }
1717
@@ -24,7 +24,7 @@ Β· 6 unmodified lines
2424 display: inline-block;
2525 vertical-align: top;
2626 padding: 0 .375rem;
27βˆ’ color: $textColor;
27+ color: var(--textColor);
2828 text-decoration: none;
2929
3030 &:first-child:before {
assets/stylesheets/components/_prism.scss+25βˆ’32
@@ -1,9 +1,26 @@
1+html {
2+ --prismValue: #905;
3+ --prismText: #5e8e01;
4+ --prismOperator: #a67f59;
5+ --prismKeyword: #0070a3;
6+ --prismFunction: #dd4a68;
7+ --prismVariable: #e90;
8+}
9+html.dark {
10+ --prismValue: #eb8160;
11+ --prismText: #ddcf88;
12+ --prismOperator: #b1c676;
13+ --prismKeyword: #91b3ed;
14+ --prismFunction: #c79e6b;
15+ --prismVariable: #e9c062;
16+}
17+
118 .token.comment,
219 .token.prolog,
320 .token.doctype,
421 .token.cdata,
522 .token.punctuation {
6βˆ’ color: $textColorLight;
23+ color: var(--textColorLight);
724 }
825
926 .namespace {
@@ -17,11 +34,7 @@ Β· 7 unmodified lines
1734 .token.constant,
1835 .token.symbol,
1936 .token.deleted {
20βˆ’ @if $style == 'dark' {
21βˆ’ color: #eb8160;
22βˆ’ } @else {
23βˆ’ color: #905;
24βˆ’ }
37+ color: var(--prismValue);
2538 }
2639
2740 .token.selector,
@@ -30,11 +43,7 @@ Β· 2 unmodified lines
3043 .token.char,
3144 .token.builtin,
3245 .token.inserted {
33βˆ’ @if $style == 'dark' {
34βˆ’ color: #ddcf88;
35βˆ’ } @else {
36βˆ’ color: #5e8e01;
37βˆ’ }
46+ color: var(--prismText);
3847 }
3948
4049 .token.operator,
@@ -42,44 +51,28 @@ Β· 1 unmodified line
4251 .token.url,
4352 .language-css .token.string,
4453 .style .token.string {
45βˆ’ @if $style == 'dark' {
46βˆ’ color: #b1c676;
47βˆ’ } @else {
48βˆ’ color: #a67f59;
49βˆ’ }
54+ color: var(--prismOperator);
5055 }
5156
5257 .token.atrule,
5358 .token.attr-value,
5459 .token.keyword {
55βˆ’ @if $style == 'dark' {
56βˆ’ color: #91b3ed;
57βˆ’ } @else {
58βˆ’ color: #0070a3;
59βˆ’ }
60+ color: var(--prismKeyword);
6061 }
6162
6263 .token.function {
63βˆ’ @if $style == 'dark' {
64βˆ’ color: #c79e6b;
65βˆ’ } @else {
66βˆ’ color: #dd4a68;
67βˆ’ }
64+ color: var(--prismFunction);
6865 }
6966
7067 .token.regex,
7168 .token.important,
7269 .token.variable {
73βˆ’ @if $style == 'dark' {
74βˆ’ color: #e9c062;
75βˆ’ } @else {
76βˆ’ color: #e90;
77βˆ’ }
70+ color: var(--prismVariable);
7871 }
7972
8073 .token.important,
8174 .token.bold {
82βˆ’ font-weight: $boldFontWeight;
75+ font-weight: var(--boldFontWeight);
8376 }
8477
8578 .token.italic {
assets/stylesheets/components/_settings.scss+12βˆ’12
@@ -7,15 +7,15 @@ Β· 6 unmodified lines
77 position: absolute;
88 top: 0;
99 bottom: 0;
10βˆ’ z-index: $headerZ;
10+ z-index: var(--headerZ);
1111
1212 &._in { display: block; }
1313
1414 > ._header { justify-content: space-between; }
1515
1616 &._dirty > ._header {
17βˆ’ background: $noteGreenBackground;
18βˆ’ border-color: $noteGreenBorder;
17+ background: var(--noteGreenBackground);
18+ border-color: var(--noteGreenBorder);
1919 }
2020 }
2121
@@ -37,7 +37,7 @@ Β· 15 unmodified lines
3737 padding-right: .5rem;
3838 line-height: inherit;
3939 font-size: inherit;
40βˆ’ font-weight: $boldFontWeight;
40+ font-weight: var(--boldFontWeight);
4141 text-align: right;
4242 @extend %border-box;
4343 }
@@ -52,7 +52,7 @@ Β· 8 unmodified lines
5252
5353 > small {
5454 display: block;
55βˆ’ color: $textColorLight;
55+ color: var(--textColorLight);
5656 margin-left: 1.75rem;
5757 }
5858
@@ -62,7 +62,7 @@ Β· 3 unmodified lines
6262 }
6363 }
6464
65βˆ’@media (max-width: $maxWidth) {
65+@media (max-width: 80rem) {
6666 ._setting-max-width { display: none; }
6767 }
6868
@@ -80,7 +80,7 @@ Β· 11 unmodified lines
8080 line-height: 1.5rem;
8181 padding: 0 .75rem;
8282 font-size: .875rem;
83βˆ’ font-weight: $boldFontWeight;
83+ font-weight: var(--boldFontWeight);
8484 color: inherit;
8585 text-align: left;
8686 cursor: pointer;
@@ -119,12 +119,12 @@ Β· 32 unmodified lines
119119 position: relative;
120120 vertical-align: top;
121121 padding: 0 .75rem;
122βˆ’ line-height: $headerHeight;
123βˆ’ color: $textColorLight;
122+ line-height: var(--headerHeight);
123+ color: var(--textColorLight);
124124
125125 &.active {
126βˆ’ color: $textColor;
127βˆ’ font-weight: $boldFontWeight;
128βˆ’ box-shadow: inset 0 -2px $linkColor;
126+ color: var(--textColor);
127+ font-weight: var(--boldFontWeight);
128+ box-shadow: inset 0 -2px var(--linkColor);
129129 }
130130 }
assets/stylesheets/components/_sidebar.scss+37βˆ’39
@@ -4,14 +4,14 @@ Β· 3 unmodified lines
44
55 ._sidebar {
66 position: absolute;
7βˆ’ z-index: $sidebarZ;
7+ z-index: var(--sidebarZ);
88 top: 0;
99 bottom: 0;
1010 left: 0;
1111 overflow-x: hidden;
1212 overflow-y: scroll;
13βˆ’ padding-top: $headerHeight;
14βˆ’ background: $sidebarBackground;
13+ padding-top: var(--headerHeight);
14+ background: var(--sidebarBackground);
1515 background-clip: content-box;
1616 -webkit-overflow-scrolling: touch;
1717 -ms-overflow-style: none; // IE 10 doesn't support pointer-events
@@ -22,13 +22,13 @@ Β· 4 unmodified lines
2222
2323 ._overlay-scrollbars & {
2424 padding-top: 0;
25βˆ’ top: $headerHeight;
25+ top: var(--headerHeight);
2626 }
2727
2828 body:not(._native-scrollbars) & {
2929 &::-webkit-scrollbar { width: 10px; }
3030 &::-webkit-scrollbar-track {
31βˆ’ background: $contentBackground;
31+ background: var(--contentBackground);
3232 border: 0;
3333 }
3434 &::-webkit-scrollbar-thumb {
@@ -52,10 +52,10 @@ Β· 17 unmodified lines
5252
5353 ._resizer {
5454 position: absolute;
55βˆ’ z-index: $sidebarZ + 1;
56βˆ’ top: $headerHeight;
57βˆ’ bottom: $headerHeight;
58βˆ’ left: $sidebarWidth;
55+ z-index: var(--headerZ);
56+ top: var(--headerHeight);
57+ bottom: var(--headerHeight);
58+ left: var(--sidebarWidth);
5959 margin-left: -2px;
6060 width: 3px;
6161 cursor: col-resize;
@@ -72,11 +72,11 @@ Β· 10 unmodified lines
7272 margin: 0;
7373 padding: 0;
7474 list-style: none;
75βˆ’ width: $sidebarWidth;
76βˆ’ box-shadow: inset -1px 0 $sidebarBorder;
75+ width: var(--sidebarWidth);
76+ box-shadow: inset -1px 0 var(--sidebarBorder);
7777 @extend %border-box;
7878
79βˆ’ @media #{$mediumScreen} { width: $sidebarMediumWidth; }
79+ @include mobile { width: var(--sidebarMediumWidth); }
8080
8181 ._sidebar > & { min-height: 100%; }
8282
@@ -89,7 +89,7 @@ Β· 6 unmodified lines
8989 padding: 0 .75rem 0 2.125rem;
9090 line-height: 2rem;
9191 font-size: .75rem;
92βˆ’ color: $textColorLight;
92+ color: var(--textColorLight);
9393 text-transform: uppercase;
9494 cursor: default;
9595 }
@@ -110,8 +110,8 @@ Β· 14 unmodified lines
110110 line-height: 1.5rem;
111111 font-size: .875rem;
112112 cursor: default;
113βˆ’ background: $sidebarBackground;
114βˆ’ box-shadow: inset -1px 0 $sidebarBorder;
113+ background: var(--sidebarBackground);
114+ box-shadow: inset -1px 0 var(--sidebarBorder);
115115 @extend %truncate-text;
116116
117117 &, &:hover {
@@ -123,16 +123,16 @@ Β· 5 unmodified lines
123123 &.focus:hover,
124124 &.active,
125125 &.active:hover {
126βˆ’ color: $focusText;
127βˆ’ background: $focusBackground;
128βˆ’ box-shadow: inset -1px 0 $focusBorder;
126+ color: var(--focusText);
127+ background: var(--focusBackground);
128+ box-shadow: inset -1px 0 var(--focusBorder);
129129 }
130130
131131 &.active,
132132 &.active:hover {
133βˆ’ color: $selectionText;
134βˆ’ background: $selectionBackground;
135βˆ’ box-shadow: inset -1px 0 $selectionBorder;
133+ color: var(--selectionText);
134+ background: var(--selectionBackground);
135+ box-shadow: inset -1px 0 var(--selectionBorder);
136136 }
137137
138138 &:before {
@@ -160,7 +160,7 @@ Β· 21 unmodified lines
160160 }
161161
162162 ._list-count {
163βˆ’ color: $textColorLighter;
163+ color: var(--textColorLighter);
164164 pointer-events: none;
165165
166166 ._list-disabled:hover > & { display: none; }
@@ -168,7 +168,7 @@ Β· 1 unmodified line
168168
169169 ._list-enable {
170170 display: none;
171βˆ’ color: $linkColor;
171+ color: var(--linkColor);
172172 cursor: pointer;
173173
174174 &:hover { text-decoration: underline; }
@@ -188,7 +188,7 @@ Β· 13 unmodified lines
188188 ._list-disabled {
189189 @extend %_list-dir;
190190
191βˆ’ &, &:hover { color: $textColorLight; }
191+ &, &:hover { color: var(--textColorLight); }
192192 &:before { opacity: .7; }
193193 }
194194
@@ -200,11 +200,9 @@ Β· 5 unmodified lines
200200 width: 1rem;
201201 height: 1rem;
202202 cursor: pointer;
203βˆ’ fill: black;
203+ fill: var(--absolute);
204204 opacity: .4;
205205
206βˆ’ @if $style == 'dark' { fill: white; }
207βˆ’
208206 &:hover { opacity: .65; }
209207
210208 ._list-rdir > & {
@@ -239,11 +237,11 @@ Β· 28 unmodified lines
239237 //
240238
241239 ._list-pagelink {
242βˆ’ color: $linkColor;
240+ color: var(--linkColor);
243241 cursor: pointer;
244242
245243 &:hover {
246βˆ’ color: $linkColorHover;
244+ color: var(--linkColorHover);
247245 text-decoration: underline;
248246 }
249247 }
@@ -275,9 +273,9 @@ Β· 25 unmodified lines
275273 left: .75rem;
276274 width: .75rem;
277275 height: 1px;
278βˆ’ background: rgba($selectionText, .9);
279βˆ’ box-shadow: 0 -3px rgba($selectionText, .9), // top line
280βˆ’ 0 3px rgba($selectionText, .9); // bottom line
276+ background: var(--transparentSelectionText);
277+ box-shadow: 0 -3px var(--transparentSelectionText), // top line
278+ 0 3px var(--transparentSelectionText); // bottom line
281279 }
282280 }
283281
@@ -289,7 +287,7 @@ Β· 5 unmodified lines
289287 padding: .5rem .75rem;
290288 line-height: 1.25rem;
291289 font-size: .8125rem;
292βˆ’ color: $textColorLight;
290+ color: var(--textColorLight);
293291
294292 & + & { padding-top: 0; }
295293 }
@@ -303,9 +301,9 @@ Β· 7 unmodified lines
303301 ._list-hover.clone {
304302 position: fixed;
305303 overflow: visible;
306βˆ’ z-index: $hoverZ;
304+ z-index: var(--hoverZ);
307305 left: 0;
308βˆ’ min-width: $sidebarWidth;
306+ min-width: var(--sidebarWidth);
309307 padding: .25rem .75rem;
310308 pointer-events: none;
311309 -webkit-font-smoothing: subpixel-antialiased;
@@ -313,7 +311,7 @@ Β· 1 unmodified line
313311 transform: translate3d(0, 0, 0);
314312 @extend %border-box;
315313
316βˆ’ @media #{$mediumScreen} { min-width: $sidebarMediumWidth; }
314+ @include mobile { min-width: var(--sidebarMediumWidth); }
317315
318316 > ._list-text { display: inline; }
319317
@@ -346,10 +344,10 @@ Β· 26 unmodified lines
346344 padding: .5rem .75rem .25rem .75rem;
347345 line-height: 1.5rem;
348346 font-size: .75rem;
349βˆ’ font-weight: $bolderFontWeight;
350βˆ’ color: $textColorLight;
347+ font-weight: var(--bolderFontWeight);
348+ color: var(--textColorLight);
351349 text-transform: uppercase;
352βˆ’ background: linear-gradient(to bottom, $sidebarBackground, $sidebarBackground 75%, rgba($sidebarBackground, 0));
350+ background: linear-gradient(to bottom, var(--sidebarBackground), var(--sidebarBackground) 75%, var(--transparentSidebarBackground));
353351 cursor: default;
354352 }
355353
assets/stylesheets/global/_base.scss+33βˆ’33
@@ -1,9 +1,9 @@
11 html {
22 height: 100%;
33 font-size: 100%;
4βˆ’ background: $documentBackground;
4+ background: var(--documentBackground);
55
6βˆ’ @media #{$mediumScreen} { font-size: 93.75%; }
6+ @include mobile { font-size: 93.75%; }
77
88 @include print { background: none; }
99 @import 'global/print';
@@ -15,12 +15,12 @@ body { Β· 5 unmodified lines
1515 overflow: auto;
1616 font-size: 1em;
1717 font-weight: normal;
18βˆ’ font-family: $baseFont;
18+ font-family: var(--baseFont);
1919 line-height: 1.7;
20βˆ’ color: $textColor;
20+ color: var(--textColor);
2121 word-wrap: break-word;
2222 overflow-wrap: break-word;
23βˆ’ background: $contentBackground;
23+ background: var(--contentBackground);
2424 touch-action: manipulation;
2525 -webkit-tap-highlight-color: rgba(black, 0);
2626 -webkit-touch-callout: none;
@@ -29,11 +29,11 @@ body { Β· 2 unmodified lines
2929 }
3030
3131 a {
32βˆ’ color: $linkColor;
33βˆ’ text-decoration: $linkTextDecoration;
32+ color: var(--linkColor);
33+ text-decoration: var(--linkTextDecoration);
3434
3535 &:hover {
36βˆ’ color: $linkColorHover;
36+ color: var(--linkColorHover);
3737 text-decoration: underline;
3838 }
3939 }
@@ -47,7 +47,7 @@ img { Β· 7 unmodified lines
4747 h1, h2, h3, h4, h5, h6 {
4848 margin: 1.5em 0 1em;
4949 line-height: 1.3;
50βˆ’ font-weight: $bolderFontWeight;
50+ font-weight: var(--bolderFontWeight);
5151 }
5252
5353 h1 { font-size: 1.5em; }
@@ -59,7 +59,7 @@ h5, h6 { font-size: 1em; } Β· 5 unmodified lines
5959 p { margin: 0 0 1em; }
6060 p:last-child { margin-bottom: 0; }
6161
62βˆ’b, strong { font-weight: $boldFontWeight; }
62+b, strong { font-weight: var(--boldFontWeight); }
6363
6464 small { font-size: .9em; }
6565
@@ -79,7 +79,7 @@ li > ul, li > ol, dd > ul, dd > ol { margin: .5em 0; } Β· 13 unmodified lines
7979 li > p { margin-bottom: .25em; }
8080
8181 dl { margin: 1.5em 0; }
82βˆ’dt { font-weight: $boldFontWeight; }
82+dt { font-weight: var(--boldFontWeight); }
8383 dd {
8484 margin: .375em;
8585 padding-left: 1em;
@@ -91,15 +91,15 @@ dfn, var { font-style: normal; } Β· 5 unmodified lines
9191
9292 abbr, acronym, dfn {
9393 cursor: help;
94βˆ’ border-bottom: 1px dotted $textColor;
94+ border-bottom: 1px dotted var(--textColor);
9595 }
9696
9797 pre, code, samp, %pre, %code {
98βˆ’ font-family: $monoFont;
98+ font-family: var(--monoFont);
9999 font-weight: normal;
100100 font-style: normal;
101101 font-size: .9em;
102βˆ’ color: $textColor;
102+ color: var(--textColor);
103103 white-space: pre-wrap;
104104 direction: ltr;
105105 -moz-tab-size: 2;
@@ -121,14 +121,14 @@ a > code { color: inherit; } Β· 15 unmodified lines
121121 table {
122122 margin: 1.5em 0;
123123 background: none;
124βˆ’ border: 1px solid $boxBorder;
124+ border: 1px solid var(--boxBorder);
125125 border-collapse: separate;
126126 border-spacing: 0;
127127 border-radius: 3px;
128128 }
129129
130130 caption {
131βˆ’ font-weight: $boldFontWeight;
131+ font-weight: var(--boldFontWeight);
132132 padding: 0 .7em .3em;
133133 }
134134
@@ -142,15 +142,15 @@ th, td { Β· 7 unmodified lines
142142 }
143143
144144 th {
145βˆ’ font-weight: $boldFontWeight;
145+ font-weight: var(--boldFontWeight);
146146 border: 0;
147βˆ’ border-bottom: 1px solid $boxBorder;
147+ border-bottom: 1px solid var(--boxBorder);
148148 border-radius: 0;
149149 @extend %heading-box;
150150
151151 &:empty { background: none; }
152152
153βˆ’ + th, + td { border-left: 1px solid $boxBorder; }
153+ + th, + td { border-left: 1px solid var(--boxBorder); }
154154
155155 tr:first-child > &:first-child { border-top-left-radius: 3px; }
156156 tr:first-child > &:last-child { border-top-right-radius: 3px; }
@@ -161,10 +161,10 @@ th { Β· 4 unmodified lines
161161 }
162162
163163 td {
164βˆ’ background: $contentBackground;
165βˆ’ border-bottom: 1px solid $boxBorderLight;
164+ background: var(--contentBackground);
165+ border-bottom: 1px solid var(--boxBorderLight);
166166
167βˆ’ + td { border-left: 1px solid $boxBorderLight; }
167+ + td { border-left: 1px solid var(--boxBorderLight); }
168168 tr:last-child > & { border-bottom: 0; }
169169
170170 > pre:only-child, > p:only-child, > ul:only-child, > ol:only-child {
@@ -190,7 +190,7 @@ input, button { Β· 19 unmodified lines
190190 margin: 0;
191191 font-family: inherit;
192192 font-size: 100%;
193βˆ’ color: $textColor;
193+ color: var(--textColor);
194194 line-height: normal;
195195 @extend %border-box;
196196 }
@@ -219,7 +219,7 @@ button:focus { Β· 22 unmodified lines
219219 }
220220
221221 img, iframe {
222βˆ’ background: $externalsBackground;
222+ background: var(--externalsBackground);
223223 }
224224
225225 input[type="search"]::-webkit-search-cancel-button,
@@ -234,9 +234,9 @@ input[type="search"]::-webkit-search-decoration { Β· 8 unmodified lines
234234 border: 0 !important;
235235 }
236236
237βˆ’::-webkit-input-placeholder { color: $textColorLighter; }
238βˆ’::-moz-placeholder { color: $textColorLighter; opacity: 1; }
239βˆ’:-ms-input-placeholder { color: $textColorLighter; }
237+::-webkit-input-placeholder { color: var(--textColorLighter); }
238+::-moz-placeholder { color: var(--textColorLighter); opacity: 1; }
239+:-ms-input-placeholder { color: var(--textColorLighter); }
240240
241241 body:not(._native-scrollbars) {
242242 *::-webkit-scrollbar { -webkit-appearance: none; }
@@ -247,12 +247,12 @@ body:not(._native-scrollbars) { Β· 4 unmodified lines
247247 *::-webkit-scrollbar-corner { display: none; }
248248
249249 *::-webkit-scrollbar-track {
250βˆ’ background: $contentBackground;
251βˆ’ border: 1px solid $contentBackground;
250+ background: var(--contentBackground);
251+ border: 1px solid var(--contentBackground);
252252
253253 &:hover {
254βˆ’ background: $sidebarBackground;
255βˆ’ border-color: $sidebarBorder;
254+ background: var(--sidebarBackground);
255+ border-color: var(--sidebarBorder);
256256 }
257257
258258 &:vertical { border-width: 0 0 0 1px; }
@@ -270,14 +270,14 @@ body:not(._native-scrollbars) { Β· 11 unmodified lines
270270
271271 *::-webkit-scrollbar-thumb {
272272 min-height: 2rem;
273βˆ’ background: $scrollbarColor;
273+ background: var(--scrollbarColor);
274274 background-clip: padding-box;
275275 border: 5px solid rgba(black, 0);
276276 border-radius: 10px;
277277
278278 &:hover,
279279 &:active {
280βˆ’ background-color: $scrollbarColorHover;
280+ background-color: var(--scrollbarColorHover);
281281 border-width: 4px;
282282 }
283283 }
assets/stylesheets/global/_classes.scss+24βˆ’25
@@ -36,15 +36,15 @@ Β· 35 unmodified lines
3636 //
3737
3838 %box {
39βˆ’ background: $boxBackground;
40βˆ’ border: 1px solid $boxBorder;
39+ background: var(--boxBackground);
40+ border: 1px solid var(--boxBorder);
4141 border-radius: 3px;
4242 }
4343
4444 %heading-box {
45βˆ’ color: $boxHeaderColor;
46βˆ’ background: $boxHeaderBackground;
47βˆ’ border: 1px solid $boxBorder;
45+ color: var(--boxHeaderColor);
46+ background: var(--boxHeaderBackground);
47+ border: 1px solid var(--boxBorder);
4848 border-radius: 3px;
4949 }
5050
@@ -82,15 +82,15 @@ Β· 31 unmodified lines
8282 %note {
8383 margin: 1.5rem 0;
8484 padding: .5rem .875rem;
85βˆ’ background: $noteBackground;
86βˆ’ border: 1px solid $noteBorder;
85+ background: var(--noteBackground);
86+ border: 1px solid var(--noteBorder);
8787 border-radius: 3px;
8888 }
8989
9090 %label {
9191 margin: 0 1px;
9292 padding: 1px 4px 2px;
93βˆ’ background: $labelBackground;
93+ background: var(--labelBackground);
9494 border-radius: 3px;
9595 }
9696
@@ -102,35 +102,35 @@ Β· 5 unmodified lines
102102 padding-right: .5em;
103103 overflow: hidden;
104104 font-size: inherit;
105βˆ’ color: $boxHeaderColor;
106βˆ’ border: 1px solid $boxBorder;
105+ color: var(--boxHeaderColor);
106+ border: 1px solid var(--boxBorder);
107107 border-radius: 2px;
108108 @extend %label;
109109 }
110110
111111 %label-yellow {
112βˆ’ background: $noteBackground;
113βˆ’ border-color: $noteBorder;
112+ background: var(--noteBackground);
113+ border-color: var(--noteBorder);
114114 }
115115
116116 %note-green, %label-green {
117βˆ’ background: $noteGreenBackground;
118βˆ’ border-color: $noteGreenBorder;
117+ background: var(--noteGreenBackground);
118+ border-color: var(--noteGreenBorder);
119119 }
120120
121121 %note-blue, %label-blue {
122βˆ’ background: $noteBlueBackground;
123βˆ’ border-color: $noteBlueBorder;
122+ background: var(--noteBlueBackground);
123+ border-color: var(--noteBlueBorder);
124124 }
125125
126126 %note-orange, %label-orange {
127βˆ’ background: $noteOrangeBackground;
128βˆ’ border-color: $noteOrangeBorder;
127+ background: var(--noteOrangeBackground);
128+ border-color: var(--noteOrangeBorder);
129129 }
130130
131131 %note-red, %label-red {
132βˆ’ background: $noteRedBackground;
133βˆ’ border-color: $noteRedBorder;
132+ background: var(--noteRedBackground);
133+ border-color: var(--noteRedBorder);
134134 }
135135
136136 //
@@ -149,12 +149,11 @@ Β· 12 unmodified lines
149149 pointer-events: none;
150150
151151 // <svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15,15H2V6h2.595c0,0,0.689-0.896,2.17-2H1C0.447,4,0,4.449,0,5v11c0,0.553,0.447,1,1,1h15c0.553,0,1-0.447,1-1v-3.746 l-2,1.645V15z M13.361,8.05v3.551L20,6.4l-6.639-4.999v3.131C5.3,4.532,5.3,12.5,5.3,12.5C7.582,8.752,8.986,8.05,13.361,8.05z"/></svg>
152βˆ’ @if $style == 'dark' {
153βˆ’ background-image: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2NiZDBkMCIgZD0iTTE1LDE1SDJWNmgyLjU5NWMwLDAsMC42ODktMC44OTYsMi4xNy0ySDFDMC40NDcsNCwwLDQuNDQ5LDAsNXYxMWMwLDAuNTUzLDAuNDQ3LDEsMSwxaDE1YzAuNTUzLDAsMS0wLjQ0NywxLTF2LTMuNzQ2IGwtMiwxLjY0NVYxNXogTTEzLjM2MSw4LjA1djMuNTUxTDIwLDYuNGwtNi42MzktNC45OTl2My4xMzFDNS4zLDQuNTMyLDUuMywxMi41LDUuMywxMi41QzcuNTgyLDguNzUyLDguOTg2LDguMDUsMTMuMzYxLDguMDV6Ii8+PC9zdmc+);
154βˆ’ } @else {
155βˆ’ background-image: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iIzMzNzdjMCIgZD0iTTE1LDE1SDJWNmgyLjU5NWMwLDAsMC42ODktMC44OTYsMi4xNy0ySDFDMC40NDcsNCwwLDQuNDQ5LDAsNXYxMWMwLDAuNTUzLDAuNDQ3LDEsMSwxaDE1YzAuNTUzLDAsMS0wLjQ0NywxLTF2LTMuNzQ2IGwtMiwxLjY0NVYxNXogTTEzLjM2MSw4LjA1djMuNTUxTDIwLDYuNGwtNi42MzktNC45OTl2My4xMzFDNS4zLDQuNTMyLDUuMywxMi41LDUuMywxMi41QzcuNTgyLDguNzUyLDguOTg2LDguMDUsMTMuMzYxLDguMDV6Ii8+PC9zdmc+);
156βˆ’ }
152+ background-image: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iIzMzNzdjMCIgZD0iTTE1LDE1SDJWNmgyLjU5NWMwLDAsMC42ODktMC44OTYsMi4xNy0ySDFDMC40NDcsNCwwLDQuNDQ5LDAsNXYxMWMwLDAuNTUzLDAuNDQ3LDEsMSwxaDE1YzAuNTUzLDAsMS0wLjQ0NywxLTF2LTMuNzQ2IGwtMiwxLjY0NVYxNXogTTEzLjM2MSw4LjA1djMuNTUxTDIwLDYuNGwtNi42MzktNC45OTl2My4xMzFDNS4zLDQuNTMyLDUuMywxMi41LDUuMywxMi41QzcuNTgyLDguNzUyLDguOTg2LDguMDUsMTMuMzYxLDguMDV6Ii8+PC9zdmc+);
157153 }
158154 }
155+html.dark %external-link {
156+ background-image: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2NiZDBkMCIgZD0iTTE1LDE1SDJWNmgyLjU5NWMwLDAsMC42ODktMC44OTYsMi4xNy0ySDFDMC40NDcsNCwwLDQuNDQ5LDAsNXYxMWMwLDAuNTUzLDAuNDQ3LDEsMSwxaDE1YzAuNTUzLDAsMS0wLjQ0NywxLTF2LTMuNzQ2IGwtMiwxLjY0NVYxNXogTTEzLjM2MSw4LjA1djMuNTUxTDIwLDYuNGwtNi42MzktNC45OTl2My4xMzFDNS4zLDQuNTMyLDUuMywxMi41LDUuMywxMi41QzcuNTgyLDguNzUyLDguOTg2LDguMDUsMTMuMzYxLDguMDV6Ii8+PC9zdmc+);
157+}
159158
160159 %internal-link:after { content: none !important; }
assets/stylesheets/global/_icons.scss+2βˆ’2
@@ -23,8 +23,8 @@ Β· 22 unmodified lines
2323 %doc-icon-2 { background-image: image-url('docs-2@2x.png') !important; }
2424 }
2525
26βˆ’%darkIconFix {
27βˆ’ @if $style == 'dark' {
26+html._theme-dark {
27+ %darkIconFix {
2828 filter: invert(100%) grayscale(100%);
2929 -webkit-filter: invert(100%) grayscale(100%);
3030 }
assets/stylesheets/global/_mixins.scss+6βˆ’0
@@ -7,3 +7,9 @@ Β· 6 unmodified lines
77 @content;
88 }
99 }
10+
11+@mixin mobile {
12+ @media (max-width: 800px) {
13+ @content;
14+ }
15+}
assets/stylesheets/global/_print.scss+2βˆ’2
@@ -25,14 +25,14 @@ Β· 24 unmodified lines
2525
2626 ._attribution-p {
2727 background: none;
28βˆ’ border: 2px solid $boxBorder;
28+ border: 2px solid var(--boxBorder);
2929 }
3030
3131 ._attribution:last-child:after {
3232 content: 'Exported from DevDocs \2014 https://devdocs.io';
3333 display: block;
3434 margin-top: 1rem;
35βˆ’ font-weight: $bolderFontWeight;
35+ font-weight: var(--bolderFontWeight);
3636 }
3737
3838 ._attribution {
assets/stylesheets/global/_variables-dark.scss+53βˆ’71
@@ -1,94 +1,76 @@
1βˆ’$baseFont: -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
2βˆ’$monoFont: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
3βˆ’$boldFontWeight: 500;
4βˆ’$bolderFontWeight: 600;
1+html._theme-dark {
2+ --absolute: white;
53
6βˆ’$style: 'dark';
4+ --documentBackground: #222;
5+ --contentBackground: #33373a;
76
8βˆ’$maxWidth: 80rem;
9βˆ’$headerHeight: 3rem;
10βˆ’$sidebarWidth: 20rem;
11βˆ’$sidebarMediumWidth: 16rem;
7+ --textColor: #cbd0d0;
8+ --textColorLight: #9da5ad;
9+ --textColorLighter: #77787a;
1210
13βˆ’$documentBackground: #222;
14βˆ’$contentBackground: #33373a;
11+ --externalsBackground: #fff;
1512
16βˆ’$externalsBackground: #fff;
13+ --inputFocusBorder: transparent;
1714
18βˆ’$textColor: #cbd0d0;
19βˆ’$textColorLight: #9da5ad;
20βˆ’$textColorLighter: #77787a;
21βˆ’$textColorRed: #f44336;
15+ --focusBackground: #3f4042;
16+ --focusBorder: #000;
17+ --focusText: #f7f2f2;
2218
23βˆ’$inputFocusBorder: false;
19+ --loadingText: #5d6164;
2420
25βˆ’$focusBackground: #3f4042;
26βˆ’$focusBorder: #000;
27βˆ’$focusText: #f7f2f2;
21+ --selectionBackground: #007acc;
22+ --selectionBorder: #000;
2823
29βˆ’$loadingText: #5d6164;
30βˆ’$splashText: $loadingText;
24+ --highlightBackground: #64675f;
3125
32βˆ’$selectionBackground: #007acc;
33βˆ’$selectionBorder: #000;
34βˆ’$selectionText: #fff;
26+ --linkColor: var(--textColor);
27+ --linkColorHover: white;
28+ --linkTextDecoration: underline;
3529
36βˆ’$highlightBackground: #64675f;
30+ --headerBackground: #1c1c1c;
31+ --headerBorder: #000;
32+ --searchTagBackground: #{darken(#1c1c1c, 5%)};
33+ --searchBorder: #{darken(#000, 2%)};
3734
38βˆ’$linkColor: $textColor;
39βˆ’$linkColorHover: white;
40βˆ’$linkTextDecoration: underline;
35+ --sidebarBackground: #24282a;
36+ --transparentSidebarBackground: #{rgba(#24282a, 0)};
37+ --sidebarBorder: #000;
4138
42βˆ’$headerBackground: #1c1c1c;
43βˆ’$headerBorder: #000;
39+ --scrollbarColor: #6c6c6f;
40+ --scrollbarColorHover: #949697;
4441
45βˆ’$sidebarBackground: #24282a;
46βˆ’$sidebarBorder: #000;
42+ --pathBackground: var(--headerBackground);
43+ --pathBorder: var(--headerBorder);
4744
48βˆ’$scrollbarColor: #6c6c6f;
49βˆ’$scrollbarColorHover: #949697;
45+ --noticeBackground: var(--sidebarBackground);
46+ --noticeBorder: var(--sidebarBorder);
5047
51βˆ’$pathBackground: $headerBackground;
52βˆ’$pathBorder: $headerBorder;
48+ --boxBackground: var(--sidebarBackground);
49+ --boxBorder: var(--headerBorder);
50+ --boxBorderLight: var(--headerBorder);
51+ --boxHeaderColor: #dbe4e4;
52+ --boxHeaderBackground: var(--sidebarBackground);
5353
54βˆ’$noticeBackground: $sidebarBackground;
55βˆ’$noticeBorder: $sidebarBorder;
54+ --noteBackground: #45474b;
55+ --noteBorder: #000;
5656
57βˆ’$boxBackground: $sidebarBackground;
58βˆ’$boxBorder: $headerBorder;
59βˆ’$boxBorderLight: $headerBorder;
60βˆ’$boxHeaderColor: #dbe4e4;
61βˆ’$boxHeaderBackground: $sidebarBackground;
57+ --noteGreenBackground: #284a2a;
58+ --noteGreenBorder: #000;
6259
63βˆ’$noteBackground: #45474b;
64βˆ’$noteBorder: #000;
60+ --noteBlueBackground: #2a4151;
61+ --noteBlueBorder: #000;
6562
66βˆ’$noteGreenBackground: #284a2a;
67βˆ’$noteGreenBorder: #000;
63+ --noteOrangeBackground: #563322;
64+ --noteOrangeBorder: #000;
6865
69βˆ’$noteBlueBackground: #2a4151;
70βˆ’$noteBlueBorder: #000;
66+ --noteRedBackground: #603033;
67+ --noteRedBorder: #000;
7168
72βˆ’$noteOrangeBackground: #563322;
73βˆ’$noteOrangeBorder: #000;
69+ --labelBackground: var(--boxBackground);
7470
75βˆ’$noteRedBackground: #603033;
76βˆ’$noteRedBorder: #000;
71+ --notifBackground: #{rgba(#555, .95)};
72+ --notifBorder: 1px solid #000;
7773
78βˆ’$labelBackground: $boxBackground;
79βˆ’
80βˆ’$notifBackground: rgba(#555, .95);
81βˆ’$notifBorder: 1px solid #000;
82βˆ’$notifColor: #fff;
83βˆ’$notifColorLight: #ccc;
84βˆ’
85βˆ’$tipBackground: $notifBackground;
86βˆ’$tipBorder: $notifBorder;
87βˆ’
88βˆ’$mediumScreen: '(max-width: 800px)';
89βˆ’
90βˆ’$contentZ: 1;
91βˆ’$sidebarZ: 2;
92βˆ’$headerZ: 3;
93βˆ’$noticeZ: 4;
94βˆ’$hoverZ: 5;
74+ --tipBackground: var(--notifBackground);
75+ --tipBorder: var(--notifBorder);
76+}
assets/stylesheets/global/_variables-light.scss+76βˆ’0
@@ -0,0 +1,76 @@
1+html._theme-default {
2+ --absolute: black;
3+
4+ --documentBackground: #f3f3f3;
5+ --contentBackground: #fff;
6+
7+ --textColor: #333;
8+ --textColorLight: #666;
9+ --textColorLighter: #888;
10+
11+ --externalsBackground: #fff;
12+
13+ --inputFocusBorder: #35b5f4;
14+
15+ --focusBackground: #e5e5e5;
16+ --focusBorder: #d4d4d4;
17+ --focusText: #000;
18+
19+ --loadingText: #ccc;
20+
21+ --selectionBackground: #398df0;
22+ --selectionBorder: #196fc2;
23+
24+ --highlightBackground: #fffdcd;
25+
26+ --linkColor: #3377c0;
27+ --linkColorHover: #2f6cb6;
28+ --linkTextDecoration: none;
29+
30+ --headerBackground: #eee;
31+ --headerBorder: #d7d7d7;
32+ --searchTagBackground: #{darken(#eee, 5%)};
33+ --searchBorder: #{darken(#d7d7d7, 2%)};
34+
35+ --sidebarBackground: #f9f9f9;
36+ --transparentSidebarBackground: #{rgba(#f9f9f9, 0)};
37+ --sidebarBorder: #e1e1e1;
38+
39+ --scrollbarColor: #ccc;
40+ --scrollbarColorHover: #999;
41+
42+ --pathBackground: var(--sidebarBackground);
43+ --pathBorder: var(--sidebarBorder);
44+
45+ --noticeBackground: #faf9e2;
46+ --noticeBorder: #e2e2c1;
47+
48+ --boxBackground: #fafafa;
49+ --boxBorder: #d8d8d8;
50+ --boxBorderLight: #e5e5e5;
51+ --boxHeaderColor: var(--textColor);
52+ --boxHeaderBackground: #f5f5f5;
53+
54+ --noteBackground: #f8f8dd;
55+ --noteBorder: #d3d952;
56+
57+ --noteGreenBackground: #e7f8e1;
58+ --noteGreenBorder: #89da70;
59+
60+ --noteBlueBackground: #d4f3fd;
61+ --noteBlueBorder: #94bbeb;
62+
63+ --noteOrangeBackground: #fbe6d1;
64+ --noteOrangeBorder: #ec8b01;
65+
66+ --noteRedBackground: #fed5d3;
67+ --noteRedBorder: #dc7874;
68+
69+ --labelBackground: #f4f4f4;
70+
71+ --notifBackground: #{rgba(#333, .85)};
72+ --notifBorder: none;
73+
74+ --tipBackground: #{rgba(#fffdcd, .95)};
75+ --tipBorder: 1px solid #e7dca9;
76+}
assets/stylesheets/global/_variables.scss+24βˆ’87
@@ -1,94 +1,31 @@
1βˆ’$baseFont: -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
2βˆ’$monoFont: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
3βˆ’$boldFontWeight: 500;
4βˆ’$bolderFontWeight: 600;
1+html {
2+ --baseFont: -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
3+ --monoFont: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
4+ --boldFontWeight: 500;
5+ --bolderFontWeight: 600;
56
6βˆ’$style: 'light';
7+ --textColorRed: #f44336;
78
8βˆ’$maxWidth: 80rem;
9βˆ’$headerHeight: 3rem;
10βˆ’$sidebarWidth: 20rem;
11βˆ’$sidebarMediumWidth: 16rem;
9+ --splashText: var(--loadingText);
1210
13βˆ’$documentBackground: #f3f3f3;
14βˆ’$contentBackground: #fff;
11+ --selectionText: #fff;
12+ --transparentSelectionText: rgba(255, 255, 255, 0.9);
1513
16βˆ’$externalsBackground: $contentBackground;
14+ --notifColor: #fff;
15+ --notifColorLight: #ccc;
1716
18βˆ’$textColor: #333;
19βˆ’$textColorLight: #666;
20βˆ’$textColorLighter: #888;
21βˆ’$textColorRed: #f44336;
17+ --maxWidth: 80rem;
18+ --headerHeight: 3rem;
19+ --sidebarWidth: 20rem;
20+ --sidebarMediumWidth: 16rem;
2221
23βˆ’$inputFocusBorder: #35b5f4;
22+ --focusBackground: #e5e5e5;
23+ --focusBorder: #d4d4d4;
24+ --focusText: #000;
2425
25βˆ’$focusBackground: #e5e5e5;
26βˆ’$focusBorder: #d4d4d4;
27βˆ’$focusText: #000;
28βˆ’
29βˆ’$loadingText: #ccc;
30βˆ’$splashText: #ccc;
31βˆ’
32βˆ’$selectionBackground: #398df0;
33βˆ’$selectionBorder: #196fc2;
34βˆ’$selectionText: #fff;
35βˆ’
36βˆ’$highlightBackground: #fffdcd;
37βˆ’
38βˆ’$linkColor: #3377c0;
39βˆ’$linkColorHover: #2f6cb6;
40βˆ’$linkTextDecoration: none;
41βˆ’
42βˆ’$headerBackground: #eee;
43βˆ’$headerBorder: #d7d7d7;
44βˆ’
45βˆ’$sidebarBackground: #f9f9f9;
46βˆ’$sidebarBorder: #e1e1e1;
47βˆ’
48βˆ’$scrollbarColor: #ccc;
49βˆ’$scrollbarColorHover: #999;
50βˆ’
51βˆ’$pathBackground: $sidebarBackground;
52βˆ’$pathBorder: $sidebarBorder;
53βˆ’
54βˆ’$noticeBackground: #faf9e2;
55βˆ’$noticeBorder: #e2e2c1;
56βˆ’
57βˆ’$boxBackground: #fafafa;
58βˆ’$boxBorder: #d8d8d8;
59βˆ’$boxBorderLight: #e5e5e5;
60βˆ’$boxHeaderColor: $textColor;
61βˆ’$boxHeaderBackground: #f5f5f5;
62βˆ’
63βˆ’$noteBackground: #f8f8dd;
64βˆ’$noteBorder: #d3d952;
65βˆ’
66βˆ’$noteGreenBackground: #e7f8e1;
67βˆ’$noteGreenBorder: #89da70;
68βˆ’
69βˆ’$noteBlueBackground: #d4f3fd;
70βˆ’$noteBlueBorder: #94bbeb;
71βˆ’
72βˆ’$noteOrangeBackground: #fbe6d1;
73βˆ’$noteOrangeBorder: #ec8b01;
74βˆ’
75βˆ’$noteRedBackground: #fed5d3;
76βˆ’$noteRedBorder: #dc7874;
77βˆ’
78βˆ’$labelBackground: #f4f4f4;
79βˆ’
80βˆ’$notifBackground: rgba(#333, .85);
81βˆ’$notifBorder: none;
82βˆ’$notifColor: #fff;
83βˆ’$notifColorLight: #ccc;
84βˆ’
85βˆ’$tipBackground: rgba(#fffdcd, .95);
86βˆ’$tipBorder: 1px solid #e7dca9;
87βˆ’
88βˆ’$mediumScreen: '(max-width: 800px)';
89βˆ’
90βˆ’$contentZ: 1;
91βˆ’$sidebarZ: 2;
92βˆ’$headerZ: 3;
93βˆ’$noticeZ: 4;
94βˆ’$hoverZ: 5;
26+ --contentZ: 1;
27+ --sidebarZ: 2;
28+ --headerZ: 3;
29+ --noticeZ: 4;
30+ --hoverZ: 5;
31+}
assets/stylesheets/pages/_angularjs.scss+1βˆ’1
@@ -8,7 +8,7 @@ Β· 7 unmodified lines
88 .nav-index-section {
99 margin: 1.5em 0 1em -2em;
1010 list-style: none;
11βˆ’ font-weight: $boldFontWeight;
11+ font-weight: var(--boldFontWeight);
1212 text-transform: capitalize;
1313 }
1414
assets/stylesheets/pages/_async.scss+2βˆ’2
@@ -3,13 +3,13 @@ Β· 2 unmodified lines
33
44 h3 > .type-signature {
55 float: right;
6βˆ’ color: $textColorLight;
6+ color: var(--textColorLight);
77 }
88
99 h3 > .signature-attributes {
1010 font-size: .75rem;
1111 font-weight: normal;
1212 font-style: italic;
13βˆ’ color: $textColorLighter;
13+ color: var(--textColorLighter);
1414 }
1515 }
assets/stylesheets/pages/_bootstrap.scss+1βˆ’1
@@ -4,7 +4,7 @@ Β· 3 unmodified lines
44 h4 > code, h5 > code, strong > code { @extend %label; }
55
66 h2 > small {
7βˆ’ color: $textColorLight;
7+ color: var(--textColorLight);
88 float: right;
99 }
1010
assets/stylesheets/pages/_c.scss+2βˆ’2
@@ -23,7 +23,7 @@ Β· 22 unmodified lines
2323
2424 .t-spar { // language/switch, language/for, etc.
2525 font-style: italic;
26βˆ’ color: $textColorLight;
26+ color: var(--textColorLight);
2727 }
2828 .t-sdsc-nopad dl, .t-sdsc-nopad dd { margin: 0; }
2929
@@ -57,7 +57,7 @@ Β· 27 unmodified lines
5757 margin: 1rem 0;
5858 padding: .375rem;
5959 font-size: .75rem;
60βˆ’ border: 1px solid $boxBorder;
60+ border: 1px solid var(--boxBorder);
6161 border-radius: 2px;
6262 }
6363
assets/stylesheets/pages/_clojure.scss+1βˆ’1
@@ -5,6 +5,6 @@ Β· 4 unmodified lines
55 .type {
66 float: right;
77 font-size: .9em;
8βˆ’ color: $textColorLight;
8+ color: var(--textColorLight);
99 }
1010 }
assets/stylesheets/pages/_d.scss+3βˆ’3
@@ -2,10 +2,10 @@ Β· 1 unmodified line
22 h2 { @extend %block-heading; }
33 h3, .d_decl { @extend %block-label, %label-blue; }
44 .d_decl { @extend %code; }
5βˆ’ .d_decl > small { color: $textColorLight; }
6βˆ’ .d_decl > strong { font-weight: $bolderFontWeight; }
5+ .d_decl > small { color: var(--textColorLight); }
6+ .d_decl > strong { font-weight: var(--bolderFontWeight); }
77
88 p > code, li > code, td > code, dd > code { @extend %label; }
99
10βˆ’ span.red { color: $textColorRed; }
10+ span.red { color: var(--textColorRed); }
1111 }
assets/stylesheets/pages/_dojo.scss+1βˆ’1
@@ -1,5 +1,5 @@
11 ._dojo {
22 @extend %simple;
33
4βˆ’ .jsdoc-inheritance { color: $textColorLight; }
4+ .jsdoc-inheritance { color: var(--textColorLight); }
55 }
assets/stylesheets/pages/_ember.scss+2βˆ’2
@@ -5,7 +5,7 @@ Β· 4 unmodified lines
55
66 h3 > .access {
77 float: right;
8βˆ’ color: $textColorLight;
8+ color: var(--textColorLight);
99 font-weight: normal;
1010 }
1111
@@ -15,6 +15,6 @@ Β· 3 unmodified lines
1515 }
1616
1717 p.github-link {
18βˆ’ color: $textColorLight;
18+ color: var(--textColorLight);
1919 }
2020 }
assets/stylesheets/pages/_erlang.scss+1βˆ’1
@@ -5,5 +5,5 @@ Β· 4 unmodified lines
55 code.code { @extend %label; }
66 .note { @extend %note; }
77 .warning { @extend %note, %note-red; }
8βˆ’ .note .label, .warning .label { font-weight: $boldFontWeight; }
8+ .note .label, .warning .label { font-weight: var(--boldFontWeight); }
99 }
assets/stylesheets/pages/_jquery.scss+2βˆ’2
@@ -32,7 +32,7 @@ Β· 31 unmodified lines
3232
3333 .toc-list {
3434 margin-top: 0;
35βˆ’ font-weight: $boldFontWeight;
35+ font-weight: var(--boldFontWeight);
3636
3737 > li + li { margin-top: 1em; }
3838 > li > ul { font-weight: normal; }
@@ -48,7 +48,7 @@ Β· 9 unmodified lines
4848 .returns,
4949 .option-type {
5050 float: right;
51βˆ’ font-weight: $boldFontWeight;
51+ font-weight: var(--boldFontWeight);
5252 margin-left: 1em;
5353 }
5454
assets/stylesheets/pages/_love.scss+2βˆ’2
@@ -12,6 +12,6 @@ Β· 11 unmodified lines
1212 .smwtable { width: 100%; }
1313 .smwtable td:nth-last-child(2), .smwtable td:last-child { width: 2.5em; }
1414
15βˆ’ .cell-green { background: $noteGreenBackground; }
16βˆ’ .cell-red { background: $noteRedBackground; }
15+ .cell-green { background: var(--noteGreenBackground); }
16+ .cell-red { background: var(--noteRedBackground); }
1717 }
assets/stylesheets/pages/_mdn.scss+3βˆ’3
@@ -7,7 +7,7 @@ Β· 6 unmodified lines
77 > span {
88 display: block;
99 font-size: 1rem;
10βˆ’ font-weight: $boldFontWeight;
10+ font-weight: var(--boldFontWeight);
1111 }
1212
1313 ul, ol {
@@ -42,7 +42,7 @@ Β· 28 unmodified lines
4242 > .note {
4343 em {
4444 font-style: normal;
45βˆ’ font-weight: $boldFontWeight;
45+ font-weight: var(--boldFontWeight);
4646 }
4747
4848 > ul { margin: 1em 0; }
@@ -93,7 +93,7 @@ Β· 44 unmodified lines
9393 dt > strong > code, // HTML element attribute
9494 dl > dt > code { // CSS property value, Javascript function argument
9595 font-family: inherit;
96βˆ’ font-weight: $boldFontWeight;
96+ font-weight: var(--boldFontWeight);
9797 font-size: inherit;
9898 }
9999
assets/stylesheets/pages/_meteor.scss+2βˆ’2
@@ -9,10 +9,10 @@ Β· 8 unmodified lines
99 dt > code { @extend %label; }
1010
1111 .api-heading { overflow: hidden; }
12βˆ’ .api-heading > code { font-weight: $boldFontWeight; }
12+ .api-heading > code { font-weight: var(--boldFontWeight); }
1313 .locus, .src-code { float: right; }
1414 .locus, .type, .src-code { margin-left: .5em; }
1515 h2 .subtext-api { margin-top: .25rem; }
1616 .locus, .subtext-api, .subtext-api > code { font-size: .75rem; }
17βˆ’ .locus, .type { color: $textColorLight; }
17+ .locus, .type { color: var(--textColorLight); }
1818 }
assets/stylesheets/pages/_npm.scss+1βˆ’1
@@ -8,7 +8,7 @@ Β· 7 unmodified lines
88
99 .faint.heading {
1010 font-size: .9em;
11βˆ’ color: $textColorLight;
11+ color: var(--textColorLight);
1212 }
1313
1414 .youtube-video iframe { width: 420px; height: 315px; }
assets/stylesheets/pages/_phalcon.scss+1βˆ’1
@@ -3,6 +3,6 @@ Β· 2 unmodified lines
33
44 h3 > small {
55 float: right;
6βˆ’ color: $textColorLight;
6+ color: var(--textColorLight);
77 }
88 }
assets/stylesheets/pages/_php.scss+2βˆ’2
@@ -13,7 +13,7 @@ Β· 12 unmodified lines
1313
1414 .verinfo {
1515 float: right;
16βˆ’ font-weight: $boldFontWeight;
16+ font-weight: var(--boldFontWeight);
1717 }
1818
1919 .classsynopsis,
@@ -21,7 +21,7 @@ Β· 1 unmodified line
2121 .description > .methodsynopsis,
2222 .description > .fieldsynopsis { @extend %note, %note-blue; }
2323
24βˆ’ .classsynopsisinfo_comment { color: $textColorLight; }
24+ .classsynopsisinfo_comment { color: var(--textColorLight); }
2525
2626 .classsynopsisinfo_comment,
2727 .classsynopsis > .constructorsynopsis,
assets/stylesheets/pages/_postgres.scss+1βˆ’1
@@ -16,7 +16,7 @@ Β· 15 unmodified lines
1616 }
1717
1818 p > code { @extend %label; }
19βˆ’ p.c2 { font-weight: $boldFontWeight; }
19+ p.c2 { font-weight: var(--boldFontWeight); }
2020
2121 .navfooter > table { width: 100%; }
2222 td[align=center] { text-align: center; }
assets/stylesheets/pages/_rdoc.scss+4βˆ’4
@@ -6,7 +6,7 @@ Β· 5 unmodified lines
66 .method-description > h2, h3, h4, h5, h6 { font-size: 1em; }
77
88 .method-heading {
9βˆ’ font-weight: $boldFontWeight;
9+ font-weight: var(--boldFontWeight);
1010 @extend %block-label, %label-blue;
1111
1212 + .method-heading { margin-top: -.5em; }
@@ -22,7 +22,7 @@ Β· 9 unmodified lines
2222 a.method-click-advice {
2323 float: right;
2424 font-size: .75rem;
25βˆ’ color: $linkColor;
25+ color: var(--linkColor);
2626 cursor: pointer;
2727 @extend %user-select-none;
2828
@@ -42,8 +42,8 @@ Β· 13 unmodified lines
4242 top: 0;
4343 left: -1em;
4444 right: 0;
45βˆ’ background: rgba($contentBackground, .95);
46βˆ’ box-shadow: 0 1em 1em 1em $contentBackground;
45+ background: var(--contentBackground);
46+ box-shadow: 0 1em 1em 1em var(--contentBackground);
4747
4848 > pre { margin: 0; }
4949 }
assets/stylesheets/pages/_react_native.scss+1βˆ’1
@@ -2,7 +2,7 @@ Β· 1 unmodified line
22 @extend %simple;
33
44 .deprecated { @extend %note, %note-orange; }
5βˆ’ .deprecatedTitle { font-weight: $boldFontWeight; }
5+ .deprecatedTitle { font-weight: var(--boldFontWeight); }
66
77 span.platform { float: right; }
88 span.propType, span.platform { font-weight: normal; }
assets/stylesheets/pages/_redis.scss+2βˆ’2
@@ -14,7 +14,7 @@ Β· 13 unmodified lines
1414
1515 .args {
1616 font-size: .75rem;
17βˆ’ color: $textColorLight;
17+ color: var(--textColorLight);
1818 }
1919
2020 // Others
@@ -35,7 +35,7 @@ Β· 14 unmodified lines
3535 > .prompt {
3636 float: left;
3737 margin-right: .5em;
38βˆ’ color: $textColorLight;
38+ color: var(--textColorLight);
3939 }
4040
4141 > code {
assets/stylesheets/pages/_rfc.scss+1βˆ’1
@@ -10,6 +10,6 @@ Β· 9 unmodified lines
1010
1111 > h1, > h2, > h3, > h4, > h5 {
1212 margin: 0;
13βˆ’ font-family: $baseFont;
13+ font-family: var(--baseFont);
1414 }
1515 }
assets/stylesheets/pages/_sphinx.scss+2βˆ’2
@@ -14,7 +14,7 @@ Β· 13 unmodified lines
1414
1515 .versionmodified, span.title, .topic-title {
1616 display: block;
17βˆ’ font-weight: $boldFontWeight;
17+ font-weight: var(--boldFontWeight);
1818 }
1919
2020 p > code, li > code, dd > code, .docutils > dt > code { @extend %label; }
@@ -26,7 +26,7 @@ Β· 5 unmodified lines
2626 .admonition-title {
2727 float: left;
2828 margin: 0 .5em 0 0;
29βˆ’ font-weight: $boldFontWeight;
29+ font-weight: var(--boldFontWeight);
3030
3131 &:after { content: ':'; }
3232 }
assets/stylesheets/pages/_sphinx_simple.scss+1βˆ’1
@@ -6,7 +6,7 @@ Β· 5 unmodified lines
66 .admonition.tip { @extend %note-green; }
77 .admonition-title {
88 margin: 0 0 .25rem;
9βˆ’ font-weight: $boldFontWeight;
9+ font-weight: var(--boldFontWeight);
1010 }
1111
1212 code { @extend %label; }
assets/stylesheets/pages/_support_tables.scss+1βˆ’1
@@ -24,7 +24,7 @@ Β· 23 unmodified lines
2424 }
2525
2626 tr.current {
27βˆ’ font-weight: $boldFontWeight;
27+ font-weight: var(--boldFontWeight);
2828 font-size: 1rem;
2929 }
3030
assets/stylesheets/pages/_yard.scss+1βˆ’1
@@ -1,5 +1,5 @@
11 ._yard {
22 @extend %simple;
33
4βˆ’ .tag_title { font-weight: $boldFontWeight; }
4+ .tag_title { font-weight: var(--boldFontWeight); }
55 }
assets/stylesheets/pages/_yii.scss+1βˆ’1
@@ -3,6 +3,6 @@ Β· 2 unmodified lines
33
44 .detail-header-tag, .detailHeaderTag {
55 float: right;
6βˆ’ color: $textColorLight;
6+ color: var(--textColorLight);
77 }
88 }
lib/app.rb+0βˆ’16
@@ -196,7 +196,6 @@ class App < Sinatra::Application Β· 195 unmodified lines
196196 @@manifest_asset_urls ||= [
197197 javascript_path('application', asset_host: false),
198198 stylesheet_path('application'),
199βˆ’ stylesheet_path('application-dark'),
200199 image_path('docs-1.png'),
201200 image_path('docs-1@2x.png'),
202201 image_path('docs-2.png'),
@@ -205,21 +204,6 @@ class App < Sinatra::Application Β· 2 unmodified lines
205204 ]
206205 end
207206
208βˆ’ def main_stylesheet_path
209βˆ’ stylesheet_paths[dark_theme? ? :dark : :default]
210βˆ’ end
211βˆ’
212βˆ’ def alternate_stylesheet_path
213βˆ’ stylesheet_paths[dark_theme? ? :default : :dark]
214βˆ’ end
215βˆ’
216βˆ’ def stylesheet_paths
217βˆ’ @@stylesheet_paths ||= {
218βˆ’ default: stylesheet_path('application'),
219βˆ’ dark: stylesheet_path('application-dark')
220βˆ’ }
221βˆ’ end
222βˆ’
223207 def app_size
224208 @app_size ||= memoized_cookies['size'].nil? ? '20rem' : "#{memoized_cookies['size']}px"
225209 end
views/index.erb+2βˆ’2
@@ -1,5 +1,5 @@
11 <!DOCTYPE html>
2βˆ’<html<%= ' manifest="/manifest.appcache"' if App.production? %> prefix="og: http://ogp.me/ns#" lang="en" class="_booting">
2+<html<%= ' manifest="/manifest.appcache"' if App.production? %> prefix="og: http://ogp.me/ns#" lang="en" class="_booting _theme-<%= app_theme %>">
33 <head>
44 <meta charset="utf-8">
55 <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,shrink-to-fit=no">
@@ -30,7 +30,7 @@ Β· 24 unmodified lines
3030 <link rel="apple-touch-icon" sizes="152x152" href="<%= App.cdn_origin %>/images/apple-icon-152.png">
3131 <link rel="apple-touch-icon" sizes="160x160" href="<%= App.cdn_origin %>/images/apple-icon-160.png">
3232 <link rel="mask-icon" href="<%= App.cdn_origin %>/images/webkit-mask-icon.svg" color="#398df0">
33βˆ’ <link rel="stylesheet" href="<%= main_stylesheet_path %>" data-alt="<%= alternate_stylesheet_path %>">
33+ <%= stylesheet_tag 'application' %>
3434 </head>
3535 <body<%= %( class="#{app_layout}") if app_layout %>>
3636 <noscript class="_fail">DevDocs requires JavaScript to run.</noscript>
views/manifest.erb+1βˆ’1
@@ -1,5 +1,5 @@
11 CACHE MANIFEST
2βˆ’# <%= app_theme %> <%= app_size %> <%= app_layout %>
2+# <%= app_size %> <%= app_layout %>
33
44 CACHE:
55 /
views/other.erb+2βˆ’2
@@ -1,5 +1,5 @@
11 <!DOCTYPE html>
2βˆ’<html lang="en" class="_booting">
2+<html lang="en" class="_booting _theme-<%= app_theme %>">
33 <head>
44 <meta charset="utf-8">
55 <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
@@ -11,7 +11,7 @@ Β· 5 unmodified lines
1111 <link rel="manifest" href="/manifest.json">
1212 <link rel="icon" type="image/x-icon" href="<%= App.cdn_origin %>/favicon.ico">
1313 <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Search DevDocs">
14βˆ’ <link rel="stylesheet" href="<%= main_stylesheet_path %>" data-alt="<%= alternate_stylesheet_path %>">
14+ <%= stylesheet_tag 'application' %>
1515 </head>
1616 <body<%= %( class="#{app_layout}") if app_layout %> data-doc="<%= CGI::escape_html @doc.to_json %>">
1717 <noscript class="_fail">DevDocs requires JavaScript to run.</noscript>