dk_margin and dk_padding

How to add a default margin and padding on elements using theme defaults..

440 views

Edited: 2020-09-26 11:02

The dk_pad is a short-hand for dk_padding; and like so with dk_mar and dk_margin. These classes can be used on HTML elements elsewhere in the system, and even when editing the HTML of articles.

They are intended to add a "standard" margin and padding for all sides that fits nicely with the loaded theme.

For example:

<div class="dk_mar dk_pad">
 <p>Just a box with standard margin/padding applied.</p>
</div>

There are not rules for individual sides: top, bottom, right, left. To control those, you should instead use raw CSS; raw CSS can either be embedded with <style> elements in the HTML of articles, or inline using the style="margin: 1rem 1.2rem 1rem 1.5rem" syntax.

Which you use does not matter since all CSS is digested by the magnifier before serving it on the front-end; this means that class names are shorted down to 1-3 letters (just as an example), regardless of their original length.

Tell us what you think:

  1. Creating theme-compatible flex-based layouts with Doorkeeper CSS.

More in: Doorkeeper CSS