From 55388be92289d8d6ba47ec87f97dfed8d2e3c0de Mon Sep 17 00:00:00 2001 From: Tomer Kimia Date: Tue, 4 Mar 2014 19:44:16 -0500 Subject: some error styling --- app/assets/stylesheets/custom.css.scss | 48 ++++++++++++++++++++++--------- app/assets/stylesheets/scaffolds.css.scss | 5 ++-- app/views/common/_error_messages.html.erb | 2 +- 3 files changed, 39 insertions(+), 16 deletions(-) diff --git a/app/assets/stylesheets/custom.css.scss b/app/assets/stylesheets/custom.css.scss index faecdce..906780e 100644 --- a/app/assets/stylesheets/custom.css.scss +++ b/app/assets/stylesheets/custom.css.scss @@ -8,16 +8,38 @@ header > nav { #log-buttons { margin-top: 8px; } - .signup { - @extend .btn; - @extend .btn-success; - } - .signin { - @extend .btn; - @extend .btn-info; - } - .signout { - @extend .btn; - @extend .btn-danger; - } - } \ No newline at end of file + .signup { + @extend .btn; + @extend .btn-success; + } + .signin { + @extend .btn; + @extend .btn-info; + } + .signout { + @extend .btn; + @extend .btn-danger; + } +} + +p.errors { + background-color: #FCF8C7; + color: red; + border-radius: 7px; + padding: 10px; +} + +#errorExplanation { + h2 { + font-size: 1em; + color: red; + font-weight: bold; + } + li { + font-size: 1em; + color: red; + font-style: italic; + } + +} + diff --git a/app/assets/stylesheets/scaffolds.css.scss b/app/assets/stylesheets/scaffolds.css.scss index 2c8c009..9400133 100644 --- a/app/assets/stylesheets/scaffolds.css.scss +++ b/app/assets/stylesheets/scaffolds.css.scss @@ -44,8 +44,9 @@ div { } .field_with_errors { - padding: 2px; - background-color: red; + padding: 1px; + background-color: #FF4C4C; + box-shadow: 0px 0px 5px red; display: table; } diff --git a/app/views/common/_error_messages.html.erb b/app/views/common/_error_messages.html.erb index c9fdd51..731f62c 100644 --- a/app/views/common/_error_messages.html.erb +++ b/app/views/common/_error_messages.html.erb @@ -1,7 +1,7 @@ <%# http://railscasts.com/episodes/211-validations-in-rails-3 %> <% if target.errors.any? %>
-

<%= pluralize(target.errors.count, "error") %> prohibited this record from being saved:

+

<%= pluralize(target.errors.count, "error") %> prohibited this form from being submitted: