Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

105
Vistas
Modified custom property given back from getPropertyValue in some cases

I found a weired problem when working with custom properties. Definition in css file:

--testprop: /test/01234;

When I access this property by calling

const style = window.getComputedStyle(window.document.body);
const testprop = style.getPropertyValue('--testprop');

the string value of testprop is set to /test/1234.

This means the characters /0 are parsed browser internally to /.

When the custom property is defined like so:

--testprop: '/test/01234';

the javascript access results in a string value of "/test/01234" (something I expect).

Used browser: Chrome Version 97.0.4692.71 (Offizieller Build) (64-Bit)

Do I miss something here? I wouldn't expect the rewriting of /0 in any circumstances.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

In fact this kind of problem is referenced in an existing bug report:

https://bugs.chromium.org/p/chromium/issues/detail?id=661854

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda