I had asked the "block class" module developers (http://drupal.org/project/block_class) if they could get that feature into core. #438394: Add to Drupal 7 Core

Todd Nienkerk, developer of block class said, "Pending a handful of improvements -- namely, the ability to define available block classes from the theme's .info file -- this module may be a candidate for core."

Comments

dvessel’s picture

I don't agree with this. I've certainly abused the .info file in my themes but adding classes seems to hold little value. Who would this help exactly?

jrabeemer’s picture

I hope he can explain his motivations. I suppose there's some technical reason the module needs classes declared in .info. Ideally, any new classes would be strictly created in the GUI along with blocks.

JohnAlbin’s picture

Issue tags: -theming +theme

cleaning up issue tags

ultimateboy’s picture

Just pointing to skinr module which allows this on a more abstracted level. I am not sold on the idea of adding this core just yet.. especially defined in .info

stephthegeek’s picture

We need to not forget the needs of "generic" themers: those creating contrib themes, commercial themes, etc. With changes like:
#453080: Eliminate footer message
#240873: Move custom help settings to blocks
#428800: Convert mission statements to a region with blocks
#503810: Convert primary and secondary menus to blocks

...it is now more difficult for a theme to actually style certain menus, text, messages, and areas of the page to look a certain way, since they're now infinitely positionable by users. This freedom and removing special cases is something I'm very much in support of but we're leaving non-custom themers in the dark without a way to know what's where. The changes in the above issues without the addition of some kind of 'sub-style' system are a bit of a half measure, especially as Drupal tries to gain a better foothold in the design community.

TopNotchThemes is using Skinr for themes going forward and I was actually working on a blog post talking about this very issue. Being less development-inclined, I don't know that I can personally comment on the architectural implications or suggest alternative (to the .info file) implementation options, but we would like to discuss and assist with some such system being considered for core.

RE: #2, A theme itself needs to *provide* the classes, so having them only user-definable in the UI doesn't help much.

jrabeemer’s picture

Themes only provide regions, not blocks. This is about providing a unique class to a block in the GUI.

stephthegeek’s picture

The purpose of the two modules being discussed here are for themes to provide a pre-defined set of classes which can be assigned to blocks. As the title says, this is currently done through the info file. I'm pointing out how this could be a powerful solution when combined with the everything-as-a-block changes that have already gone into core.

sun.core’s picture

Version: 7.x-dev » 8.x-dev
jhedstrom’s picture

Version: 8.0.x-dev » 8.1.x-dev
Issue summary: View changes

Feature -> 8.1.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

joelpittet’s picture

Status: Active » Closed (won't fix)

Doing a bit of triage. This doesn't seem like it would fit well to tie blocks to the theme.info.yml file, they are quite unrelated systems. It may be something you can add to configuration for the blocks in CMI?

Feel free to re-open if you can update the issue summary with a proposal or a patch.