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

171
Vistas
Is there a programmatic way to check whether specific CSS rules are valid or respected by the browser, or it is discarded / less specific?

I am looking for a way in JS to inspect or check current state of CSS rules dynamically at runtime (using browser's reflection feature, possibly) instead of only relying for browser developer's tool to see which rules are "overriden" or filtered. To think an analogy in procedural languages, there's normally a way to check the status or result of each instruction or function that we call (e.g true/false).

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

In other words, I am asking if there is an easy way to implement hypothethical is_valid below.

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
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