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

174
Views
¿Existe una forma programática de verificar si las reglas CSS específicas son válidas o respetadas por el navegador, o si se descartan o son menos específicas?

Estoy buscando una manera en JS para inspeccionar o verificar el estado actual de las reglas CSS dinámicamente en tiempo de ejecución (usando la función de reflexión del navegador, posiblemente) en lugar de confiar solo en la herramienta del desarrollador del navegador para ver qué reglas están "anuladas" o filtradas. Pensando en una analogía en los lenguajes procedimentales, normalmente hay una forma de verificar el estado o resultado de cada instrucción o función que llamamos (por ejemplo, verdadero/falso).

 .mybutton#submit { color: red; } .mybutton { color: blue; }

En otras palabras, estoy preguntando si hay una manera fácil de implementar is_valid hipotético a continuación.

 var sheet = document.styleSheets[0]; var rules = sheet.cssRules || sheet.rules; is_valid(rules[0]); //True is_valid(rules[1]); //False
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!