formaweb / formadmin

Modern and responsive theme for Active Admin used by Formaweb.
https://rubygems.org/gems/formadmin
MIT License
82 stars 23 forks source link

Style for error message #12

Closed mjunior closed 7 years ago

mjunior commented 7 years ago

Added css to f.semantic_errors tag of active admin.

form do |f|
    f.semantic_errors *f.object.errors.keys
end

Without new css

Without new css

With new css style

With new csss

caiotarifa commented 7 years ago

Hi, @mjunior.

Custom or personal settings must be set in the active_admin.scss file. So, I'm closing this suggestion, but I thank you for your willingness to help.

Anyway, I made some guideline comments on your commits:

  1. Always write commit messages, comments and examples in English as people around the world can contribute to this project.
  2. Compress nested selectors even in SCSS, like ul.errors {, instead of ul { &.errors {. And put one space before { in rule declarations.
  3. The property declaration order adopted by this project is alphabetical.
  4. You can't change default values by your preference, you need to justify. Like the $font-size, which need to stay at 16px for better adaptability in the responsive and in the form fields.
  5. And, there is already a stylized component called .flash that does what you need.

I intend to create a text file with the guidelines to improve the maintenance of the project code. But everything I wrote can be seen based on existing code.

Thank you again.