angular-auto-complete icon indicating copy to clipboard operation
angular-auto-complete copied to clipboard

CSS is too specific

Open craiggoldstone opened this issue 7 years ago • 1 comments

CSS is too specific, it's overkill. It is enough to simply use classes. Or even better, use BEM.

Current: bad

div.auto-complete-container ul.auto-complete-results li.auto-complete-item {}

Proposal 1: good - remove over-specific css, simply use classes)

.auto-complete-container .auto-complete-results .auto-complete-item {}

Proposal 2: better - remove nested styles, it has no use here)

.auto-complete-container {}
.auto-complete-results {}
.auto-complete-item {}

Proposal 3: best - use BEM naming convention)

.auto-complete {}
.auto-complete__results {}
.auto-complete__item {}

I'm happy to submit a PR if desired

craiggoldstone avatar Oct 05 '18 16:10 craiggoldstone

Yes, please submit a PR with the BEM convention.

vickramravichandran avatar Oct 06 '18 21:10 vickramravichandran