Break line in tcolorbox boxed title

tcolorbox

I have a document similar to the following one:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{blindtext}
\usepackage[most]{tcolorbox}

\newtcolorbox{definition}[2][]{
    arc=5mm,
    lower separated=false,
    fonttitle=\bfseries,
    colbacktitle=green!10,
    coltitle=green!50!black,
    enhanced,
    attach boxed title to top left={xshift=0.5cm,
            yshift=-3mm},
    colframe=green!50!black,
    colback=green!10,
    title=#2}

\begin{document}
\begin{definition}{Assume we have a title that is waaaaaaay too long to fit in a single line and therefore requires a line break}
\blindtext
\end{definition}
\end{document}

A screenshot of the issue
As you can see, the title is too long to be in one line. How would one create a line break inside of the boxed title here? I tried using \\, but it doesn't work.

Best Answer

As a work around, you can put the title in a \parbox of the relevant size:

\documentclass{article}
\usepackage{blindtext}
\usepackage[most]{tcolorbox}

\newtcolorbox{definition}[2][]{
    arc=5mm,
    lower separated=false,
    fonttitle=\bfseries,
    colbacktitle=green!10,
    coltitle=green!50!black,
    enhanced,
    attach boxed title to top left={xshift=0.5cm,
            yshift=-3mm},
    colframe=green!50!black,
    colback=green!10,
    title=#2}

\begin{document}

\begin{definition}{\parbox{10.45cm}{Assume we have a title that is waaaaaaay too long to fit in a single line and therefore requires a line break}}
\blindtext
\end{definition}

\end{document} 

enter image description here