diff --git a/ckeditor.module b/ckeditor.module
index 9b354da..80d7dc9 100644
--- a/ckeditor.module
+++ b/ckeditor.module
@@ -28,7 +28,14 @@ function ckeditor_library_info() {
     'dependencies' => array(
       array('editor', 'drupal.editor'),
       array('ckeditor', 'ckeditor'),
-    )
+    ),
+  );
+  $libraries['drupal.ckeditor.css'] = array(
+    'title' => 'Formatting CSS for common classes used in CKEditor.',
+    'version' => VERSION,
+    'css' => array(
+      $module_path . '/css/ckeditor.css' => array(),
+    ),
   );
   $libraries['drupal.ckeditor.admin'] = array(
     'title' => 'Drupal behavior to enable CKEditor on textareas.',
@@ -43,7 +50,7 @@ function ckeditor_library_info() {
       array('system', 'jquery.once'),
       array('system', 'jquery.ui.sortable'),
       array('system', 'jquery.ui.draggable'),
-    )
+    ),
   );
   $libraries['ckeditor'] = array(
     'title' => 'Loads the main CKEditor library.',
@@ -69,12 +76,12 @@ function ckeditor_theme() {
 }
 
 /**
- * Implements hook_init().
+ * Implements hook_page_build().
  */
-function ckeditor_init() {
+function ckeditor_page_build(&$page) {
   // Add our CSS file that adds common needed classes, such as align-left,
   // align-right, underline, indent, etc.
-  drupal_add_css(drupal_get_path('module', 'ckeditor') . '/css/ckeditor.css');
+  $page['#attached']['library'][] = array('ckeditor', 'drupal.ckeditor.css');
 }
 
 /**
