Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

106
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda