From f31128705faac46b195c8b0d6e843f729bec0d3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kuna?= <1282324+codecalm@users.noreply.github.com> Date: Tue, 8 Sep 2026 00:31:54 +0200 Subject: [PATCH] Fix `.card-code` corners inside a rounded card (#2993) --- .changeset/fix-card-code-radius.md | 5 +++++ core/scss/ui/_cards.scss | 12 ++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 .changeset/fix-card-code-radius.md diff --git a/.changeset/fix-card-code-radius.md b/.changeset/fix-card-code-radius.md new file mode 100644 index 000000000..1c493b170 --- /dev/null +++ b/.changeset/fix-card-code-radius.md @@ -0,0 +1,5 @@ +--- +"@tabler/core": patch +--- + +Fixed `.card-code` so the code block follows the card corners instead of drawing its own `border-radius`. diff --git a/core/scss/ui/_cards.scss b/core/scss/ui/_cards.scss index 9dc119d8b..56294ea60 100644 --- a/core/scss/ui/_cards.scss +++ b/core/scss/ui/_cards.scss @@ -535,6 +535,17 @@ Card code */ .card-code { padding: 0; + overflow: hidden; + + // The code block is a dark box, so it follows the card's corners: rounded at + // the card's top or bottom edge, square when another section sits next to it. + &:first-child { + @include border-top-radius(var(--card-border-radius)); + } + + &:last-child { + @include border-bottom-radius(var(--card-border-radius)); + } .highlight { margin: 0; @@ -544,6 +555,7 @@ Card code pre { margin: 0 !important; border: 0 !important; + @include border-radius(0); } }