Source

ꯁ꯭ꯄꯦꯁꯤꯡ ꯇꯧꯕꯥ꯫

ꯕꯨꯠꯁ꯭ꯠꯔꯥꯄꯇꯥ ꯑꯦꯂꯤꯃꯦꯟꯇ ꯑꯃꯒꯤ ꯃꯑꯣꯡ ꯃꯇꯧ ꯃꯣꯗꯤꯐꯥꯏ ꯇꯧꯅꯕꯥ ꯁꯣꯔꯇꯍꯦꯟꯗ ꯔꯦꯁ꯭ꯄꯣꯟꯁꯤꯕ ꯃꯥꯔꯖꯤꯟ ꯑꯃꯁꯨꯡ ꯄꯦꯗꯤꯡ ꯌꯨꯇꯤꯂꯤꯇꯤ ꯀ꯭ꯂꯥꯁꯁꯤꯡꯒꯤ ꯄꯥꯛ ꯆꯥꯎꯔꯕꯥ ꯔꯦꯟꯖ ꯑꯃꯥ ꯌꯥꯑꯣꯔꯤ꯫

ꯃꯁꯤ ꯀꯔꯝꯅꯥ ꯊꯕꯛ ꯇꯧꯕꯒꯦ꯫

ꯁꯣꯔꯇꯍꯦꯟꯗ ꯀ꯭ꯂꯥꯁꯁꯤꯡꯒꯥ ꯂꯣꯌꯅꯅꯥ ꯑꯦꯂꯤꯃꯦꯟꯇ ꯑꯃꯗꯥ ꯅꯠꯠꯔꯒꯥ ꯃꯁꯤꯒꯤ ꯁꯥꯏꯗꯁꯤꯡꯒꯤ ꯁꯕꯁꯦꯠ ꯑꯃꯗꯥ ꯔꯦꯁ꯭ꯄꯣꯟꯁꯤꯕꯜ-ꯐ꯭ꯔꯦꯟꯗꯂꯤ marginꯅꯠꯠꯔꯒꯥ ꯚꯦꯜꯌꯨꯁꯤꯡ ꯑꯦꯁꯥꯏꯟ ꯇꯧ꯫ paddingꯃꯤꯑꯣꯏ ꯑꯃꯒꯤ ꯄ꯭ꯔꯣꯄꯔꯇꯤ, ꯄ꯭ꯔꯣꯄꯔꯇꯤ ꯄꯨꯝꯅꯃꯛ, ꯑꯃꯁꯨꯡ ꯚꯔꯇꯤꯀꯦꯜ ꯑꯃꯁꯨꯡ ꯍꯣꯔꯥꯏꯖꯣꯟꯇꯦꯜ ꯄ꯭ꯔꯣꯄꯔꯇꯤꯒꯤ ꯁꯄꯣꯔꯠ ꯌꯥꯑꯣꯔꯤ꯫ ꯀ꯭ꯂꯥꯁꯁꯤꯡ ꯑꯁꯤ ꯗꯤꯐꯣꯜꯇ ꯁꯥꯁ ꯃꯦꯞ ꯑꯃꯗꯒꯤ ꯁꯦꯃꯒꯠꯄꯗꯒꯤ .25remꯍꯧꯔꯒꯥ 3rem.

ꯅꯣꯇꯦꯁꯟ ꯇꯧꯕꯥ꯫

ꯕ꯭ꯔꯦꯀꯄꯣꯏꯟꯇ ꯄꯨꯝꯅꯃꯛꯇꯥ ꯆꯠꯅꯕꯥ ꯌꯥꯕꯥ ꯁ꯭ꯄꯦꯁꯤꯡ ꯌꯨꯇꯤꯂꯤꯇꯤꯁꯤꯡ, ꯗꯒꯤ xs, xlꯃꯈꯣꯌꯗꯥ ꯕ꯭ꯔꯦꯀꯄꯣꯏꯟꯇ ꯑꯦꯕꯕ꯭ꯔꯤꯕꯤꯌꯔ ꯑꯃꯠꯇꯥ ꯂꯩꯇꯦ꯫ ꯃꯁꯤꯒꯤ ꯃꯔꯃꯗꯤ ꯀ꯭ꯂꯥꯁꯁꯤꯡ ꯑꯗꯨꯗꯒꯤ min-width: 0ꯑꯃꯁꯨꯡ ꯃꯊꯛꯇꯥ ꯑꯦꯞꯂꯥꯏ ꯇꯧꯏ, ꯑꯃꯁꯨꯡ ꯃꯔꯝ ꯑꯁꯤꯅꯥ ꯃꯦꯗꯤꯌꯥ ꯀ꯭ꯕꯦꯔꯤ ꯑꯃꯅꯥ ꯕꯣꯟꯗ ꯇꯧꯗꯦ꯫ ꯑꯗꯨꯝ ꯑꯣꯏꯅꯃꯛ, ꯂꯦꯃꯍꯧꯔꯤꯕꯥ ꯕ꯭ꯔꯦꯀꯄꯣꯏꯟꯇꯁꯤꯡꯗꯥ ꯕ꯭ꯔꯦꯀꯄꯣꯏꯟꯇ ꯑꯦꯕꯕ꯭ꯔꯤꯕꯤꯌꯔ ꯑꯃꯥ ꯌꯥꯑꯣꯔꯤ꯫

ꯀ꯭ꯂꯥꯁꯁꯤꯡ {property}{sides}-{size}ꯑꯁꯤ , , , xsꯑꯃꯁꯨꯡ . {property}{sides}-{breakpoint}-{size}_smmdlgxl

ꯄ꯭ꯔꯣꯄꯔꯇꯤ ꯑꯁꯤ ꯃꯈꯥꯗꯥ ꯄꯤꯔꯤꯕꯥ ꯑꯁꯤꯒꯤ ꯃꯅꯨꯡꯗꯥ ꯑꯃꯅꯤ ꯍꯥꯌꯕꯥ ꯃꯐꯝ ꯑꯗꯨꯗꯥ:

  • m- ꯁꯦꯠ ꯇꯧꯕꯥ ꯀ꯭ꯂꯥꯁꯁꯤꯡꯒꯤꯗꯃꯛ꯫margin
  • p- ꯁꯦꯠ ꯇꯧꯕꯥ ꯀ꯭ꯂꯥꯁꯁꯤꯡꯒꯤꯗꯃꯛ꯫padding

ꯃꯐꯝ ꯑꯗꯨꯗꯥ ꯁꯥꯏꯗꯁꯤꯡ ꯑꯁꯤ ꯃꯈꯥꯗꯥ ꯄꯤꯔꯤꯕꯁꯤꯡꯁꯤꯒꯤ ꯃꯅꯨꯡꯗꯥ ꯑꯃꯅꯤ:

  • t- ꯁꯦꯠ ꯇꯧꯕꯥ ꯀ꯭ꯂꯥꯁꯁꯤꯡꯒꯤꯗꯃꯛ margin-topꯅꯠꯔꯒꯥ ...padding-top
  • b- ꯁꯦꯠ ꯇꯧꯕꯥ ꯀ꯭ꯂꯥꯁꯁꯤꯡꯒꯤꯗꯃꯛ margin-bottomꯅꯠꯔꯒꯥ ...padding-bottom
  • l- ꯁꯦꯠ ꯇꯧꯕꯥ ꯀ꯭ꯂꯥꯁꯁꯤꯡꯒꯤꯗꯃꯛ margin-leftꯅꯠꯔꯒꯥ ...padding-left
  • r- ꯁꯦꯠ ꯇꯧꯕꯥ ꯀ꯭ꯂꯥꯁꯁꯤꯡꯒꯤꯗꯃꯛ margin-rightꯅꯠꯔꯒꯥ ...padding-right
  • x- ꯑꯅꯤꯃꯛ ꯁꯦꯠ ꯇꯧꯕꯥ ꯀ꯭ꯂꯥꯁꯁꯤꯡꯒꯤꯗꯃꯛ *-leftꯑꯃꯁꯨꯡ ...*-right
  • y- ꯑꯅꯤꯃꯛ ꯁꯦꯠ ꯇꯧꯕꯥ ꯀ꯭ꯂꯥꯁꯁꯤꯡꯒꯤꯗꯃꯛ *-topꯑꯃꯁꯨꯡ ...*-bottom
  • blank - ꯑꯦꯂꯤꯃꯦꯟꯇ ꯑꯗꯨꯒꯤ ꯃꯥꯏꯀꯩ ꯴ ꯄꯨꯝꯅꯃꯛꯇꯥ marginꯅꯠꯔꯒꯥ ꯑꯃꯥ ꯁꯦꯠ ꯇꯧꯕꯥ ꯀ꯭ꯂꯥꯁꯁꯤꯡꯒꯤꯗꯃꯛ꯫padding

ꯁꯥꯏꯖ ꯑꯁꯤ ꯃꯈꯥꯗꯥ ꯄꯤꯔꯤꯕꯁꯤꯡꯁꯤꯒꯤ ꯃꯅꯨꯡꯗꯥ ꯑꯃꯅꯤ:

  • 0margin- ꯅꯠꯔꯒꯥ paddingꯁꯦꯠ ꯇꯧꯗꯨꯅꯥ ꯂꯧꯊꯣꯀꯄꯥ ꯀ꯭ꯂꯥꯁꯁꯤꯡꯒꯤꯗꯃꯛ꯫0
  • 1margin- (ꯗꯤꯐꯣꯜꯇ ꯑꯣꯏꯅꯥ) ꯅꯠꯔꯒꯥ paddingꯇꯨ ꯁꯦꯠ ꯇꯧꯕꯥ ꯀ꯭ꯂꯥꯁꯁꯤꯡꯒꯤꯗꯃꯛ꯫$spacer * .25
  • 2margin- (ꯗꯤꯐꯣꯜꯇ ꯑꯣꯏꯅꯥ) ꯅꯠꯔꯒꯥ paddingꯇꯨ ꯁꯦꯠ ꯇꯧꯕꯥ ꯀ꯭ꯂꯥꯁꯁꯤꯡꯒꯤꯗꯃꯛ꯫$spacer * .5
  • 3margin- (ꯗꯤꯐꯣꯜꯇ ꯑꯣꯏꯅꯥ) ꯅꯠꯔꯒꯥ paddingꯇꯨ ꯁꯦꯠ ꯇꯧꯕꯥ ꯀ꯭ꯂꯥꯁꯁꯤꯡꯒꯤꯗꯃꯛ꯫$spacer
  • 4margin- (ꯗꯤꯐꯣꯜꯇ ꯑꯣꯏꯅꯥ) ꯅꯠꯔꯒꯥ paddingꯇꯨ ꯁꯦꯠ ꯇꯧꯕꯥ ꯀ꯭ꯂꯥꯁꯁꯤꯡꯒꯤꯗꯃꯛ꯫$spacer * 1.5
  • 5margin- (ꯗꯤꯐꯣꯜꯇ ꯑꯣꯏꯅꯥ) ꯅꯠꯔꯒꯥ paddingꯇꯨ ꯁꯦꯠ ꯇꯧꯕꯥ ꯀ꯭ꯂꯥꯁꯁꯤꯡꯒꯤꯗꯃꯛ꯫$spacer * 3
  • automargin- ꯇꯨ ꯑꯣꯇꯣ ꯁꯦꯠ ꯇꯧꯕꯥ ꯀ꯭ꯂꯥꯁꯁꯤꯡꯒꯤꯗꯃꯛ꯫

$spacers( ꯁꯥꯁ ꯃꯦꯞ ꯚꯦꯔꯤꯑꯦꯕꯂꯗꯥ ꯑꯦꯟꯠꯔꯤꯁꯤꯡ ꯍꯥꯄꯆꯤꯟꯗꯨꯅꯥ ꯑꯗꯣꯝꯅꯥ ꯑꯍꯦꯅꯕꯥ ꯁꯥꯏꯖꯁꯤꯡ ꯍꯥꯄꯆꯤꯅꯕꯥ ꯌꯥꯒꯅꯤ꯫)

ꯈꯨꯗꯃꯁꯤꯡ꯫

ꯀ꯭ꯂꯥꯁꯁꯤꯡ ꯑꯁꯤꯒꯤ ꯔꯤꯞꯔꯖꯦꯟꯇꯦꯇꯤꯕ ꯈꯨꯗꯝ ꯈꯔꯥ ꯃꯈꯥꯗꯥ ꯄꯤꯔꯤ:

.mt-0 {
  margin-top: 0 !important;
}

.ml-1 {
  margin-left: ($spacer * .25) !important;
}

.px-2 {
  padding-left: ($spacer * .5) !important;
  padding-right: ($spacer * .5) !important;
}

.p-3 {
  padding: $spacer !important;
}

ꯍꯣꯔꯥꯏꯖꯣꯟꯇꯦꯜ ꯁꯦꯟꯇꯔ ꯇꯧꯕꯥ꯫

Additionally, Bootstrap also includes an .mx-auto class for horizontally centering fixed-width block level content—that is, content that has display: block and a width set—by setting the horizontal margins to auto.

Centered element
<div class="mx-auto" style="width: 200px;">
  Centered element
</div>

Negative margin

In CSS, margin properties can utilize negative values (padding cannot). As of 4.2, we’ve added negative margin utilities for every non-zero integer size listed above (e.g., 1, 2, 3, 4, 5). These utilities are ideal for customizing grid column gutters across breakpoints.

The syntax is nearly the same as the default, positive margin utilities, but with the addition of n before the requested size. Here’s an example class that’s the opposite of .mt-1:

.mt-n1 {
  margin-top: -0.25rem !important;
}

ꯃꯐꯃꯁꯤꯗꯥ ꯃꯦꯗꯤꯌꯝ ( md) ꯕ꯭ꯔꯦꯀꯄꯣꯏꯟꯇ ꯑꯃꯁꯨꯡ ꯃꯊꯛꯇꯥ ꯂꯩꯕꯥ ꯕꯨꯇꯁ꯭ꯠꯔꯥꯞ ꯒ꯭ꯔꯤꯗ ꯀꯁ꯭ꯇꯃꯁ ꯇꯧꯕꯒꯤ ꯈꯨꯗꯝ ꯑꯃꯥ ꯄꯤꯔꯤ꯫ ꯑꯩꯈꯣꯌꯅꯥ .colꯄꯦꯗꯤꯡ ꯑꯁꯤ ꯍꯦꯅꯒꯠꯍꯜꯂꯦ ꯑꯃꯁꯨꯡ ꯃꯗꯨꯒꯤ ꯃꯇꯨꯡꯗꯥ ꯃꯃꯥ-ꯃꯄꯥ ꯑꯗꯨꯗꯥ .px-md-5ꯌꯥꯑꯣꯕꯥ ꯑꯗꯨꯒꯥ ꯂꯣꯌꯅꯅꯥ ꯀꯥꯎꯟꯇꯔꯑꯦꯛꯇ ꯇꯧꯈ꯭ꯔꯦ ..mx-md-n5.row

ꯀꯁ꯭ꯇꯝ ꯀꯂꯝ ꯄꯦꯗꯤꯡ ꯇꯧꯕꯥ꯫
ꯀꯁ꯭ꯇꯝ ꯀꯂꯝ ꯄꯦꯗꯤꯡ ꯇꯧꯕꯥ꯫
<div class="row mx-md-n5">
  <div class="col px-md-5"><div class="p-3 border bg-light">Custom column padding</div></div>
  <div class="col px-md-5"><div class="p-3 border bg-light">Custom column padding</div></div>
</div>