I think I’ve seen this trick in @Scott_Collier-Weir’s docs — making nice outlined blocks for drawing extra attention. To draw such block, one would use Code Block paragraph style. The problem with it is that it forces all the text in the block to have monospace font (see left).
The solution: use formulas and put all the text there. The style of text in formulas will override the “outer” style forced by the block (see right).
Bonus tip: warning boxes with side-by-side icon and text can be created with a Card hidden formula also wrapped in a Code Block paragraph:
One downside worth noting: this is not “free tier” friendly at all because of all those formulas.
It’s possible to reduce the number of formulas used for this by combining multiple formulas together and make it easier to edit with the help of template tables:
It’s not 100% identical: this uses the page font while the trick in the original post results in a smaller font size (could be more useful for contextual tips). But it’s times easier to set up: no external tables and numerous formulas.