Theme components are not overriding theme CSS any more?

어떤 이유에서인지 Discourse가 테마 컴포넌트에서 CSS를 처리하는 방식이 변경되었습니다. 편집: 제가 무엇을 하고 있었는지 이해하지 못했습니다. 이 주제를 ( Contribute > Bug 대신 #dev에) 미래의 참고를 위해 남겨두겠습니다.

매우 최소한의 예시:

Discourse 3.4.2 및 오늘 아침 기준 테스트 통과 (하지만 어제 3.4.1에서도 동일한 문제가 발생했습니다)

메인 테마 #1: 내비게이션 컨테이너 주위에 빨간색 테두리

테마 컴포넌트 #2: 내비게이션 컨테이너 주위에 파란색 테두리

테마 컴포넌트 #2는 테마 #1에 할당되어 있습니다

예상 결과

내비게이션 컨테이너 주위에 파란색 테두리

실제 결과

내비게이션 컨테이너 주위에 빨간색 테두리

TLDR I am a fool.

Stylesheets are sorted like this

          if stylesheets.size > 1
            stylesheets =
              stylesheets.sort_by do |s|
                [s[:remote] ? 0 : 1, s[:theme_id] == @theme_id ? 1 : 0, s[:theme_name]]
              end
          end

When I tried to reproduce, I only used local stylesheets.

Reality is that stylesheets are loaded in this order:

  • remote stylesheets
    • theme components, alphabetically
    • main theme
  • local stylesheets
    • theme components, alphabetically
    • main theme