Forem Creators and Builders

Rafi
Rafi

Posted on

Green button in forem.dev !!

I just refreshed forem.dev and I just saw green buttons every where it is awesome.

Alt Text

Discussion (5)

Collapse
link2twenty profile image
Andrew Bone

Yep @ben 's changes to brand colour were merged 😁
This burst of generalisation is really cool to watch.

Create account up sell

Allow admins to set brand color #10097

What type of PR is this? (check all applicable)

  • [ ] Refactor
  • [x] Feature
  • [ ] Bug Fix
  • [ ] Optimization
  • [ ] Documentation Update

Description

This feature allows admins to set their own main brand color....

Screen Shot 2020-08-30 at 5 00 14 PM

Screen Shot 2020-08-30 at 4 59 54 PM

Screen Shot 2020-08-30 at 4 58 44 PM

This color needs to contrast properly with white, so I added the wcag contrast gem. I think this is a good gem to add, because we can start using this elsewhere, like user profile colors, tags, etc. Currently we let users set non-contrasting colors and basically just moderate it. This will help us ensure a minimum of 4.5:1 contrast for readability and accessibility for all.

The gem has not recently been updates, but it is a fairly simple low-bloat utility gem. The gem author is active and I feel like we can be comfortable that we could merge a change if we needed to.

Also added some basic validations in the controller. I figured we can start adding some validations in this area and extract these to a better place in a future refactor once we establish more of these.

Collapse
ben profile image
Ben Halpern

Yup!

.... I didn't even realize this would apply to all links across the site, even in content. But it passed muster for everybody and now it's how things are done 😄

Collapse
rafi993 profile image
Rafi Author

Submit button in comment box is still blue I'm not sure if it is bug or if it is indented

submit button

Thread Thread
pp profile image
Paweł Ludwiczak

Not bug and not intentional. I think it's called "legacy"... Or "leftover" :)

Thread Thread
link2twenty profile image
Andrew Bone

Hard-coded colours 😁

GitHub

input[type='submit'] {
  background: $bold-blue;
}
&.submitting {
  input[type='submit'] {
    background: #00bbff;
  }
  textarea {
    color: lighten($dark-gray, 25%);
    border: 1px solid $light-green;
    background: white url(image-src('loading-ellipsis.svg')) no-repeat center center;
    background-size: 50px;
  }
}
Enter fullscreen mode Exit fullscreen mode