Closed galeyang closed 6 months ago
Is it done? This is Day 1 for me with Dart and I would like to use a light background on DartPad. Dark background is unusable for me, that hurts my eyes. How can I select light background?
Light theme is a must, this should be the default as dark themes can seriously damage your vision !
This issue was opened 2.5 years ago. Is adding light theme support really that difficult?
TLDR: you can use this link.
As @parlough mentioned in #2166, it is possible to use light theme when embedding DartPad using iframe.
You can create local dartpad.html
file and place this code to get light-themed dartpad:
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 0;
}
iframe {
display: block;
border: none;
height: 100vh;
width: 100vw;
}
</style>
</head>
<body>
<iframe src="https://dartpad.dev/embed-dart.html?theme=light"></iframe>
</body>
</html>
I also placed the same file to GitHub Pages, so you just can use this link: https://ivanzoid.github.io/dartpad-light/
The now-live version of DartPad outlined in https://github.com/dart-lang/dart-pad/issues/2808 now has a persistent button in the top menu to switch between light and dark themes. Thanks for all of the feedback and discussion here!
If you have any feedback around the current light and dark modes, please open an issue with specific feedback. Thanks again :D
Thanks! Now, 2 years later, I can finally use that site.
From the user survey, one respondent would like to select the preferable color theme.
We can consider adding an option in the more menu.