SCSS - change wildcard class with attribute selector

0 votes
1,839 views
added Mar 12, 2021 in SCSS by lcjr First Warrant Officer (11,530 points)
edited Mar 4, 2022 by lcjr

For example, to change all classname of col-md-6, col-md-4, col-md-2, col-6, etc with SCSS 

//utilities
@media (max-width: 767px) {
	[class*='col-'] {
		padding-right: 10px;
		padding-left: 10px;
	}
}

 

1 Response

0 votes
responded Jun 10, 2022 by lcjr First Warrant Officer (11,530 points)
for class="css-s1cijg-FPContainer e1nk1prn0"

[class*='FPContainer'] {
  // padding-right: 10px;
  // padding-left: 10px;
  max-width: 700px;
}

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...