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

171
Visualizações
google chrome's 'Copy styles' button using browser's API instead

In Google chrome they have a the copy styles button feature since V77

But can't figure out how to use it using the Browser's API

I have tried getComputedStyle but apparently the result is not what's expected (it has a more styles than needed)

If we compared the result of "Copy styles" available in google chrome dev tools GUI and the browser's getComputedStyle for a any element

After "copy styles" the result would look like this:

-webkit-font-smoothing: antialiased;    
-webkit-text-size-adjust: 100%;    
color: rgba(0,0,0,0.87);     
box-sizing: inherit;    
position: fixed;    
z-index: 1300;  
right: 0;
bottom: 0; 
top: 0; 
left: 0;

While getComputedStyles has a lot more than these styles (a whole lot more)

Where I expect to have another API that can copy css just like the "copy styles" button

about 4 years ago · Juan Pablo Isaza
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