From ada92ffeec75bba3ebd9247f4afafee4d01884a0 Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni Date: Sun, 29 May 2022 03:42:12 +0200 Subject: [PATCH] remove and replace sass ruby script functions because did not work --- app/assets/stylesheets/bootstrap_overrides.scss | 11 ++++++----- config/initializers/sass.rb | 10 ---------- 2 files changed, 6 insertions(+), 15 deletions(-) delete mode 100644 config/initializers/sass.rb diff --git a/app/assets/stylesheets/bootstrap_overrides.scss b/app/assets/stylesheets/bootstrap_overrides.scss index 4281c826f..3132520f2 100644 --- a/app/assets/stylesheets/bootstrap_overrides.scss +++ b/app/assets/stylesheets/bootstrap_overrides.scss @@ -5,18 +5,19 @@ html { position: relative; min-height: 100%; } -body { - margin-bottom: body_margin_bottom(); /* Margin bottom by footer height */ -} + .footer { - position: absolute; - bottom: 0; width: 100%; height: 300px; /* Set the fixed height of the footer here */ color: #757575; background-color: #ccc; } +body{ + display: flex; + flex-direction: column; + height: 100vh; +} /* Footer -------------------------------------------------- */ footer.footer h6 { diff --git a/config/initializers/sass.rb b/config/initializers/sass.rb deleted file mode 100644 index 25ac09514..000000000 --- a/config/initializers/sass.rb +++ /dev/null @@ -1,10 +0,0 @@ -module Sass::Script::Functions - - def body_margin_bottom - margin = Rails.env.appliance? ? "60px" : "300px" - Sass::Script::String.new(margin) - end - - declare :body_margin_bottom, [] - -end \ No newline at end of file