# Why does tcolorbox adds vertical space?

I use some tcolorboxes in the solution section of a math paper. For some reason there is some vertical space added.

How can I align the solution number with the top of the tcolorbox?
(The red boxes in the following picture are the added space I don't want.)

Screenshot

MWE

\documentclass[12pt, a4paper]{scrbook}
\usepackage{exsheets}

runin = true,
attach = {main[r,vc]number[l,vc](-3em,0pt)}
}

\SetupExSheets{
counter-within={section},
counter-format=ch.se.qu[1]
}

\usepackage{tikz}
\usepackage[most]{tcolorbox}

\begin{document}
\part{EXCERCISES}
\chapter{Topic 1}

\section{Section}

\begin{question}[ID=111]
I'm an excercise.
\end{question}
\begin{solution}
\tcbsidebyside[
blanker,
sidebyside gap=0.5\baselineskip,
sidebyside align=top seam
]
{
\begin{tikzpicture}[scale=\linewidth/20cm, baseline=(current bounding box.north)]
\draw[step=1,help lines,black!20] (-4.95,-3.45) grid (4.95,3.45);
\end{tikzpicture}%
}
{
}
\end{solution}

\section{Section}

\begin{question}[ID=121]
I'm an excercise.
\end{question}
\begin{solution}
\tcbsidebyside[
blanker,
sidebyside gap=0.5\baselineskip,
sidebyside align=top seam
]
{
}
{
aligned solution.
}
\end{solution}

\begin{question}[ID=122]
I'm an excercise.
\end{question}
\begin{solution}
I'm a perfectly aligned solution.
\end{solution}

\setcounter{chapter}{0}
\part{SOLUTIONS}

\chapter{Topic 1}

\section{Section}
\printsolutions[byID={111}]

\section{Section}
\printsolutions[byID={121}]

\section{Section}
\printsolutions[byID={122}]

\end{document}

• I'm not very familiar with tcolorbox but I believe you want its option nobeforeafter – clemens Jun 28 '16 at 9:31
• Typically a tcolorbox starts a new paragraph. See the description of the before key. So you either need to avoid this or add some negative space with enlarge top initially by=\dimexpr-\parskip-\baselineskip\relax. – Ulrike Fischer Jun 28 '16 at 9:40
• The value gets negative. before skip=\dimexpr-\parskip-\baselineskip\relax is better. And add \strut at the begin of text content. (But it is possible that the solution and content get separated by a page break, didn't check). – Ulrike Fischer Jun 28 '16 at 10:00
• @TeXnician I will do it, but later this day. – Ulrike Fischer Jan 20 '18 at 8:50
• That seemed to be an extremely long day. ;-) – Jürgen Apr 25 '18 at 10:02