Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[57153] Reduce amount of design variables needed for the sidebar #16691

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions app/views/custom_styles/_inline_css.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,28 @@ See COPYRIGHT and LICENSE files for more details.
:root {
<% DesignColor.overwritten.each do |design_color| %>
--<%= design_color.variable %>: <%= design_color.hexcode %>;
<% if design_color.variable == "header-border-bottom-color" %>
<% if design_color.variable == "header-bg-color" %>
--header-item-font-color: <%= design_color.contrasting_font_color %>;
<% if design_color.bright? %>
--header-border-bottom-width: 1px;
--header-border-bottom-color: #d0d7de;
<% end %>
<% end %>
<% if design_color.variable == "main-menu-border-color" %>
<% if design_color.variable == "header-item-bg-hover-color" %>
--header-item-font-hover-color: <%= design_color.contrasting_font_color %>;
<% end %>
<% if design_color.variable == "main-menu-bg-color" %>
--main-menu-font-color: <%= design_color.contrasting_font_color %>;
<% if design_color.bright? %>
--main-menu-border-width: 1px;
--main-menu-border-color: #d0d7de;
<% end %>
<% end %>
<% if design_color.variable == "main-menu-bg-selected-background" %>
--main-menu-selected-font-color: <%= design_color.contrasting_font_color %>;
<% end %>
<% if design_color.variable == "main-menu-bg-hover-background" %>
--main-menu-hover-font-color: <%= design_color.contrasting_font_color %>;
<% end %>
<% if design_color.variable == "primary-button-color" %>
--primary-button-color--major1: <%= design_color.darken 0.18 %>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@
--main-menu-bg-selected-background: #175A8E;
--main-menu-bg-hover-background: #124E7C;
--main-menu-font-color: #FFFFFF;
--main-menu-hover-font-color: var(--main-menu-font-color);
--main-menu-hover-font-color: #FFFFFF;
--main-menu-resizer-color: var(--main-menu-border-color);
--main-menu-selected-font-color: var(--main-menu-font-color);
--main-menu-selected-font-color: #FFFFFF;
--main-menu-font-size: 14px;
--main-menu-fieldset-header-color: #B0B2B3;
--main-menu-hover-border-color: transparent;
Expand Down
9 changes: 1 addition & 8 deletions lib/open_project/custom_styles/design.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,9 @@ def customizable_variables
accent-color
header-bg-color
header-item-bg-hover-color
header-item-font-color
header-item-font-hover-color
header-border-bottom-color
main-menu-bg-color
main-menu-bg-selected-background
main-menu-bg-hover-background
main-menu-font-color
main-menu-selected-font-color
main-menu-hover-font-color
main-menu-border-color )
main-menu-bg-hover-background)
end
end
end