A front-end developer from Mar del Plata, Argentina. Passionate about CSS, accessibility, and JS. Currently working on "just a small fix", as I've been doing for the last 15 years.
You can with a rule such as "color: red". The color is going to be red, unless overwritten in a high-specificity selector or something that takes priority on the cascade.
But how about something like "flex-basis: 200px"... that doesn't tell you anything on its own. Doesn't even tell you if it's width or height, as it would depend on the flex-direction. Doesn't really tell you how big it's going to be, as that would depend on the siblings' flex-basis, their flex shrink and flex grow values, the container width, the margin, padding and box-sizing, etc
Actually, it doesn't even tell you if it's going to do anything at all, as that depends on whether the parent is a flex container or not.
Yeah, now I do understand what you mean by CSS being extremely dependent on context. Now you saying that, it dawns on me that every single property could have the potential of not working if the html elements have inline-styles to it. Thank you for going out of your way and truly explaining this to me
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You can with a rule such as "color: red". The color is going to be red, unless overwritten in a high-specificity selector or something that takes priority on the cascade.
But how about something like "flex-basis: 200px"... that doesn't tell you anything on its own. Doesn't even tell you if it's width or height, as it would depend on the flex-direction. Doesn't really tell you how big it's going to be, as that would depend on the siblings' flex-basis, their flex shrink and flex grow values, the container width, the margin, padding and box-sizing, etc
Actually, it doesn't even tell you if it's going to do anything at all, as that depends on whether the parent is a flex container or not.
Yeah, now I do understand what you mean by CSS being extremely dependent on context. Now you saying that, it dawns on me that every single property could have the potential of not working if the html elements have inline-styles to it. Thank you for going out of your way and truly explaining this to me