From 3ddf1ba477ff20a60157933a394b19f6d7ac41e9 Mon Sep 17 00:00:00 2001 From: NadezhdaShosheva Date: Thu, 7 Dec 2023 16:35:36 +0300 Subject: [PATCH 1/5] add slim, scss files, some styles --- Gemfile | 1 + Gemfile.lock | 9 +++++ app/assets/stylesheets/application.scss | 32 ++--------------- app/assets/stylesheets/base.scss | 30 ++++++++++++++++ app/assets/stylesheets/reset.scss | 48 +++++++++++++++++++++++++ app/views/sessions/_form.html.erb | 27 -------------- app/views/sessions/_form.html.slim | 21 +++++++++++ app/views/sessions/new.html.erb | 5 --- app/views/sessions/new.html.slim | 5 +++ app/views/sessions/show.html.erb | 18 ---------- app/views/sessions/show.html.slim | 15 ++++++++ 11 files changed, 131 insertions(+), 80 deletions(-) create mode 100644 app/assets/stylesheets/base.scss create mode 100644 app/assets/stylesheets/reset.scss delete mode 100644 app/views/sessions/_form.html.erb create mode 100644 app/views/sessions/_form.html.slim delete mode 100644 app/views/sessions/new.html.erb create mode 100644 app/views/sessions/new.html.slim delete mode 100644 app/views/sessions/show.html.erb create mode 100644 app/views/sessions/show.html.slim diff --git a/Gemfile b/Gemfile index 8a834768..ec8ea481 100644 --- a/Gemfile +++ b/Gemfile @@ -16,6 +16,7 @@ gem "pg", "~> 1.1" gem "puma", "~> 5.0" # Use SCSS for stylesheets gem "sass-rails", ">= 6" +gem "slim-rails" # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker gem "webpacker", "~> 5.0" # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks diff --git a/Gemfile.lock b/Gemfile.lock index f1e1f7a8..a031a5bf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -298,6 +298,13 @@ GEM connection_pool (>= 2.3.0) rack (>= 2.2.4) redis-client (>= 0.14.0) + slim (5.2.0) + temple (~> 0.10.0) + tilt (>= 2.1.0) + slim-rails (3.6.3) + actionpack (>= 3.1) + railties (>= 3.1) + slim (>= 3.0, < 6.0, != 5.0.0) spring (4.1.1) sprockets (4.2.1) concurrent-ruby (~> 1.0) @@ -306,6 +313,7 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) + temple (0.10.3) thor (1.2.2) tilt (2.3.0) timeout (0.4.0) @@ -375,6 +383,7 @@ DEPENDENCIES sass-rails (>= 6) selenium-webdriver (>= 4.0.0.rc1) sidekiq + slim-rails spring turbolinks (~> 5) tzinfo-data diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index b81139eb..dc9ddba8 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,30 +1,2 @@ -.center { - text-align: center; -} - -.record { - border: 1px solid #000000; - padding: 10px; - margin-bottom: 10px; -} - -.flash-alert { - color: red; -} - -.flash-notice { - color: green; -} - -.sort_links { - place-items: center; - display: flex; - margin-left: auto; - margin-right: auto; -} - -.link { - font-family: "Courier New"; - margin-left: auto; - margin-right: auto; -} +@import "reset"; +@import "base"; diff --git a/app/assets/stylesheets/base.scss b/app/assets/stylesheets/base.scss new file mode 100644 index 00000000..b81139eb --- /dev/null +++ b/app/assets/stylesheets/base.scss @@ -0,0 +1,30 @@ +.center { + text-align: center; +} + +.record { + border: 1px solid #000000; + padding: 10px; + margin-bottom: 10px; +} + +.flash-alert { + color: red; +} + +.flash-notice { + color: green; +} + +.sort_links { + place-items: center; + display: flex; + margin-left: auto; + margin-right: auto; +} + +.link { + font-family: "Courier New"; + margin-left: auto; + margin-right: auto; +} diff --git a/app/assets/stylesheets/reset.scss b/app/assets/stylesheets/reset.scss new file mode 100644 index 00000000..581749b4 --- /dev/null +++ b/app/assets/stylesheets/reset.scss @@ -0,0 +1,48 @@ +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} + +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} + +body { + line-height: 1; +} + +ol, ul { + list-style: none; +} + +blockquote, q { + quotes: none; +} + +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} + +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/app/views/sessions/_form.html.erb b/app/views/sessions/_form.html.erb deleted file mode 100644 index 4a706264..00000000 --- a/app/views/sessions/_form.html.erb +++ /dev/null @@ -1,27 +0,0 @@ -<%= form_with(model: @user, url: login_path) do |form| %> - <% if @user.errors.any? %> -
-

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

- - -
- <% end %> - -
- <%= form.label :email %> - <%= form.text_field :email %> -
- -
- <%= form.label :password %> - <%= form.text_field :password, type: :password %> -
- -
- <%= form.submit "Log in" %> -
-<% end %> diff --git a/app/views/sessions/_form.html.slim b/app/views/sessions/_form.html.slim new file mode 100644 index 00000000..37aab449 --- /dev/null +++ b/app/views/sessions/_form.html.slim @@ -0,0 +1,21 @@ += form_with(model: @user, url: login_path) do |form| + - if @user.errors.any? + #error_explanation + h2 + => pluralize(@user.errors.count, "error") + | prohibited this user from being saved: + + ul + - @user.errors.each do |error| + li = error.full_message + + .field + = form.label :email + = form.text_field :email + + .field + = form.label :password + = form.text_field :password, type: :password + + .actions + = form.submit "Log in" diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb deleted file mode 100644 index 3da971d0..00000000 --- a/app/views/sessions/new.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

Log in

- -<%= render 'form', user: @user %> - -<%= link_to "Back", root_path %> diff --git a/app/views/sessions/new.html.slim b/app/views/sessions/new.html.slim new file mode 100644 index 00000000..a501e0c5 --- /dev/null +++ b/app/views/sessions/new.html.slim @@ -0,0 +1,5 @@ +h1 Log in + += render 'form', user: @user + += link_to 'Back', root_path diff --git a/app/views/sessions/show.html.erb b/app/views/sessions/show.html.erb deleted file mode 100644 index 7c2f81ed..00000000 --- a/app/views/sessions/show.html.erb +++ /dev/null @@ -1,18 +0,0 @@ -

Your profile info

- -

- First Name: - <%= current_user.first_name %> -

- -

- Last Name: - <%= current_user.last_name %> -

- -

- Email: - <%= current_user.email %> -

- -<%= link_to "Go to Projects", projects_path %> diff --git a/app/views/sessions/show.html.slim b/app/views/sessions/show.html.slim new file mode 100644 index 00000000..918762b5 --- /dev/null +++ b/app/views/sessions/show.html.slim @@ -0,0 +1,15 @@ +h1 Your profile info + +p + strong First Name: + span = current_user.first_name + +p + strong Last Name: + span = current_user.last_name + +p + strong Email: + span = current_user.email + += link_to "Go to Projects", projects_path From d02f5f18b5fbe29d57954923a946a8344503c4c6 Mon Sep 17 00:00:00 2001 From: NadezhdaShosheva Date: Mon, 11 Dec 2023 16:24:16 +0300 Subject: [PATCH 2/5] add linters, linter rules, some styles, convert erb to slim --- .scss-lint.yml | 12 +++++++ .slim-lint.yml | 36 ++++++++++++++++++++ Gemfile | 2 ++ Gemfile.lock | 12 +++++++ app/assets/stylesheets/application.scss | 2 ++ app/assets/stylesheets/header.scss | 7 ++++ app/assets/stylesheets/variables.scss | 4 +++ app/views/layouts/application.html.erb | 29 ---------------- app/views/layouts/application.html.slim | 25 ++++++++++++++ app/views/projects/show.html.erb | 45 ------------------------- app/views/projects/show.html.slim | 42 +++++++++++++++++++++++ bin/scss-lint | 29 ++++++++++++++++ bin/slim-lint | 29 ++++++++++++++++ 13 files changed, 200 insertions(+), 74 deletions(-) create mode 100644 .scss-lint.yml create mode 100644 .slim-lint.yml create mode 100644 app/assets/stylesheets/header.scss create mode 100644 app/assets/stylesheets/variables.scss delete mode 100644 app/views/layouts/application.html.erb create mode 100644 app/views/layouts/application.html.slim delete mode 100644 app/views/projects/show.html.erb create mode 100644 app/views/projects/show.html.slim create mode 100755 bin/scss-lint create mode 100755 bin/slim-lint diff --git a/.scss-lint.yml b/.scss-lint.yml new file mode 100644 index 00000000..7c4dc324 --- /dev/null +++ b/.scss-lint.yml @@ -0,0 +1,12 @@ +scss_files: 'app/assets/stylesheets/**/*.scss' + +linters: + BorderZero: + enabled: false + + Indentation: + severity: warning + width: 2 + + PropertySortOrder: + enabled: false diff --git a/.slim-lint.yml b/.slim-lint.yml new file mode 100644 index 00000000..c07642fa --- /dev/null +++ b/.slim-lint.yml @@ -0,0 +1,36 @@ +linters: + LineLength: + max: 120 + + RedundantDiv: + enabled: false + + RuboCop: + enabled: true + # These cops are incredibly noisy since the Ruby we extract from Slim + # templates isn't well-formatted, so we ignore them. + ignored_cops: + - Layout/ArgumentAlignment + - Layout/HashAlignment + - Layout/IndentationWidth + - Layout/LineLength + - Layout/TrailingEmptyLines + - Lint/BlockAlignment + - Lint/EndAlignment + - Lint/Void + - Metrics/BlockLength + - Style/AlignParameters + - Style/BlockNesting + - Style/FileName + - Style/FirstParameterIndentation + - Style/FrozenStringLiteralComment + - Style/IfUnlessModifier + - Style/IndentationConsistency + - Style/IndentationWidth + - Style/Next + - Style/TrailingBlankLines + - Style/TrailingWhitespace + - Style/WhileUntilModifier + - Style/NestedTernaryOperator + - Style/StringLiterals + - Style/QuotedSymbols diff --git a/Gemfile b/Gemfile index ec8ea481..77dbeb04 100644 --- a/Gemfile +++ b/Gemfile @@ -16,6 +16,8 @@ gem "pg", "~> 1.1" gem "puma", "~> 5.0" # Use SCSS for stylesheets gem "sass-rails", ">= 6" +gem "scss_lint" +gem "slim_lint" gem "slim-rails" # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker gem "webpacker", "~> 5.0" diff --git a/Gemfile.lock b/Gemfile.lock index a031a5bf..88266a8a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -278,6 +278,11 @@ GEM ruby-next-core (0.15.3) ruby-progressbar (1.13.0) rubyzip (2.3.2) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) sass-rails (6.0.0) sassc-rails (~> 2.1, >= 2.1.1) sassc (2.4.0) @@ -288,6 +293,8 @@ GEM sprockets (> 3.0) sprockets-rails tilt + scss_lint (0.60.0) + sass (~> 3.5, >= 3.5.5) selenium-webdriver (4.9.0) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) @@ -305,6 +312,9 @@ GEM actionpack (>= 3.1) railties (>= 3.1) slim (>= 3.0, < 6.0, != 5.0.0) + slim_lint (0.24.0) + rubocop (>= 1.0, < 2.0) + slim (>= 3.0, < 6.0) spring (4.1.1) sprockets (4.2.1) concurrent-ruby (~> 1.0) @@ -381,9 +391,11 @@ DEPENDENCIES rubocop-rake rubocop-thread_safety sass-rails (>= 6) + scss_lint selenium-webdriver (>= 4.0.0.rc1) sidekiq slim-rails + slim_lint spring turbolinks (~> 5) tzinfo-data diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index dc9ddba8..1a6381bc 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,2 +1,4 @@ +@import "variables"; @import "reset"; @import "base"; +@import "header"; diff --git a/app/assets/stylesheets/header.scss b/app/assets/stylesheets/header.scss new file mode 100644 index 00000000..e1c286d5 --- /dev/null +++ b/app/assets/stylesheets/header.scss @@ -0,0 +1,7 @@ +.header { + display: flex; + gap: 1rem; + justify-content: flex-end; + + padding: 2rem; +} diff --git a/app/assets/stylesheets/variables.scss b/app/assets/stylesheets/variables.scss new file mode 100644 index 00000000..80d0d5d2 --- /dev/null +++ b/app/assets/stylesheets/variables.scss @@ -0,0 +1,4 @@ +$body-color: #222; +$body-bg: #f1f1f1; + +$input-bg: #fff; diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb deleted file mode 100644 index 7f62610a..00000000 --- a/app/views/layouts/application.html.erb +++ /dev/null @@ -1,29 +0,0 @@ - - - - TaskTrackerItis - - <%= csrf_meta_tags %> - <%= csp_meta_tag %> - - <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> - <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %> - -
- <% if current_user %> - <%= link_to "#{current_user.first_name} #{current_user.last_name || current_user.email}", sessions_path %> - <%= button_to "Log out", logout_path, method: :delete %> - <% else %> - <%= link_to "Log in", login_path %> - <%= link_to "Sign up", register_path %> - <% end %> -
- - <% flash.each do |type, msg| %> -
-

<%= msg %>

-
- <% end %> - <%= yield %> - - diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim new file mode 100644 index 00000000..f1f62c66 --- /dev/null +++ b/app/views/layouts/application.html.slim @@ -0,0 +1,25 @@ +doctype html +html + head + title Task Tracker Itis + meta name="viewport" content="width=device-width,initial-scale=1" + = csrf_meta_tags + = csp_meta_tag + + = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' + = javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' + + header.header + - if current_user + = link_to "#{current_user.first_name} #{current_user.last_name || current_user.email}", sessions_path + = button_to "Log out", logout_path, method: :delete + - else + = link_to "Log in", login_path + = link_to "Sign up", register_path + + body.center + - flash.each do |type, msg| + div class='flash-#{type}' + p = msg + + = yield diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb deleted file mode 100644 index 94472545..00000000 --- a/app/views/projects/show.html.erb +++ /dev/null @@ -1,45 +0,0 @@ -

<%= @project.name %>

- -

Description: <%= @project.description %>

- -<%= link_to "New Task", new_project_task_path(@project), class: "btn btn-primary" %> -<%= link_to "Back", projects_path %> - -

Tasks for <%= @project.name %>

- -<%= link_to "Name", :sort => "name asc" %> -<%= link_to "Name reverse", project_path(@project, sort: "name desc") %> -<%= link_to "Created date", project_path(@project, sort: "created_at asc") %> -<%= link_to "Created date reverse", project_path(@project, sort: "created_at desc") %> -<%= link_to "Deadline", project_path(@project, sort: "deadline_at asc") %> -<%= link_to "Deadline reverse", project_path(@project, sort: "deadline_at desc") %> -
-
- - - - - - - - - - - - - <% @project.tasks.each do |task| %> - - - - - - - - <% end %> - -
NameDescriptionStatusDeadlineActions
<%= task.name %><%= task.description %><%= task.status ? "Completed" : "Not Completed" %><%= task.deadline_at %> - <%= link_to "Show", project_task_path(@project, task), class: "btn btn-primary btn-sm" %> - <%= link_to "Edit", edit_project_task_path(@project, task), class: "btn btn-warning btn-sm" %> - <%= link_to "Destroy", project_task_path(@project, task), method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-danger btn-sm" %> -
-<%= paginate @tasks %> \ No newline at end of file diff --git a/app/views/projects/show.html.slim b/app/views/projects/show.html.slim new file mode 100644 index 00000000..5cdcfece --- /dev/null +++ b/app/views/projects/show.html.slim @@ -0,0 +1,42 @@ +h1 = @project.name + +p + strong Description: + += link_to "New Task", new_project_task_path(@project), class: "btn btn-primary" += link_to "Back", projects_path + +h2 + ' Tasks for + = @project.name + += link_to "Name", sort: "name asc" += link_to "Name reverse", project_path(@project, sort: "name desc") += link_to "Created date", project_path(@project, sort: "created_at asc") += link_to "Created date reverse", project_path(@project, sort: "created_at desc") += link_to "Deadline", project_path(@project, sort: "deadline_at asc") += link_to "Deadline reverse", project_path(@project, sort: "deadline_at desc") + +table.table + thead + tr + th Name + th Description + th Status + th Deadline + th Actions + + tbody + - @project.tasks.each do |task| + tr + td task.name + td task.description + td task.status ? "Completed" : "Not Completed" + td task.deadline_at + td + = link_to "Show", project_task_path(@project, task), class: "btn btn-primary btn-sm" + = link_to "Edit", edit_project_task_path(@project, task), class: "btn btn-warning btn-sm" + = link_to "Destroy", project_task_path(@project, task), + method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-danger btn-sm" + += paginate @tasks diff --git a/bin/scss-lint b/bin/scss-lint new file mode 100755 index 00000000..d195391b --- /dev/null +++ b/bin/scss-lint @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'scss-lint' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +bundle_binstub = File.expand_path("../bundle", __FILE__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("scss_lint", "scss-lint") diff --git a/bin/slim-lint b/bin/slim-lint new file mode 100755 index 00000000..bec53d41 --- /dev/null +++ b/bin/slim-lint @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'slim-lint' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require "pathname" +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +bundle_binstub = File.expand_path("../bundle", __FILE__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("slim_lint", "slim-lint") From 54d3e476862a27b2a2920cd360c73a4df23aec7b Mon Sep 17 00:00:00 2001 From: NadezhdaShosheva Date: Mon, 11 Dec 2023 16:36:35 +0300 Subject: [PATCH 3/5] add some styles, fix linters --- .github/workflows/main.yml | 8 +++- app/assets/stylesheets/_variables.scss | 6 +++ app/assets/stylesheets/application.scss | 8 ++-- app/assets/stylesheets/base.scss | 18 ++----- app/assets/stylesheets/reset.scss | 64 +++++++++++-------------- app/assets/stylesheets/variables.scss | 4 -- app/views/tasks/index.html.erb | 2 +- 7 files changed, 49 insertions(+), 61 deletions(-) create mode 100644 app/assets/stylesheets/_variables.scss delete mode 100644 app/assets/stylesheets/variables.scss diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8693b440..237c2da0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,6 @@ --- name: main -on: +on: push: branches: [ "master" ] pull_request: @@ -35,6 +35,12 @@ jobs: - name: Run rubocop run: bin/rubocop + - name: Run slim linter + run: bin/slim-lint app/views + + - name: Run scss linter + run: bin/scss-lint app/assets/stylesheets + - name: Run tests run: bin/rspec ... diff --git a/app/assets/stylesheets/_variables.scss b/app/assets/stylesheets/_variables.scss new file mode 100644 index 00000000..86d6a948 --- /dev/null +++ b/app/assets/stylesheets/_variables.scss @@ -0,0 +1,6 @@ +$black: #222; +$white: #fff; +$red: #f00; +$green: #008000; + +$body-bg: #f1f1f1; diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 1a6381bc..97654545 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,4 +1,4 @@ -@import "variables"; -@import "reset"; -@import "base"; -@import "header"; +@import 'variables'; +@import 'reset'; +@import 'base'; +@import 'header'; diff --git a/app/assets/stylesheets/base.scss b/app/assets/stylesheets/base.scss index b81139eb..05362d08 100644 --- a/app/assets/stylesheets/base.scss +++ b/app/assets/stylesheets/base.scss @@ -1,30 +1,18 @@ -.center { - text-align: center; -} - -.record { - border: 1px solid #000000; - padding: 10px; - margin-bottom: 10px; -} - .flash-alert { - color: red; + color: $red; } .flash-notice { - color: green; + color: $green; } -.sort_links { - place-items: center; +.sort-links { display: flex; margin-left: auto; margin-right: auto; } .link { - font-family: "Courier New"; margin-left: auto; margin-right: auto; } diff --git a/app/assets/stylesheets/reset.scss b/app/assets/stylesheets/reset.scss index 581749b4..d04e713a 100644 --- a/app/assets/stylesheets/reset.scss +++ b/app/assets/stylesheets/reset.scss @@ -1,48 +1,40 @@ -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, -menu, nav, output, ruby, section, summary, -time, mark, audio, video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; -} - -article, aside, details, figcaption, figure, -footer, header, hgroup, menu, nav, section { - display: block; +* { + box-sizing: border-box; } +html, body { - line-height: 1; + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font-family: Trebuchet MS,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Tahoma,sans-serif; + vertical-align: baseline; } -ol, ul { - list-style: none; +footer, +header, +menu, +nav, +section { + display: block; } -blockquote, q { - quotes: none; +body { + line-height: 1; } -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; +ol, +ul { + list-style: none; } -table { - border-collapse: collapse; - border-spacing: 0; +blockquote, +q { + quotes: none; + + &::before, + &::after { + content: ''; + } } diff --git a/app/assets/stylesheets/variables.scss b/app/assets/stylesheets/variables.scss deleted file mode 100644 index 80d0d5d2..00000000 --- a/app/assets/stylesheets/variables.scss +++ /dev/null @@ -1,4 +0,0 @@ -$body-color: #222; -$body-bg: #f1f1f1; - -$input-bg: #fff; diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb index 4f336b59..eb3784c9 100644 --- a/app/views/tasks/index.html.erb +++ b/app/views/tasks/index.html.erb @@ -2,7 +2,7 @@ <%= link_to "NEW TASK", new_project_task_path(@project) %> -