mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-03 17:24:29 +00:00 
			
		
		
		
	docs: dark/light color/accessibilty pass for generated html docs #21345
This commit is contained in:
		@@ -843,8 +843,14 @@ end
 | 
				
			|||||||
local function gen_css(fname)
 | 
					local function gen_css(fname)
 | 
				
			||||||
  local css = [[
 | 
					  local css = [[
 | 
				
			||||||
    :root {
 | 
					    :root {
 | 
				
			||||||
      --code-color: #008B8B;
 | 
					      --code-color: #004b4b;
 | 
				
			||||||
      --tag-color: gray;
 | 
					      --tag-color: #095943;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    @media (prefers-color-scheme: dark) {
 | 
				
			||||||
 | 
					      :root {
 | 
				
			||||||
 | 
					        --code-color: #00c243;
 | 
				
			||||||
 | 
					        --tag-color: #00b7b7;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    @media (min-width: 40em) {
 | 
					    @media (min-width: 40em) {
 | 
				
			||||||
      .toc {
 | 
					      .toc {
 | 
				
			||||||
@@ -863,11 +869,6 @@ local function gen_css(fname)
 | 
				
			|||||||
        display: block;
 | 
					        display: block;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    @media (prefers-color-scheme: dark) {
 | 
					 | 
				
			||||||
      :root {
 | 
					 | 
				
			||||||
        --code-color: cyan;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    .toc {
 | 
					    .toc {
 | 
				
			||||||
      /* max-width: 12rem; */
 | 
					      /* max-width: 12rem; */
 | 
				
			||||||
      height: 85%;  /* Scroll if there are too many items. https://github.com/neovim/neovim.github.io/issues/297 */
 | 
					      height: 85%;  /* Scroll if there are too many items. https://github.com/neovim/neovim.github.io/issues/297 */
 | 
				
			||||||
@@ -887,7 +888,7 @@ local function gen_css(fname)
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    h1, h2, h3, h4, h5 {
 | 
					    h1, h2, h3, h4, h5 {
 | 
				
			||||||
      font-family: sans-serif;
 | 
					      font-family: sans-serif;
 | 
				
			||||||
      border-bottom: 1px solid #41464bd6; /*rgba(0, 0, 0, .9);*/
 | 
					      border-bottom: 1px solid var(--tag-color); /*rgba(0, 0, 0, .9);*/
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    h3, h4, h5 {
 | 
					    h3, h4, h5 {
 | 
				
			||||||
      border-bottom-style: dashed;
 | 
					      border-bottom-style: dashed;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user