Apply banner default colors to dev seeds
Banners created through the admin form were getting the default color. However, banners created by other means (like the `db:dev_seed` rake task) were not getting these default values. This feature was originally implemented when we were using Rails 4. With Rails 5, we can provide default values to all new banners and simplify the code at the same time thanks to its `attribute` method. Now, when creating a new banner, instead of getting a blank space, we get an empty line with the banner's default background color, which most users won't know what it's about until they fill in the banner's title. So we're not displaying the content of the banner when it's empty, thanks to the `:empty` CSS pseudoclass.
This commit is contained in:
@@ -2292,6 +2292,10 @@ table {
|
||||
a > * {
|
||||
@include grid-row;
|
||||
padding: 0 rem-calc(16);
|
||||
|
||||
&:empty {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
+ .budget.expanded,
|
||||
|
||||
Reference in New Issue
Block a user