# mdframed: bug (with roundcorner) when a style for theorem is used within an environment without topline, rightline, etc

When a style for theorem is used within an environment and that this environment a line but topline=false, rightline=false, etc. then some attributes of the theorem are not used. Here, an MWE for roundcorner.

Have you encountered this issue? I think it is a bug of mdframed.

\documentclass{article}
\usepackage{xcolor}
\usepackage[framemethod=tikz, needspace=1.5cm]{mdframed}

\newmdenv[%
linecolor = red,
topline = false,    % This is where the bug comes from
bottomline = false, % This is where the bug comes from
leftline = false,   % This is where the bug comes from
rightline = true,
]
{rightLineCorner}

\mdfdefinestyle{roundedStyle}{%
roundcorner=10pt,
linewidth=0pt,
backgroundcolor=yellow
}

\mdtheorem[style=roundedStyle]{roundedBox}{Test}

\begin{document}

\begin{rightLineCorner}
\begin{roundedBox}
There should be rounded corners!!!
\end{roundedBox}
\end{rightLineCorner}

\begin{roundedBox}
Just as here!
\end{roundedBox}

\end{document}


I don't think it is bug, but, let's say a surprising feature (I would not think that topline=false, etc. have an impact on rounded corners).

You should overwrite explicitly the attributes topline=false, rightline=false, etc.

\documentclass{article}
\usepackage{xcolor}
\usepackage[framemethod=tikz, needspace=1.5cm]{mdframed}

\newmdenv[%
linecolor = red,
topline = false,    % This is where the bug comes from
bottomline = false, % This is where the bug comes from
leftline = false,   % This is where the bug comes from
rightline = true,
]
{rightLineCorner}

\mdfdefinestyle{roundedStyle}{%
roundcorner=10pt,
linewidth=0pt,
backgroundcolor=yellow,
topline = true,
bottomline = true,
leftline = true,
rightline = true
}

\mdtheorem[style=roundedStyle]{roundedBox}{Test}

\begin{document}

\begin{rightLineCorner}
\begin{roundedBox}
There are rounded corners!!!
\end{roundedBox}
\end{rightLineCorner}

\begin{roundedBox}
Just as here!
\end{roundedBox}

\end{document}