How does Chrome categorize CSS rules? [duplicate] - css

This question already has answers here:
What does it mean when a CSS rule is grayed out in Chrome's element inspector?
(8 answers)
Closed 7 years ago.
The Chrome web inspector has atleast 3 ways of showing CSS rules.
Normal, normal with a line through, and opaque. Here is a picture of the 3.

If I remember correctly I believe that means its inherited from a parent element. Strikethrough means it was overridden by another style.

Related

Why chrome devtools showing this?Body color is not working [duplicate]

This question already has answers here:
How do I prevent my style from being overridden another style on a surrounding div?
(6 answers)
Closed 1 year ago.
why body color is not working?
and i am seeing this in devtools . the problem is marked on the picture.
i got the solution . just written this as base a{color:red}
This is no bug. The body color is overwritten by something else, as wOxxOm pointed out. You might wanna take a look at this Q&A.
Either you use the !important attribute in your CSS or give the specific part you want colored a more specific selector. The CSS styles priorities decline from specific to general.

Get first and second element satisfying a CSS path [duplicate]

This question already has answers here:
How to get an 'nth-of-type' in Selenium
(2 answers)
Closed 3 years ago.
Let's say I have a CSS path:
.event__participant.event__participant--away
How can I get the first element satisfying that path? Or second element? Or X element? I'm using selenium and I don't want to be getting all 100+ of them. :nth-type-of doesn't work and I can't use nth-child because it has more children than just .event__participant--away.
Based on the css provided at the top in your original post the css in your script should be
Driver.FindElementsByCssSelector(".event__participant.event__participant--home:nth-of-type(1)")

CSS: selecting an element only if it contains a specific element [duplicate]

This question already has answers here:
Is there a CSS parent selector?
(33 answers)
Closed 9 years ago.
I am creating a print stylesheet and would like to hide all figure tags only if that tag contains an iframe, which happen to be embedded YouTube videos. If the figure tag contains anything else (i.e. an img), I want the tag and its contents to still be shown on the printed page.
I know that I could simply apply a class of "video", for example, to my figure tag where appropriate, but I want to see if there is a way to accomplish this via CSS without resorting to adding classes throughout my site. Also, even though I know they exist, I am not looking for a jQuery solution.
Thank you!
You are looking for a parent selector
CSS3 has none, but CSS4 has one that is like selecting using $.
Here are some similar questions with similar results:
Is there a CSS parent selector?
CSS Parent/Ancestor Selector
Complex CSS selector for parent of active child

Controlling browser tooltip(title) in html [duplicate]

This question already exists:
Closed 10 years ago.
Possible Duplicate:
Styling native tooltip from title=“Tooltip text”
Is any way to control browser tooltip in CSS.
like adjust height and width .. something
-spk-
Not for the built in tooltips with title, no.
You can create tooltip-like constructs of your own, though, by using a div (or anything) that is hidden until the user hovers over your element. See the :hover pseudo-class.

Styling scroll bars with CSS [duplicate]

This question already has answers here:
CSS customized scroll bar in div
(20 answers)
Closed 7 years ago.
I tried searching online but I didn't find any good sources on this. Is there a way to style scroll bars with pure CSS so that it is compatible with a maximum number of browsers?
You can style scrollbars in Internet Explorer and Webkit only.
Note that these are not standard properties.
However, you can achieve this with JavaScript. One project that does this is jScrollPane.
Adding my 2 pence a little late, but if you really want to style them I would suggest trying http://jscrollpane.kelvinluck.com/. It's not a pure CSS solution like you are looking for but is a solution of sorts.

Resources