Skip to content
Snippets Groups Projects

Use dark mode for code preview if user prefers `prefers-color-scheme: dark`

Closed Stephan Seitz requested to merge seitz/pystencils:dark-mode into master
Compare and
2 files
+ 27
3
Preferences
Compare changes
Files
2
+ 11
1
@@ -176,8 +176,14 @@ def read_config():
('clear_cache_on_start', False),
])
default_highlight_style = OrderedDict([
('light_theme', 'default'),
('dark_theme', 'stata-dark'),
])
default_config = OrderedDict([('compiler', default_compiler_config),
('cache', default_cache_config)])
('cache', default_cache_config),
('highlight_style', default_highlight_style)])
config_path, config_exists = get_configuration_file_path()
config = default_config.copy()
@@ -219,6 +225,10 @@ def get_cache_config():
return _config['cache']
def get_highlight_style_config():
return _config['highlight_style']
def add_or_change_compiler_flags(flags):
if not isinstance(flags, list) and not isinstance(flags, tuple):
flags = [flags]