I'm trying to get my document to be free of warnings. One of them is
Usage of package `titlesec' together(scrreprt) with a KOMA-Script class is not recommended.
Non standard sectioning command detected(titlesec) Using default spacing and no format.
I already changed the layout so I'm not using titleformat anymore. The code still does'nt work without \usepackage{titlesec} though.. What am I missing?
\documentclass[11pt, a4paper]{scrreprt}
\usepackage{blindtext}
\usepackage{xcolor}
\usepackage{titlesec}
%\usepackage[headsepline, automark]{scrlayer-scrpage}
% \titleformat{\chapter}[display] % {command}[shape]
% {\usekomafont{chapter}\filcenter} % format
% { % label
% {\fcolorbox{black}{shadecolor}{
% {\huge\chaptertitlename\mbox{\hspace{1mm}}\thechapter}
% }}}
% {1pc} % sep (from chapternumber)
% {\vspace{1pc}} % {before}[after] (before chaptertitle and after)
\KOMAoptions{chapterprefix}
\renewcommand{\chapterheadmidvskip}{%
\vspace{12pt}
}
\setkomafont{chapter}{\Large\color{black}}
\renewcommand{\chapterlineswithprefixformat}[3]{%
\parbox{\dimexpr\linewidth-2\fboxrule-2\fboxsep}{%
#2 \vspace{.9pc}
\hrule height 1pt \vspace{2pc}
#3 \vspace{1.2pc}\hrule height 1pt%
}
}
\renewcommand{\chapterheadmidvskip}{}
\renewcommand{\chapterformat}{%
\mbox{\LARGE\MakeUppercase{Kapitel}\Huge~\thechapter\filright%
}
}
\begin{document}
\chapter{test}
\blindtext
\end{document}