Spaysin we de bitwin dɛn
Bootstrap inklud wan big renj ɔf shɔthand rispɔnsiv margin ɛn padding yutiliti klas fɔ modify wan ɛlimɛnt in apinɛns.
Asayn rispɔnsiv-frenli margin
ɔ padding
valyu to wan ɛlimɛnt ɔ wan sɔbsɛt fɔ in sayd dɛn wit shɔthand klas dɛn. Inklud sɔpɔt fɔ wan wan prɔpati dɛn, ɔl di prɔpati dɛn, ɛn vertikal ɛn ɔrizɔntal prɔpati dɛn. Dɛn bil klas dɛn frɔm wan difɔlt Sass map we de frɔm .25rem
to 3rem
.
Spaysin yutiliti dɛn we de aplay to ɔl di brekpɔynt dɛn, frɔm xs
to xl
, nɔ gɛt brekpɔynt abrɛvieshɔn insay dɛn. Dis na bikɔs dɛn klas dɛn de de aplay frɔm min-width: 0
ɛn ɔp, ɛn so dɛn nɔ de tay dɛn bay wan midia kwɛstyɔn. Bɔt di ɔda brekpoint dɛn gɛt wan brekpoint abrevieshɔn.
Dɛn gi di klas dɛn nem bay we dɛn yuz di fɔmat {property}{sides}-{size}
fɔ xs
ɛn {property}{sides}-{breakpoint}-{size}
fɔ sm
, md
, lg
, ɛn xl
.
Usay prɔpati na wan pan:
m
- fɔ klas dɛn we de sɛtmargin
p
- fɔ klas dɛn we de sɛtpadding
Usay sayd dɛn na wan pan:
t
- fɔ klas dɛn we de sɛtmargin-top
ɔpadding-top
b
- fɔ klas dɛn we de sɛtmargin-bottom
ɔpadding-bottom
l
- fɔ klas dɛn we de sɛtmargin-left
ɔpadding-left
r
- fɔ klas dɛn we de sɛtmargin-right
ɔpadding-right
x
- fɔ klas dɛn we de sɛt ɔl tu*-left
ɛn*-right
y
- fɔ klas dɛn we de sɛt ɔl tu*-top
ɛn*-bottom
- blank - fɔ klas dɛn we de sɛt wan
margin
ɔpadding
na ɔl di 4 say dɛn na di ɛlimɛnt
Usay saiz na wan pan:
0
- fɔ klas dɛn we de pul dimargin
ɔpadding
bay we dɛn sɛt am to0
1
- (bay difɔlt) fɔ klas dɛn we de sɛt dimargin
ɔpadding
to$spacer * .25
2
- (bay difɔlt) fɔ klas dɛn we de sɛt dimargin
ɔpadding
to$spacer * .5
3
- (bay difɔlt) fɔ klas dɛn we de sɛt dimargin
ɔpadding
to$spacer
4
- (bay difɔlt) fɔ klas dɛn we de sɛt dimargin
ɔpadding
to$spacer * 1.5
5
- (bay difɔlt) fɔ klas dɛn we de sɛt dimargin
ɔpadding
to$spacer * 3
auto
- fɔ klas dɛn we de sɛt dimargin
to ɔto
(Yu kin ad mɔ saiz dɛn bay we yu ad ɛntri dɛn to di $spacers
Sass map vɛriɔbul.)
Na sɔm ɛgzampul dɛn we de sho dɛn klas ya:
Apat frɔm dat, Bootstrap gɛt bak wan .mx-auto
klas fɔ ɔrizɔntal sɛntrɛd fiks-wid blɔk lɛvɛl kɔntinyu—dat na, kɔntinyu we gɛt display: block
ɛn wan width
sɛt—bay we yu sɛt di ɔrizɔntal margin dɛn to auto
.