changeset 387:6cd41974d4b0

Style up form error.
author nanaya <me@myconan.net>
date Sun, 07 Jun 2015 10:30:14 +0900
parents bf9e350f8a2b
children 797e351b2e2b
files app/assets/stylesheets/_components.scss app/assets/stylesheets/_new-paste.scss app/assets/stylesheets/_variables.scss
diffstat 3 files changed, 16 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/app/assets/stylesheets/_components.scss	Sun Jun 07 10:24:35 2015 +0900
+++ b/app/assets/stylesheets/_components.scss	Sun Jun 07 10:30:14 2015 +0900
@@ -10,8 +10,17 @@
 
 .alert-danger {
   background-color: $danger;
+
+  strong { color: $danger-dark; }
 }
 
 .alert-info {
   background-color: $info;
+
+  strong { color: $info-dark; }
 }
+
+.field_with_errors {
+  display: flex;
+  border: 2px solid $danger-dark;
+}
--- a/app/assets/stylesheets/_new-paste.scss	Sun Jun 07 10:24:35 2015 +0900
+++ b/app/assets/stylesheets/_new-paste.scss	Sun Jun 07 10:30:14 2015 +0900
@@ -11,9 +11,13 @@
     flex-direction: column;
     margin-bottom: $spacing;
 
-    textarea {
+    > * {
       flex: 1 0 auto;
+    }
+
+    textarea {
       resize: none;
+      width: 100%;
     }
   }
 
--- a/app/assets/stylesheets/_variables.scss	Sun Jun 07 10:24:35 2015 +0900
+++ b/app/assets/stylesheets/_variables.scss	Sun Jun 07 10:30:14 2015 +0900
@@ -2,4 +2,6 @@
 $screen-sm: 600px;
 
 $danger: scale-color(#f00, $lightness: 90%);
+$danger-dark: darken($danger, 60%);
 $info: scale-color(#0f0, $lightness: 90%);
+$info-dark: darken($info, 60%);