Trying to add CSS to certain pages using a custom module in 7.x I tried following the instructions here: How to override some admin theme CSS rules? and have spent a lot of time and energy googling and iterating this, so I'm turning to the stack exchange community for help. 

What I'm trying to do is make some text fields larger when a user tries to edit a page. I'm attempting to do this by writing a custom module that checks if the page's url contains the string edit, and if so, enabling the custom css. The version is drupal 7, and I am working with Pantheon. So far, my module looks like this: 

&lt;?php

function admincss_preprocess_html(&amp;$variables) {

$url_string = $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];

if (strpos($url_string, 'edit') !== FALSE) {

  // reference your current admin theme
    $theme_path = drupal_get_path('theme', 'seven');

  // reference your own stylesheet
    drupal_add_css('sites/all/modules/admincss/css/admincss.css', array('weight' =&gt; CSS_THEME));
}


Why isn't my module being used by edit pages? And what, specifically, is the $variables variable referencing?
Thank you in advance!
To add CSS to node edit pages you can use hook_form_alter. Then check the $form_id to localize changes to desired node form(s) and add your call to drupal_add_css().

Example:

function admincss_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == "xxx") {
    drupal_add_css(drupal_get_path('module', 'admincss') . '/css/admincss.css');
  }
}


hook_preprocess_html() Is used to preprocess variables for the html.tpl.php file.