Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: CSS container v. bp_container

@hnla

Participant

How do you mean ‘prefix’? prefixed to each selector or the body/html tags? BP tokenises itself on the body tag already so you can use that.

What you are really having an issue with is specificity and the weight of selectors and that just has to be understood and allowed for also understanding the cascade is important.

While it’s true that where you have plugins or modules – not just in WP land – it is often essential, if they supply required styles, that those are prefixed with a unique name as the author will not be able to account for what other rules might be in play and using the same element names so adding their own unique prefix ensures that clashes can’t occur – ThickBox is a good example where all selectors carry a unique name – adding prefixes to BP rules could just start getting messy and adding file weight, this notion of taking existing themes and attempting to make them BP compatible is a bit of a hack and is often going to produce not hugely favorable code the correct approach tbh would be to start styling from the ground up rather than attempting to mix major stylesheets.

Skip to toolbar