From df641263badb79df571955874e6510ae8dedd399 Mon Sep 17 00:00:00 2001 From: Jan Krutisch Date: Thu, 20 Apr 2017 17:56:24 +0200 Subject: Namespace CSS selectors on error pages The css selectors on the generated error pages are too broad (for example `text-align: center` on `body` and thus bleed out to the following pages (say, by pressing the back button) when using Turbolinks. This commit namespaces all the selectors. --- railties/CHANGELOG.md | 7 +++++++ .../lib/rails/generators/rails/app/templates/public/404.html | 12 ++++++------ .../lib/rails/generators/rails/app/templates/public/422.html | 12 ++++++------ .../lib/rails/generators/rails/app/templates/public/500.html | 12 ++++++------ 4 files changed, 25 insertions(+), 18 deletions(-) (limited to 'railties') diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 6032d2e1a1..5463b05b60 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1 +1,8 @@ +* Namespace error pages' CSS selectors to stop the styles from bleeding into other pages + when using Turbolinks. + + *Jan Krutisch* + + + Please check [5-1-stable](https://github.com/rails/rails/blob/5-1-stable/railties/CHANGELOG.md) for previous changes. diff --git a/railties/lib/rails/generators/rails/app/templates/public/404.html b/railties/lib/rails/generators/rails/app/templates/public/404.html index b612547fc2..2be3af26fc 100644 --- a/railties/lib/rails/generators/rails/app/templates/public/404.html +++ b/railties/lib/rails/generators/rails/app/templates/public/404.html @@ -4,7 +4,7 @@ The page you were looking for doesn't exist (404) - +
diff --git a/railties/lib/rails/generators/rails/app/templates/public/422.html b/railties/lib/rails/generators/rails/app/templates/public/422.html index a21f82b3bd..c08eac0d1d 100644 --- a/railties/lib/rails/generators/rails/app/templates/public/422.html +++ b/railties/lib/rails/generators/rails/app/templates/public/422.html @@ -4,7 +4,7 @@ The change you wanted was rejected (422) - +
diff --git a/railties/lib/rails/generators/rails/app/templates/public/500.html b/railties/lib/rails/generators/rails/app/templates/public/500.html index 061abc587d..78a030af22 100644 --- a/railties/lib/rails/generators/rails/app/templates/public/500.html +++ b/railties/lib/rails/generators/rails/app/templates/public/500.html @@ -4,7 +4,7 @@ We're sorry, but something went wrong (500) - +
-- cgit v1.2.3