DEV: Improve theme support for color definitions (PR #10634)

  • Lets child components extend color definitions
  • Includes default theme color definitions
  • Fails gracefully on color stylesheet SCSS errors
  • Includes theme variables when extending colors

GitHub

      theme_id ||= SiteSetting.default_theme_id

super super super minor

This is a style thing but in Ruby I find using { for nested blocks somewhat confusing. I would recommend something like this:

let(:theme) do 
  Fabricate(:theme).tap do |t|
    t.set_field(target: :common, name: "color_definitions", value: scss)
    t.save!
  end
end