Why preprocess_html in template.php works with login page but not in register page?

As title, can’t able to get this working if i change arg(1) to “register”. What i’m getting wrong? function corolla_preprocess_html(&$vars) { if (arg(0) == “user” && arg(1) == “login”) { drupal_add_css(drupal_get_path(‘theme’, ‘corolla’) . ‘/css/betterlogin.css’); } } Drupal version:  Drupal 7.x Source: https://www.drupal.org/taxonomy/term/3/feed

Add css by content type gives me theme error

Really new about D8 At the moment i can able to add css to home page only with this code: corolla.libraries.yml customization: css: theme: styles/css/corolla.custom-layout.page.css: { weight: 200 } corolla.theme function corolla_preprocess_page(&$variables) { if ($variables[‘is_front’]) { $variables[‘#attached’][‘library’][] = ‘corolla/customization’; } } But when i try[…]