Apart from the obvious convenience when theming, are there any technical or performance advantages for using block_class over using css to target individual block IDs

Just curious ???

Comments

Soundvessel’s picture

Well from recent experience working with local and multiple staging servers we have had some blocks not have the same IDs between servers. This would allow us to target theming without worrying about these sync issues.

MrPaulDriver’s picture

interesting, I can see the benefits there

autopoietic’s picture

Also I would suggest that if using a grid based theme a configurable block class allows the layout properties of the block to be taken care of by layout classes like 'span5' etc in bootstrap.

feuillet’s picture

And one big advantage is the one CSS classes have in general: you can use them multiple times within the same html document.
Just create a new block, put in your desired class and voila, theming done.
Otherwise you would have to edit the css to match the new CSS ID...

MrPaulDriver’s picture

I've been using this for a few weeks now and it is a big time saver. I'll never go back to targeting individual block IDs. Thanks everyone for the input.

rennevat’s picture

Issue summary: View changes

Wanted to add that this is one our essential Drupal modules. It has also replaced modules that we previously attempted to use to enforce mobile or screen block display. Now we just add the class that defines whether it should be displayed based on screen size and the blocks render flawlessly. A "must have" module.

renatog’s picture

Status: Active » Reviewed & tested by the community
Issue tags: +ciandt-contrib

#3 really make sense.

Thank you very much, guys. Very useful.

renatog’s picture

Status: Reviewed & tested by the community » Fixed

If anyone has any question please comment okay?!

Thank you very much, people.

Regards.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.