Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

163
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!