0

Is this approach valid in SCSS?

I have a placeholder file. I mean, this way of using the placeholder . and I'm wondering if it's correct to use the placeholders in this way:

In the file:

%display-flex {
    display: flex;
}
%align-items-center {
    align-items: center;
}
%justify-content-center {
    justify-content: center;
}
%justify-content-space-between {
    justify-content: space-between;
}

CSS

.card .item, .Featured-Games .card-top, .Featured-Games .card-top .card-container .header-icons, .Featured-Games .card-top .card-container .header-icons .left-right-icons, .Featured-Games .card-top .card-container .cards, .Featured-Games .card-top .top-container .cards-2, .Featured-Games .card-top .top-container .cards-2 .card-downloads, .Featured-Games .card-top .top-container .cards-2 .card-downloads .card, .Featured-Games .card-top .top-container .cards-2 .card-downloads .card .item ul, .header .container, .header .container .logo-search, .header .container .links-profile, .header .container .links-profile .links, .header .container .links-profile .profile, .header .container .menu {
    display: flex;
}

.card .item, .Featured-Games .card-top .card-container .header-icons, .Featured-Games .card-top .card-container .header-icons .left-right-icons, .Featured-Games .card-top .top-container .cards-2 .card-downloads, .Featured-Games .card-top .top-container .cards-2 .card-downloads .card, .header .container, .header .container .logo-search, .header .container .links-profile, .header .container .links-profile .profile, .header .container .menu {
    align-items: center;
}

.header .container .links-profile .profile, .header .container .menu {
    justify-content: center;
}

.card .item, .Featured-Games .card-top, .Featured-Games .card-top .card-container .header-icons, .header .container, .header .container .logo-search {
    justify-content: space-between;
}

I want to know if this usage of placeholders correct.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131

0 Answers0