-2

Is there is any CSS selector that allows me to select elements that have a specific property, for example a red color?

  • 2
    Please post a code snippet for your example. Please read: [How to create a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) – disinfor May 15 '19 at 20:04
  • https://www.w3schools.com/css/css_attribute_selectors.asp... i.e p[color='red'] – bloo May 15 '19 at 20:07
  • 3
    There are no selector that matches CSS properties. https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors. If you mean HTML ATTRIBUTES, that's different and you have the attribute selectors – arieljuod May 15 '19 at 20:07
  • https://stackoverflow.com/questions/282198/selecting-elements-with-a-certain-background-color...This might help you. – Aditya Jangid May 15 '19 at 20:09
  • 1
    no there is not. – Temani Afif May 15 '19 at 20:15

1 Answers1

0

You can use Javascript or Jquery

Example:

if(document.getElementById("yourID").style.color=="#ffffff"){
   return true;
}
#or Jquery
$("p").css("color");
Hitnux
  • 314
  • 2
  • 4