A place to cache linked articles (think custom and personal wayback machine)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 28KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <!doctype html><!-- This is a valid HTML5 document. -->
  2. <!-- Screen readers, SEO, extensions and so on. -->
  3. <html lang="en">
  4. <!-- Has to be within the first 1024 bytes, hence before the `title` element
  5. See: https://www.w3.org/TR/2012/CR-html5-20121217/document-metadata.html#charset -->
  6. <meta charset="utf-8">
  7. <!-- Why no `X-UA-Compatible` meta: https://stackoverflow.com/a/6771584 -->
  8. <!-- The viewport meta is quite crowded and we are responsible for that.
  9. See: https://codepen.io/tigt/post/meta-viewport-for-2015 -->
  10. <meta name="viewport" content="width=device-width,initial-scale=1">
  11. <!-- Required to make a valid HTML5 document. -->
  12. <title>Deep Democracy - IAPOP (archive) — David Larlet</title>
  13. <meta name="description" content="Publication mise en cache pour en conserver une trace.">
  14. <!-- That good ol' feed, subscribe :). -->
  15. <link rel="alternate" type="application/atom+xml" title="Feed" href="/david/log/">
  16. <!-- Generated from https://realfavicongenerator.net/ such a mess. -->
  17. <link rel="apple-touch-icon" sizes="180x180" href="/static/david/icons2/apple-touch-icon.png">
  18. <link rel="icon" type="image/png" sizes="32x32" href="/static/david/icons2/favicon-32x32.png">
  19. <link rel="icon" type="image/png" sizes="16x16" href="/static/david/icons2/favicon-16x16.png">
  20. <link rel="manifest" href="/static/david/icons2/site.webmanifest">
  21. <link rel="mask-icon" href="/static/david/icons2/safari-pinned-tab.svg" color="#07486c">
  22. <link rel="shortcut icon" href="/static/david/icons2/favicon.ico">
  23. <meta name="msapplication-TileColor" content="#f7f7f7">
  24. <meta name="msapplication-config" content="/static/david/icons2/browserconfig.xml">
  25. <meta name="theme-color" content="#f7f7f7" media="(prefers-color-scheme: light)">
  26. <meta name="theme-color" content="#272727" media="(prefers-color-scheme: dark)">
  27. <!-- Is that even respected? Retrospectively? What a shAItshow…
  28. https://neil-clarke.com/block-the-bots-that-feed-ai-models-by-scraping-your-website/ -->
  29. <meta name="robots" content="noai, noimageai">
  30. <!-- Documented, feel free to shoot an email. -->
  31. <link rel="stylesheet" href="/static/david/css/style_2021-01-20.css">
  32. <!-- See https://www.zachleat.com/web/comprehensive-webfonts/ for the trade-off. -->
  33. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  34. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  35. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  36. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  37. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  38. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  39. <script>
  40. function toggleTheme(themeName) {
  41. document.documentElement.classList.toggle(
  42. 'forced-dark',
  43. themeName === 'dark'
  44. )
  45. document.documentElement.classList.toggle(
  46. 'forced-light',
  47. themeName === 'light'
  48. )
  49. }
  50. const selectedTheme = localStorage.getItem('theme')
  51. if (selectedTheme !== 'undefined') {
  52. toggleTheme(selectedTheme)
  53. }
  54. </script>
  55. <meta name="robots" content="noindex, nofollow">
  56. <meta content="origin-when-cross-origin" name="referrer">
  57. <!-- Canonical URL for SEO purposes -->
  58. <link rel="canonical" href="https://iapop.com/deep-democracy/">
  59. <body class="remarkdown h1-underline h2-underline h3-underline em-underscore hr-center ul-star pre-tick" data-instant-intensity="viewport-all">
  60. <article>
  61. <header>
  62. <h1>Deep Democracy - IAPOP</h1>
  63. </header>
  64. <nav>
  65. <p class="center">
  66. <a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
  67. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-home"></use>
  68. </svg> Accueil</a> •
  69. <a href="https://iapop.com/deep-democracy/" title="Lien vers le contenu original">Source originale</a>
  70. <br>
  71. Mis en cache le 2024-01-31
  72. </p>
  73. </nav>
  74. <hr>
  75. <h3>Definition of Deep Democracy</h3>
  76. <p>The concept of Deep Democracy was developed by Arnold Mindell. It is defined as an attitude and a principle.</p>
  77. <p class="quote">Attitude: Deep Democracy is an attitude that focuses on the awareness of voices that are both central and marginal. This type of awareness can be focused on groups, organizations, one’s own inner experiences, people in conflict, etc. Allowing oneself to take seriously seemingly unimportant events and feelings can often bring unexpected solutions to both group and inner conflicts.</p>
  78. <p class="quote">Principle: Unlike “classical” democracy, which focuses on majority rule, Deep Democracy suggests that all voices, states of awareness, and frameworks of reality are important. Deep Democracy also suggests that the information carried within these voices, awarenesses, and frameworks are all needed to understand the complete process of the system. The meaning of this information appears, when the various frameworks and voices are relating to each other. Deep Democracy is a process of relationship, not a state-oriented still picture, or a set of policies.</p>
  79. <p>From Deep Democracy principle and attitude, Glossary: [1]</p>
  80. <h3>A Brief History of Deep Democracy</h3>
  81. <p>Deep Democracy is a psycho-social-political paradigm and methodology. The term Deep Democracy was developed by Arny Mindell in 1988 and first appeared in Leader as Martial Artist (Mindell, 1992). Mindell, a physicist and Jungian Analyst had researched and written extensively on how awareness creates reality and how we perceive it on different levels, creating different frameworks of reality. An example for this is how we perceive time: the measurable reality of the seconds ticking in a clock, the dreamlike “subjective” perception of time as it passes during an encounter with a lover, and the sentient essence of timelessness as we catch the moment of a sunrise that goes beyond time as we know it and replaces, for a moment, the concept of future with hope. Mindell calls his paradigm Processwork, which formulates these principles and demonstrates how they can be used in psychotherapy in many of his books. In the late eighties he started to formulate them as a political principle that he called Deep Democracy. Unlike “classical” democracy, which focuses on majority rule, Deep Democracy suggests that all voices, states of awareness, and frameworks of reality are important. Deep Democracy also suggests that the information carried within these voices, awarenesses, and frameworks are all needed to understand the complete process of the system. Deep Democracy is an attitude that focuses on the awareness of voices that are both central and marginal.</p>
  82. <p>
  83. </p>
  84. <div class="ngg-gallery-singlepic-image ngg-left">
  85. <a href="https://iapop.com/wp-content/gallery/admin/crdlse300.gif" title="" data-src="https://iapop.com/wp-content/gallery/admin/crdlse300.gif" data-thumbnail="https://iapop.com/wp-content/gallery/admin/thumbs/thumbs_crdlse300.gif" data-image-id="26" data-title="CR DL SE outlines" data-description="" target="_self" class="shutterset_f8297252056becfbf675efe5c4f6b8f7">
  86. <img class="ngg-singlepic" src="https://iapop.com/wp-content/gallery/admin/cache/crdlse300.gif-nggid0226-ngg0dyn-0x0x100-00f0w010c010r110f110r010t010.gif" alt="CR DL SE outlines" title="CR DL SE outlines">
  87. </a>
  88. </div>
  89. <p>
  90. This type of awareness can be focused on groups, organizations, one’s own inner experiences, people in conflict, etc. Allowing oneself to take seriously seemingly unimportant events and feelings can often bring unexpected solutions to both group and inner conflicts.
  91. </p>
  92. <p>Although the term and the concepts of Deep Democracy are now being used by various groups in different ways they have a common denominator that Mindell describes so well: An experience of Deep Democracy as a process of flow in which all actors on the stage are needed to create the play that we are watching.</p>
  93. <p>Numerous attempts to implement Deep Democracy are occurring simultaneously throughout the world. Just as conventional democracy strives to include all people in a political process, Deep Democracy furthers this by striving to foster a deeper level of dialogue and inclusivity that is open to including not only all people in the sense of the right to vote but is also open to allowing space for various and competing views, tensions, feelings, and styles of communication in a way that supports awareness of relative rank, power, and privilege and the ways in which these tend to marginalize various views, individuals, and groups.</p>
  94. <p class="quote">Deep Democracy is our sense that the world is here to help us to become our entire selves, and that we are here to help the world to become whole (Mindell, 1992).</p>
  95. <h3>Roots of Democracy</h3>
  96. <p class="quote">de•moc• ra•cy (di mak’re se) n. [Gr demokratia &lt; demos, the people + kratein, to rule &lt; kratos, strength] 1 government in which the people hold the ruling power either directly or through elected representatives 2 a country, state, etc. with such government 3 majority rule 4 the principle of equality of rights, opportunity, and treatment 5 the common people, esp. as the wielders of political power. (Webster’s, 1983, p. 366)</p>
  97. <p class="quote">We have frequently printed the word Democracy, yet I cannot too often repeat that it is a word the real gist of which still sleeps, quite unawakened, notwithstanding the resonance and the many angry tempests out of which its syllables have come, from pen or tongue. It is a great word, whose history, I suppose, remains unwritten, because that history has yet to be enacted. -Walt Whitman, Democratic Vistas, 1871</p>
  98. <p>Democracy—commonly defined as the free and equal right of every person to participate in a system of government, often practiced by electing representatives of the people—is generally said to have originated in Ancient Greece when the demos organized against their leaders’ abuse of power. But democracy is more than a body of laws and procedures related to the sharing of power. President Carter said that, “Democracy is like the experience of life itself—always changing, infinite in its variety, sometimes turbulent and all the more valuable for having been tested for adversity” (Carter, 1978). How is democracy like life? In what dimensions is it changing and turbulent?</p>
  99. <p>One example of the dynamic turbulence of democracy in the United States is the evolution of freedom of the press and the practical application of the First Amendment rights to free speech. The first American newspaper, Publick Occurrences, Both Foreign and Domestic (Massachusetts Historical Society, 2004), published its first and only issue in Boston on Thursday, September 25th, 1690. Publication was stopped by the governor of Boston who objected to the paper’s negative tone regarding British rule and by the local ministries who were offended by a report that the King of France had had an affair with his son’s wife (Virtual Museum of Printing, 2004).</p>
  100. <h3>A Brief History of Free Speech in the US and its Relationship to Deep Democracy</h3>
  101. <p>For social activists, free speech and the freedom of the press were key issues to fight for. Deep democracy however is a principle that tries to include all experiences. If you speak freely about a political opponent, and bring out your opinion, and marginalize the part in you that realizes that your opponent is also a person and has many dimensions, you have censored yourself and have not used a deeper freedom of speech. Free speech and the freedom of press are important, but without Deep Democracy, they can become an abusive and tyrannical force, that is not relating to the emotional and social realities and total experiences of the people they are reporting about.</p>
  102. <p>Up until 1919 free speech and freedom of the press in the United States meant “little more than no prior restraint, that is, one could say what one wanted, but then could be prosecuted for it” (Holmes, 1919). There was no protection for the dissemination of ideas. In 1859 John Stuart Mill pointed out the risks involved in suppressing ideas in his essay, On Liberty:</p>
  103. <p class="quote">But the peculiar evil of silencing the expression of an opinion is, that it is robbing the human race; posterity as well as the existing generation; those who dissent from the opinion, still more than those who hold it. If the opinion is right, they are deprived of the opportunity of exchanging error for truth: if wrong, they lose, what is almost as great a benefit, the clearer perception and livelier impression of truth, produced by its collision with error. (1859)</p>
  104. <p>Despite Mill’s impassioned plea and the wide distribution of On Liberty—which had great impact on the public discourse of the its day as well as on the course of political philosophy since—the US maintained a very conservative view towards freedom of speech until 1919.</p>
  105. <p>That view changed abruptly in 1919 when Supreme Court Judge Oliver Wendell Holmes entered a dissenting opinion in favor of a group of radical pamphleteers:</p>
  106. <p class="quote">Jacob Abrams and others had been convicted of distributing pamphlets criticizing the Wilson administration for sending troops to Russia in the summer of 1918. Although the government could not prove that the pamphlets had actually hindered the operation of the military, an anti-radical lower court judge had found that they might have done so, and found Abrams and his co-defendants guilty. On appeal, seven members of the Supreme Court had used Holmes’s “clear and present danger” test to sustain the conviction. But Holmes, joined by Louis D. Brandeis, dissented, and it is this dissent that is widely recognized as the starting point in modern judicial concern for free expression. (US Department of State, 1919)</p>
  107. <p>Abrams’ publications seem almost benign by today’s standards: “Workers—Wake Up. . . . Woe unto those who will be in the way of progress. Let solidarity live. . . . German militarism combined with allied capitalism to crush the Russian revolution. . .” and spoke of working class enlightenment (US Department of State, 1919).</p>
  108. <p>Justice Holmes ruled in their defense that:</p>
  109. <p class="quote">It is only the present danger of immediate evil or an intent to bring it about that warrants Congress in setting a limit to the expression of opinion where private rights are not concerned. Congress certainly cannot forbid all effort to change the mind of the country. (Holmes, 1919)</p>
  110. <p>In the discussion of free speech, we often marginalize the need for relationship between the parties. Public dialogue allows reaction to what is going on. Both parties, those who champion for free speech and those who champion for limitations in the interests of public safety, need to relate more to each other and learn to understand the visions and ideals that are behind those opinions. In a deeply democratic society, this is considered more sustainable then a seesaw process of forbidding and allowing the publication of certain texts.</p>
  111. <p>In his ruling Justice Holmes supported the importance of public discourse and freedom of speech with these now widely quoted words: “The best test of truth is the power of the thought to get itself accepted in the competition of the market” (Holmes, 1919). But, after more than twenty-five centuries of development in political philosophy, it is only within the last century that US and European thought has begun to support freedom of speech in a meaningful way. Holmes’s thinking didn’t account for structural forces that tend to repress various ideas in support of special interests.</p>
  112. <p>Joseph Stiglitz, former Chairman of Council of Economic Advisers under President Clinton and former Chief Economist and Senior VP of the World Bank maintains:</p>
  113. <p class="quote">Secrecy . . . undermines democracy. There can be democratic accountability only if those to whom these public institutions are supposed to be accountable are well informed about what they are doing—including what choices they confronted and how those decisions were made. (Stiglitz, 2003, p. 229)</p>
  114. <h3>Evolution of Deep Democracy</h3>
  115. <p class="quote">The most fundamental forum is your own heart. Both as a facilitator and as a human being, you must learn to hear yourself there. Arnold Mindell, “Sitting in the Fire”, 1995</p>
  116. <p>Deep Democracy threatens to press the envelope of political thinking even further. Deep democracy has many aspects, many of which relate to philosophical concepts derived from quantum physics. Deep Democracy at its deepest manifestation refers to an openness towards not only the views of other people and groups, but Deep Democracy also embraces an openness to emotions and personal experiences, which tend to get excluded from conflict and rational public discourse (Mindell, 1992). As R. Buckminster Fuller (1981) said, we need to support the intuitive wisdom and comprehensive informedness of each and every individual to ensure our continued fitness for survival as a species.<br>
  117. Deep Democracy has crossed over into many fields and has been picked up by many authors, some using it as defined by Mindell, some use only particular aspects of it, as it is often the case with crossovers. For example, speaking in a circle of women who gathered shortly after 9-11, Susan Collin Marks, of Search for Common Ground, the world’s largest international conflict NGO, said:</p>
  118. <p class="quote">We need to accommodate the different groups and not have a win-lose [situation] where the winner takes all. In South Africa—having been under apartheid fifty years, and before that under all sorts of authoritarian rule, the British, the Dutch—when we came to our transition we asked ourselves, “What is democracy, what does it mean, what does it mean for us?” A group of people went around the country asking, “What do you think democracy is, and what are we going to call it, and what will our democracy look like?” They came up with the term “deep democracy.” They said, “For us, this is about deep democracy, not just about surface democracy.” (Peace X Peace, 2004)</p>
  119. <p>She intuited a need for a system that is awareness based and not based on social power distribution only. If you follow the Black Economic Empowerment Movement in South Africa, this need for dialogue and bringing in different frames for references, discussing different values of what the core of our life is and how we feel about it each other is crucial. If we address the power issues and financial realities of the Middle Eastern conflict and create a political solution, it cannot be sustainable without addressing the Deep Democracy aspects, the feelings of hate and vengeance, the hope for a peaceful life together, and the despair of not having found the acceptance and love that you hoped for.</p>
  120. <div class="ngg-gallery-singlepic-image ngg-right">
  121. <a href="https://iapop.com/wp-content/gallery/admin/super200.gif" title="" data-src="https://iapop.com/wp-content/gallery/admin/super200.gif" data-thumbnail="https://iapop.com/wp-content/gallery/admin/thumbs/thumbs_super200.gif" data-image-id="27" data-title="super200" data-description="" target="_self" class="shutterset_818e752240c0a8313694be806ff94a8b">
  122. <img class="ngg-singlepic" src="https://iapop.com/wp-content/gallery/admin/cache/super200.gif-nggid0227-ngg0dyn-0x0x100-00f0w010c010r110f110r010t010.gif" alt="super200" title="super200">
  123. </a>
  124. </div>
  125. <p>The idea of supporting a deeper dialogue has been around at least since Plato argued for the inclusion of women in public discourse. Athens needed the intelligence of all and couldn’t afford not to accept women as thinkers and leaders. Even if Plato didn’t expand his thinking enough to extend that acceptance to slaves, other races, and other than the upper classes of women, he planted a cultural seed that needed another twenty-five hundred years to sprout and is only now coming to fruition in culturally creative ways.</p>
  126. <p>Governmental facilitation of protest is challenging because political and bureaucratic inertia prevents it from being open to change from the outside. Suppression of peaceful protest in the name of order invites repression while unrestrained protest invites anarchy. The challenge then is one of balance: to defend the right to freedom of speech and assembly while maintaining public order and countering attempts at intimidation or violence.</p>
  127. <p>This is a difficult balance to maintain. Ultimately, it depends on the commitment of those in power to maintaining the institutions of democracy and the precepts of individual rights as well as the commitment of the mainstream to support these efforts and the commitment of the marginalized groups to self-limit their forms of protest. A US government publication called What is Democracy maintains that, “Democratic societies are capable of enduring the most bitter disagreement among its citizens—except for disagreement about the legitimacy of democracy itself” (US Department of State, 2004). The symbiotic connection between democracy and human development is an aspect of Deep Democracy.</p>
  128. <p>One of the primary concerns of Deep Democracy is the use, maintenance, and awareness of metaskills (Arnold Mindell, 1992, p. 49). The concept of openness to diversity and dialogue between various views doesn’t mean that the facilitator is a pushover—that is only one metaskill (although it often reflects a lack of awareness). Facilitators must also at times practice, embody, and express other metaskills such as toughness, anger, intractability, love, detachment, concern for the well being of the others, and a genuine desire to achieve consensus. Some of the metaskills in that list are organic responses. However, when a facilitator uses her internal organic responses to better inform her intervention, that is a metaskill. This is the reason why the human development—the internal psychological and spiritual growth and inner peace—of the facilitator is so important.</p>
  129. <p>Deep Democracy involves not only openness to other individuals, groups, and diverse views but an openness to experience; which includes feelings, dreams, body symptoms, altered states of consciousness, synchronicities, and an awareness of signals, roles, and the structural dynamics of the interactions between the parties involved.<br>
  130. Repression and exploitation are the two most basic modern forms of structural violence; cardiovascular diseases and cancer are the two basic somatic conditions brought on by modernization. Repression and cardiovascular diseases are similar in that both impede circulation. Exploitation and cancer resemble each other in that a part of the social or human organism lives at the expense of the rest. Peace research and health research are metaphors for each other; each can learn from the other. Similarly, both peace theory and medical science emphasize the role of consciousness and mobilization in healing.</p>
  131. <p>The relationship between somatic experience, altered states of consciousness, and conflict may not be only metaphorical. Ikeda says that Buddhism (and other spiritual traditions) “transcends the dimension on which all phenomena are perceived as interrelated and reveals the dynamism of the universal life on which all interrelations depend.” Similarly, Process Oriented Psychology (also known as Process Work) and its Worldwork theories and practice use experiential phenomena to reveal the deeper underlying universal dynamic and its interrelations on a practical level.</p>
  132. </article>
  133. <hr>
  134. <footer>
  135. <p>
  136. <a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
  137. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-home"></use>
  138. </svg> Accueil</a> •
  139. <a href="/david/log/" title="Accès au flux RSS"><svg class="icon icon-rss2">
  140. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-rss2"></use>
  141. </svg> Suivre</a> •
  142. <a href="http://larlet.com" title="Go to my English profile" data-instant><svg class="icon icon-user-tie">
  143. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-user-tie"></use>
  144. </svg> Pro</a> •
  145. <a href="mailto:david%40larlet.fr" title="Envoyer un courriel"><svg class="icon icon-mail">
  146. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-mail"></use>
  147. </svg> Email</a> •
  148. <abbr class="nowrap" title="Hébergeur : Alwaysdata, 62 rue Tiquetonne 75002 Paris, +33184162340"><svg class="icon icon-hammer2">
  149. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-hammer2"></use>
  150. </svg> Légal</abbr>
  151. </p>
  152. <template id="theme-selector">
  153. <form>
  154. <fieldset>
  155. <legend><svg class="icon icon-brightness-contrast">
  156. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-brightness-contrast"></use>
  157. </svg> Thème</legend>
  158. <label>
  159. <input type="radio" value="auto" name="chosen-color-scheme" checked> Auto
  160. </label>
  161. <label>
  162. <input type="radio" value="dark" name="chosen-color-scheme"> Foncé
  163. </label>
  164. <label>
  165. <input type="radio" value="light" name="chosen-color-scheme"> Clair
  166. </label>
  167. </fieldset>
  168. </form>
  169. </template>
  170. </footer>
  171. <script src="/static/david/js/instantpage-5.1.0.min.js" type="module"></script>
  172. <script>
  173. function loadThemeForm(templateName) {
  174. const themeSelectorTemplate = document.querySelector(templateName)
  175. const form = themeSelectorTemplate.content.firstElementChild
  176. themeSelectorTemplate.replaceWith(form)
  177. form.addEventListener('change', (e) => {
  178. const chosenColorScheme = e.target.value
  179. localStorage.setItem('theme', chosenColorScheme)
  180. toggleTheme(chosenColorScheme)
  181. })
  182. const selectedTheme = localStorage.getItem('theme')
  183. if (selectedTheme && selectedTheme !== 'undefined') {
  184. form.querySelector(`[value="${selectedTheme}"]`).checked = true
  185. }
  186. }
  187. const prefersColorSchemeDark = '(prefers-color-scheme: dark)'
  188. window.addEventListener('load', () => {
  189. let hasDarkRules = false
  190. for (const styleSheet of Array.from(document.styleSheets)) {
  191. let mediaRules = []
  192. for (const cssRule of styleSheet.cssRules) {
  193. if (cssRule.type !== CSSRule.MEDIA_RULE) {
  194. continue
  195. }
  196. // WARNING: Safari does not have/supports `conditionText`.
  197. if (cssRule.conditionText) {
  198. if (cssRule.conditionText !== prefersColorSchemeDark) {
  199. continue
  200. }
  201. } else {
  202. if (cssRule.cssText.startsWith(prefersColorSchemeDark)) {
  203. continue
  204. }
  205. }
  206. mediaRules = mediaRules.concat(Array.from(cssRule.cssRules))
  207. }
  208. // WARNING: do not try to insert a Rule to a styleSheet you are
  209. // currently iterating on, otherwise the browser will be stuck
  210. // in a infinite loop…
  211. for (const mediaRule of mediaRules) {
  212. styleSheet.insertRule(mediaRule.cssText)
  213. hasDarkRules = true
  214. }
  215. }
  216. if (hasDarkRules) {
  217. loadThemeForm('#theme-selector')
  218. }
  219. })
  220. </script>
  221. </body>
  222. </html>