0

I cannot tell what The inherit value does in CSS!

1st Oct 2018, 12:09 AM
Johnny Meyer
Johnny Meyer - avatar
3 odpowiedzi
+ 1
https://www.w3schools.com/cssref/css_inherit.asp To wield inheritance effectively, I think it's important to understand how the cascading part of Cascading Style Sheets works. https://css-tricks.com/specifics-on-css-specificity/ Inheritance is like saying (roughly speaking): There there browser, I know you'll want to use this other style, but I would prefer it if you carried through this one from the parent element instead.
1st Oct 2018, 1:35 AM
Janning⭐
Janning⭐ - avatar
0
Janning⭐ Correct if I got the wrong Interpretation from w3schools, but lets say there was only one paragraph colored and that color was Blue, then I go to color another paragraph in CSS but put p { color: inherit; } it would automatically go to blue. (this is just a yes or no question)
1st Oct 2018, 1:43 AM
Johnny Meyer
Johnny Meyer - avatar
0
lol you already marked your own answer as best? anyway, as before, the answer is it depends on what the parent element's color is and other surrounding circumstances to determine the specificity.
1st Oct 2018, 3:51 AM
Janning⭐
Janning⭐ - avatar