6. %Placeholders: Two ".banner .slogan span" rendered. Is that ok?


#1



I'm doing this https://www.codecademy.com/en/courses/learn-sass/lessons/sustainable-scss/exercises/placeholders?action=lesson_resume&link_content_target=interstitial_lesson


My code works as far as the exercise goes, but I'm not sure if is OK that I get two identical declarations


one:

.banner .slogan span {
  text-align: center;
  vertical-align: middle;
  width: 40%;
  left: 30%;
}

and:

.banner .slogan span {
  position: absolute;
}

Looking at it from a just CSS point of view, those should been mixed in just one selector. Is that ok when working from sass?

Thanks


#2

CSS fully supports dynamic selectors and properties. It's the nature of the cascade and overrides. We can give new properties to a rule set in addition to overriding earlier defined properties. This is the common approach to overriding BootStrap styles, among other base style rules.


#3

I see!

I suppose also since we should control the scss and not the css file, the css is not that important.

thanks


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.