+my $style = $session{'CurrentUser'}
+ ? $session{'CurrentUser'}->Stylesheet
+ : RT->Config->Get('WebDefaultStylesheet');
+
+my @css_files;
+if ( RT->Config->Get('DevelMode') ) {
+ @css_files = map { "/static/css/$_" } "$style/main.css", RT->Config->Get('CSSFiles');
+}
+else {
+ my $key =
+ RT::Interface::Web::SquishedCSS( $style )->Key;
+ @css_files = "/NoAuth/css/$style/squished-$key.css";
+}
+
+# We use BodyClass in its $ARGS form so that callbacks have a chance to
+# massage it
+push @{$ARGS{'BodyClass'}}, lc $style;
+
+if (RT->Config->Get("UseSideBySideLayout", $session{'CurrentUser'})) {
+ push @{$ARGS{'BodyClass'}}, 'sidebyside';
+}
+