Browse Source

Fix badge color not affected (#18826)

* Fix badge color not affected

* Generate user role css
closed-social-glitch-2
Jeong Arm 2 years ago
committed by GitHub
parent
commit
f248d95be2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions
  1. +3
    -3
      app/javascript/styles/mastodon/accounts.scss
  2. +2
    -0
      app/views/custom_css/show.css.erb

+ 3
- 3
app/javascript/styles/mastodon/accounts.scss View File

@ -210,9 +210,9 @@
font-size: 12px;
line-height: 12px;
font-weight: 500;
color: $ui-secondary-color;
background-color: rgba($ui-secondary-color, 0.1);
border: 1px solid rgba($ui-secondary-color, 0.5);
color: var(--user-role-accent, $ui-secondary-color);
background-color: var(--user-role-background, rgba($ui-secondary-color, 0.1));
border: 1px solid var(--user-role-border, rgba($ui-secondary-color, 0.5));
&.moderator {
color: $success-green;

+ 2
- 0
app/views/custom_css/show.css.erb View File

@ -5,6 +5,8 @@
<%- UserRole.where(highlighted: true).select { |role| role.color.present? }.each do |role| %>
.user-role-<%= role.id %> {
--user-role-accent: <%= role.color %>;
--user-role-background: <%= role.color + '19' %>;
--user-role-border: <%= role.color + '80' %>;
}
<%- end %>

Loading…
Cancel
Save