{"id":312190,"date":"2020-06-04T15:18:42","date_gmt":"2020-06-04T22:18:42","guid":{"rendered":"https:\/\/css-tricks.com\/?p=312190"},"modified":"2020-06-04T15:18:43","modified_gmt":"2020-06-04T22:18:43","slug":"understand-why-css-has-no-effect-with-the-inactive-css-rules-indicator-in-firefox-devtools","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/understand-why-css-has-no-effect-with-the-inactive-css-rules-indicator-in-firefox-devtools\/","title":{"rendered":"Understand why CSS has no effect with the Inactive CSS rules indicator in Firefox DevTools"},"content":{"rendered":"\n

It’s useful when DevTools tells you that a declaration is invalid. For example, colr: red;<\/code> isn’t valid because colr<\/code> isn’t a valid property. Likewise color: rd;<\/code> isn’t valid because rd<\/code> isn’t a valid value. For the most part, a browser’s DevTools shows the declaration as crossed out<\/s> with a warning (\"\") icon. It would be nice if they went a step further to tell you which thing was wrong (or both) and suggest likely fixes, but hey, I don’t wanna look a gift horse in the mouth. <\/p>\n\n\n\n

Firefox is starting to go a step further in telling you when certain declarations aren’t valid, not because of a syntax error, but because they don’t meet other<\/em> qualifications. For example, I tossed a grid-column-gap: 1rem<\/code> on a random <p><\/code> and I was told this in a little popup:<\/p>\n\n\n\n

grid-column-gap<\/code> has no effect on this element since it\u2019s not a flex container, a grid container, or a multi-column container.<\/p>

Try adding either display:grid<\/code>, display:flex<\/code>, or columns:2<\/code>. Learn more<\/a><\/p><\/blockquote>\n\n\n\n

Well that’s awful handy. <\/p>\n\n\n\n

Elijah Manor has a blog post<\/a> and video digging into this a bit. <\/p>\n\n\n\n\n\n\n\n