Color scheme toolbar button does not apply to code samples
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 58/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- css, typescript
- Área
- documentation, frontend
Línea de trabajo
No se nombran archivos de proyecto ni pruebas. Empieza localizando el selector de esquema de color de la barra de herramientas y los bloques de código de Shiki identificados por data-highlighter="shiki"; sigue cómo se aplican sus variables de tema. La tarea está terminada cuando cambiar de esquema modifica el texto y los fondos de los ejemplos de código para que sigan siendo legibles, incluido el caso mostrado con fondo oscuro.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
There's a color scheme switcher button in the toolbar that I found, but it doesn't do anything to the code samples. I'll use custom CSS to work around it, so not urgent for my use.
Picture - the text in the black box is not legible for me due to black background:
User script to work around
// ==UserScript==
// @name Nushell.sh readable code blocks (LLM-generated)
// @namespace Violentmonkey Scripts
// @version 1.0.0
// @description Force Nushell docs code blocks to use black text on white background
// @match https://www.nushell.sh/*
// @grant none
// ==/UserScript==
(function () {
'use strict';
const STYLE_ID = 'vm-nushell-readable-code-blocks';
function addStyle() {
if (document.getElementById(STYLE_ID)) return;
const style = document.createElement('style');
style.id = STYLE_ID;
style.textContent = `
/* Target Shiki blocks on nushell.sh */
div[data-highlighter="shiki"],
div[data-highlighter="shiki"] pre.shiki,
div[data-highlighter="shiki"] code,
div[data-highlighter="shiki"] span {
color: #000 !important;
background: #fff !important;
}
/* Override Shiki CSS variables used by theme switchers */
div[data-highlighter="shiki"] {
--shiki-light: #000 !important;
--shiki-dark: #000 !important;
--shiki-onedarkpro: #000 !important;
--shiki-light-bg: #fff !important;
--shiki-dark-bg: #fff !important;
--shiki-onedarkpro-bg: #fff !important;
}
div[data-highlighter="shiki"] pre.shiki {
border: 1px solid #ddd !important;
border-radius: 6px !important;
}
`;
document.head.appendChild(style);
}
function fixInlineStyles(root = document) {
const blocks = root.querySelectorAll('div[data-highlighter="shiki"]');
for (const block of blocks) {
block.style.setProperty('--shiki-light', '#000', 'important');
block.style.setProperty('--shiki-dark', '#000', 'important');
block.style.setProperty('--shiki-onedarkpro', '#000', 'important');
block.style.setProperty('--shiki-light-bg', '#fff', 'important');
block.style.setProperty('--shiki-dark-bg', '#fff', 'important');
block.style.setProperty('--shiki-onedarkpro-bg', '#fff', 'important');
const pre = block.querySelector('pre.shiki');
if (pre) {
pre.style.setProperty('color', '#000', 'important');
pre.style.setProperty('background', '#fff', 'important');
}
const nodes = block.querySelectorAll('code, span');
for (const node of nodes) {
node.style.setProperty('color', '#000', 'important');
node.style.setProperty('background', '#fff', 'important');
}
}
}
function init() {
addStyle();
fixInlineStyles();
const observer = new MutationObserver((mutations) => {
for (const mutation of mutations) {
for (const node of mutation.addedNodes) {
if (node.nodeType === 1) {
fixInlineStyles(node);
}
}
}
});
observer.observe(document.documentElement, {
childList: true,
subtree: true,
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init, { once: true });
} else {
init();
}
})();
- Lenguaje dominante
- TypeScript
- Estrellas
- 260
- Forks
- 563
- Merge medio
- 4 h 36 min
- PR fusionados (30 d)
- 16
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nushell/nushell.github.io
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 68/100
nushell/nushell.github.io#2081 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
nushell/nushell.github.io#767 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
nushell/nushell.github.io#2232 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
nushell/nushell.github.io#2194 ·
Los mantenedores suelen responder en 1 día
-
Documentation on type path doesn't match behaviourPosiblemente ocupada @Kissaki la tomó hace 86 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 48/100
nushell/nushell.github.io#2155 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de nushell/nushell.github.io
Issues similares
-
fix(data-lake): wizard source step still previews the local slug, not the server-disambiguated oneAbiertodata-lake
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
enhancement good first issue priority: low size: XS
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Empty label or headline exports the editor hint ("LABEL" / "Headline goes here") into the PNGAbierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
-
Spray wall wizard: Done button on the hold review step sits under the navigation header (iOS)Abiertobug ios mobile priority:P1
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
streamplace/streamplace#1351 ·
Los mantenedores suelen responder en 2 días