From 524c6dccbd03625068974e49d63f642c6bb08efb Mon Sep 17 00:00:00 2001
From: Bram Goffings <bramgoffings@gmail.com>
Date: Sun, 4 Mar 2012 17:24:29 +0100
Subject: [PATCH 1/2] poll css

---
 core/modules/poll/poll-rtl.css       |   10 ------
 core/modules/poll/poll.admin.css     |   17 +++++++++++
 core/modules/poll/poll.base-rtl.css  |    9 ++++++
 core/modules/poll/poll.base.css      |   19 ++++++++++++
 core/modules/poll/poll.css           |   53 ----------------------------------
 core/modules/poll/poll.info          |    3 +-
 core/modules/poll/poll.module        |    3 ++
 core/modules/poll/poll.theme-rtl.css |   12 +++++++
 core/modules/poll/poll.theme.css     |   34 +++++++++++++++++++++
 9 files changed, 96 insertions(+), 64 deletions(-)
 delete mode 100644 core/modules/poll/poll-rtl.css
 create mode 100644 core/modules/poll/poll.admin.css
 create mode 100644 core/modules/poll/poll.base-rtl.css
 create mode 100644 core/modules/poll/poll.base.css
 delete mode 100644 core/modules/poll/poll.css
 create mode 100644 core/modules/poll/poll.theme-rtl.css
 create mode 100644 core/modules/poll/poll.theme.css

diff --git a/core/modules/poll/poll-rtl.css b/core/modules/poll/poll-rtl.css
deleted file mode 100644
index 1d215d7..0000000
--- a/core/modules/poll/poll-rtl.css
+++ /dev/null
@@ -1,10 +0,0 @@
-
-.poll .bar .foreground {
-  float: right;
-}
-.poll .percent {
-  text-align: left;
-}
-.poll .vote-form {
-  text-align: right;
-}
diff --git a/core/modules/poll/poll.admin.css b/core/modules/poll/poll.admin.css
new file mode 100644
index 0000000..f118de3
--- /dev/null
+++ b/core/modules/poll/poll.admin.css
@@ -0,0 +1,17 @@
+
+/**
+ * @file
+ * Admin stylesheet for the Poll module.
+ */
+
+.node-form #edit-poll-more {
+  margin: 0;
+}
+.node-form #poll-choice-table .form-text {
+  display: inline;
+  width: auto;
+}
+.node-form #poll-choice-table td.choice-flag {
+  white-space: nowrap;
+  width: 4em;
+}
diff --git a/core/modules/poll/poll.base-rtl.css b/core/modules/poll/poll.base-rtl.css
new file mode 100644
index 0000000..7c737a9
--- /dev/null
+++ b/core/modules/poll/poll.base-rtl.css
@@ -0,0 +1,9 @@
+
+/**
+ * @file
+ * Right-to-left specfic base stylesheet for the Poll module.
+ */
+
+.poll .bar .foreground {
+  float: right;
+}
diff --git a/core/modules/poll/poll.base.css b/core/modules/poll/poll.base.css
new file mode 100644
index 0000000..1d24c67
--- /dev/null
+++ b/core/modules/poll/poll.base.css
@@ -0,0 +1,19 @@
+
+/**
+ * @file
+ * Base stylesheet for the Poll module.
+ */
+
+.poll {
+  overflow: hidden;
+}
+.poll .bar {
+  height: 1em;
+  margin: 1px 0;
+  background-color: #ddd;
+}
+.poll .bar .foreground {
+  background-color: #000;
+  height: 1em;
+  float: left; /* LTR */
+}
diff --git a/core/modules/poll/poll.css b/core/modules/poll/poll.css
deleted file mode 100644
index ddd59eb..0000000
--- a/core/modules/poll/poll.css
+++ /dev/null
@@ -1,53 +0,0 @@
-
-.poll {
-  overflow: hidden;
-}
-.poll dl,
-.poll dd {
-  margin: 0;
-}
-.poll .bar {
-  height: 1em;
-  margin: 1px 0;
-  background-color: #ddd;
-}
-.poll .bar .foreground {
-  background-color: #000;
-  height: 1em;
-  float: left; /* LTR */
-}
-.poll .links {
-  text-align: center;
-}
-.poll .percent {
-  text-align: right; /* LTR */
-}
-.poll .total {
-  text-align: center;
-}
-.poll .vote-form {
-  text-align: center;
-}
-.poll .vote-form {
-  text-align: left; /* LTR */
-}
-.poll .vote-form .poll-title {
-  font-weight: bold;
-}
-.node-form #edit-poll-more {
-  margin: 0;
-}
-.node-form #poll-choice-table .form-text {
-  display: inline;
-  width: auto;
-}
-.node-form #poll-choice-table td.choice-flag {
-  white-space: nowrap;
-  width: 4em;
-}
-td.poll-chtext {
-  width: 80%;
-}
-td.poll-chvotes .form-text {
-  width: 85%;
-}
diff --git a/core/modules/poll/poll.info b/core/modules/poll/poll.info
index dbdd621..99f778c 100644
--- a/core/modules/poll/poll.info
+++ b/core/modules/poll/poll.info
@@ -5,4 +5,5 @@ version = VERSION
 core = 8.x
 dependencies[] = node
 files[] = poll.test
-stylesheets[all][] = poll.css
+stylesheets[all][] = poll.base.css
+stylesheets[all][] = poll.theme.css
diff --git a/core/modules/poll/poll.module b/core/modules/poll/poll.module
index c4f8ac6..8e6d1af 100644
--- a/core/modules/poll/poll.module
+++ b/core/modules/poll/poll.module
@@ -330,6 +330,9 @@ function poll_form($node, &$form_state) {
     '#options' => $duration,
     '#description' => t('After this period, the poll will be closed automatically.'),
   );
+  $form['#attached']['css'] = array(
+    drupal_get_path('module', 'poll') . '/poll.admin.css',
+  );

   return $form;
 }
diff --git a/core/modules/poll/poll.theme-rtl.css b/core/modules/poll/poll.theme-rtl.css
new file mode 100644
index 0000000..2ba85c6
--- /dev/null
+++ b/core/modules/poll/poll.theme-rtl.css
@@ -0,0 +1,12 @@
+
+/**
+ * @file
+ * Right-to-left specfic theme stylesheet for the Poll module.
+ */
+
+.poll .percent {
+  text-align: left;
+}
+.poll .vote-form {
+  text-align: right;
+}
diff --git a/core/modules/poll/poll.theme.css b/core/modules/poll/poll.theme.css
new file mode 100644
index 0000000..3e91786
--- /dev/null
+++ b/core/modules/poll/poll.theme.css
@@ -0,0 +1,34 @@
+
+/**
+ * @file
+ * Theme stylesheet for the Poll module.
+ */
+
+.poll dl,
+.poll dd {
+  margin: 0;
+}
+.poll .links {
+  text-align: center;
+}
+.poll .percent {
+  text-align: right; /* LTR */
+}
+.poll .total {
+  text-align: center;
+}
+.poll .vote-form {
+  text-align: center;
+}
+.poll .vote-form {
+  text-align: left; /* LTR */
+}
+.poll .vote-form .poll-title {
+  font-weight: bold;
+}
+td.poll-chtext {
+  width: 80%;
+}
+td.poll-chvotes .form-text {
+  width: 85%;
+}
diff --git a/core/themes/bartik/css/style-rtl.css b/core/themes/bartik/css/style-rtl.css
index 48f64ab..da0b86e 100644
--- a/core/themes/bartik/css/style-rtl.css
+++ b/core/themes/bartik/css/style-rtl.css
@@ -259,6 +259,13 @@ ul.action-links li a {
 .poll .total {
   text-align: left;
 }
+.poll .choice-title {
+  clear: left;
+}
+.poll .percent {
+  float: left;
+  text-align: left;
+}

 /* ---------- Color Form ----------- */

diff --git a/core/themes/bartik/css/style.css b/core/themes/bartik/css/style.css
index 739ae81..f606672 100644
--- a/core/themes/bartik/css/style.css
+++ b/core/themes/bartik/css/style.css
@@ -1548,12 +1548,11 @@ div.admin-panel .description {
   font-style: italic;
   margin-bottom: 3em;
   margin-top: -3.2em;
-  float: right;
-  text-align: right;
+  float: right; /* LTR */
+  text-align: right; /* LTR */
 }
 .poll .choice-title {
-  clear: right;
-  margin-right: 2.25em;
+  clear: right; /* LTR */
 }
 .poll .total {
   font-size: 0.929em;
--
1.7.5.4

