$current_theme from D7 has no equivalent in Drupal 8.
Templates knowing what theme is active is useful when paired with the functionality we see with modules such as Theme Key (https://www.drupal.org/project/themekey), where complex theme switching rules are used. There are also use cases like the front end theme loading a piece of content using the admin theme and vice versa. In these cases markup changes may be desired, but the template needs context to understand how it is being presented.
Add an active_theme twig function.
User interface changes
The new twig function, active_theme.
Beta phase evaluation
|Issue category||Task because we are adding a function to twig that is missing as compared to D7.|
|Issue priority||Major. The parent is Major because this and some related functions that existed in D7 are missing from the theme system in D8. Lack of this particular functionality prevents D7 modules which use it from being ported to D8.|
|Disruption||This should produce little disruption, except to patches on similar issues that are adding twig functions.|
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 95,268 pass(es). View
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 95,255 pass(es). View
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 95,262 pass(es). View