Problem/Motivation

We have moved classes from preprocess to templates here #2322163: [meta] Consensus Banana Phase 1, move CSS classes from preprocess to twig templates.. I think it would be good idea to keep heading towards the same target; having as many classes defined in the templates as possible. Place where I think we have most of the classes coming outside of template is render elements.

Proposed resolution

Move classes from render elements to templates. Other attributes can stay in the render elements and are not being touched by this issue.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

lauriii created an issue. See original summary.

lauriii’s picture

Issue tags: +Twig, +classy, +banana
Cottser’s picture

Off by one error on the component?

In general +1 to this. We may want to think about introducing theme_context to do this properly - to still pass relevant info to the templates.

davidhernandez’s picture

We'll likely need to add them back in Stable using preprocess for BC, but otherwise this seems fine.

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.

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

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

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.