Block pattern conflict with custom block

After more debugging, I finally fixed it. The solution was to match the block markup with the pattern markup. So if my block has style=”–swiper-pagination-color: undefined” the same style should exist in the pattern.