Ddamu okutandika
Reboot, okukuŋŋaanyizibwa kw'enkyukakyuka za CSS ezikwata ku elementi mu fayiro emu, kickstart Bootstrap okuwa omusingi omulungi, ogukwatagana, era omungu okuzimbako.
Okutuukirira
Reboot ezimba ku Normalize, okuwa ebintu bingi ebya HTML n'emisono egy'endowooza ezimu nga ekozesa ebisunsula ebintu byokka. Okukola sitayiro okw’enjawulo kukolebwa ne kiraasi zokka. Okugeza, tuddamu okutandika <table>
emisono egimu okusobola okufuna omusingi omunyangu ate oluvannyuma ne tuwa .table
, .table-bordered
, n’ebirala.
Wano waliwo ebiragiro byaffe n’ensonga lwaki olonze ky’olina okusazaamu mu Reboot:
- Update ezimu ku browser default values okukozesa
rem
s mu kifo kyaem
s for scalable component spacing. - Weewale
margin-top
. Vertical margins zisobola okugwa, ne zivaamu ebivaamu ebitali bisuubirwa. Kyokka ekisinga obukulu, obulagirizi bumu obwamargin
is a simpler mental model. - Okusobola okwanguyirwa okugerageranya mu sayizi z’ebyuma, ebitundu bya bulooka birina okukozesa
rem
s kumargin
s. - Kuuma ebirangiriro
font
by'ebintu ebikwatagana - nga bitono, nga okozesainherit
buli lwe kiba kisoboka.
Olupapula lusookerwako
Ebintu <html>
ne <body>
bitereezebwa okusobola okuwa ebisookerwako ebirungi ku lupapula lwonna. Okusingawo:
- The
box-sizing
eteekeddwa mu nsi yonna ku buli elementi —nga mw’otwalidde*::before
ne*::after
, okutuuka kuborder-box
. Kino kikakasa nti obugazi bwa elementi obulangirirwa tebusussa olw’okupadding oba ensalosalo. - Tewali base
font-size
elangirirwa ku<html>
, naye16px
eteeberezebwa (entandikwa ya browser).font-size: 1rem
ekozesebwa ku the<body>
for easy responsive type-scaling via media queries nga essa ekitiibwa mu by’abakozesa bye baagala n’okukakasa enkola etuukirirwa. - The
<body>
era eteekawo eky'ensi yonnafont-family
,line-height
, netext-align
. Kino kisikira oluvannyuma ebimu ku bikozesebwa mu ffoomu okuziyiza obutakwatagana mu fonti. - Ku lw'obukuumi, the
<body>
has a declaredbackground-color
, okulemererwa okutuuka ku#fff
.
Omutambi gw'empandiika enzaaliranwa
Empandiika z’omukutu ezisookerwako (Helvetica Neue, Helvetica, ne Arial) zisuuliddwa mu Bootstrap 4 ne zikyusibwamu “native font stack” okusobola okulaga obulungi ebiwandiiko ku buli kyuma ne OS. Soma ebisingawo ku nsengeka z'empandiika enzaaliranwa mu kiwandiiko kino ekya Smashing Magazine .
Kino font-family
kikozesebwa ku <body>
era automatically okusikira mu nsi yonna mu Bootstrap yonna. Okukyusa global font-family
, zza obuggya $font-family-base
era oddemu okukuŋŋaanya Bootstrap.
Emitwe n’ennyiriri
Ebintu byonna eby’omutwe —okugeza, <h1>
—era biddamu <p>
okuteekebwawo okusobola margin-top
okuggyibwawo kwabyo. Emitwe giyongeddeko margin-bottom: .5rem
n’obutundu margin-bottom: 1rem
okusobola okwanguyirwa okuteeka ebanga.
Omutwe | Eky'okulabirako |
---|---|
|
h1. Omutwe gwa bootstrap |
|
h2. Omutwe gwa bootstrap |
|
h3. Omutwe gwa bootstrap |
|
h4. Omutwe gwa bootstrap |
|
h5. Omutwe gwa bootstrap |
|
h6. Omutwe gwa bootstrap |
Enkalala
Enkalala zonna— <ul>
, <ol>
, ne <dl>
—zirina margin-top
eziggyiddwawo era a margin-bottom: 1rem
. Enkalala eziteekeddwa mu kiyumba tezirina margin-bottom
.
- Lorem ipsum dolor tuula amet
- Consectetur okusiiga elit
- Ennamba enzijuvu molestie lorem ku massa
- Facilisis mu kikuta kya pretium nisl
- Nulla volutpat aliquam omubisi gw’enjuki
- Ekitundu ekiyitibwa Phasellus iaculis neque ekiyitibwa ekimera ekiyitibwa Phasellus
- Purus sodales eddagala eriyitibwa ultricies
- Ekiwandiiko ekiyitibwa Vestibulum laoreet portttitor sem
- Ac tristique libero volutpat ku bwesigwa ku
- Faucibus porta lacus eriko ekikuta ky’omubiri ekiyitibwa fringilla vel
- Aenean okutuula amet erat nunc
- Eget omuwala lorem
- Lorem ipsum dolor tuula amet
- Consectetur okusiiga elit
- Ennamba enzijuvu molestie lorem ku massa
- Facilisis mu kikuta kya pretium nisl
- Nulla volutpat aliquam omubisi gw’enjuki
- Faucibus porta lacus eriko ekikuta ky’omubiri ekiyitibwa fringilla vel
- Aenean okutuula amet erat nunc
- Eget omuwala lorem
Okusobola okukola sitayiro ennyangu, ensengeka entegeerekeka obulungi, n’okuteeka ebanga eddene, enkalala z’ennyonnyola zirina margin
s ezitereezeddwa. <dd>
s okuddamu okuteeka margin-left
ku 0
n'okugattako margin-bottom: .5rem
. <dt>
s ziwandiikiddwako enzirugavu .
- Enkalala z’ennyonnyola
- Olukalala lw’ennyonnyola lutuukiridde okunnyonnyola ebigambo.
- Euismod
- Ensigo id ligula porta felis euismod ensigo eget lacinia odio sem.
- Donec id elit etali ya mi porta gravida ku eget metus.
- Malesuada eriko ensolo
- Etiam porta sem omusajja omunene ennyo omuto.
Ebiwandiiko ebitegekeddwa nga tebinnabaawo
Element <pre>
eddamu okuteekebwawo okuggyawo yaayo margin-top
n'okukozesa rem
units zaayo margin-bottom
.
.ekyokulabirako-ekintu { . margin-wansi: 1rem; } .
Emmeeza
Emmeeza zitereezebwa katono ku sitayiro <caption>
s, okugwa ensalosalo, era okukakasa nti zikwatagana text-align
wonna. Enkyukakyuka endala ku nsalo, padding, n'ebirala bijja ne .table
class .
Omutwe gw’emmeeza | Omutwe gw’emmeeza | Omutwe gw’emmeeza | Omutwe gw’emmeeza |
---|---|---|---|
Akasengejja k’emmeeza | Akasengejja k’emmeeza | Akasengejja k’emmeeza | Akasengejja k’emmeeza |
Akasengejja k’emmeeza | Akasengejja k’emmeeza | Akasengejja k’emmeeza | Akasengejja k’emmeeza |
Akasengejja k’emmeeza | Akasengejja k’emmeeza | Akasengejja k’emmeeza | Akasengejja k’emmeeza |
Ffoomu
Ebintu eby'enjawulo ebya ffoomu bizzeemu okutandika okusobola okukola emisono egy'omusingi egyangu. Wano waliwo enkyukakyuka ezisinga okweyoleka:
<fieldset>
s tezirina nsalo, padding, oba margin kale zisobola bulungi okukozesebwa nga wrappers for individual inputs oba groups of inputs.<legend>
s, nga fieldsets, nazo zikyusiddwa okulagibwa nga omutwe gw'ebika.<label>
s ziteekebwa kudisplay: inline-block
okukkirizamargin
okukozesebwa.<input>
s,<select>
s,<textarea>
s, ne<button>
s zisinga kukolebwako Normalize, naye Reboot eggyawo zaabwemargin
ne ziteekawoline-height: inherit
, nazo.<textarea>
s zikyusibwa okubeera zokka ezisobola okukyusibwa obunene mu vertikal nga okukyusa obunene obw’okwebungulula kitera “okumenya” ensengeka y’olupapula.<button>
s ne<input>
button elements zirinacursor: pointer
ddi:not(:disabled)
.
Enkyukakyuka zino, n’ebirala, biragiddwa wansi.
Ebintu eby’enjawulo
Okwoogera eri
Element <address>
etereezebwa okuddamu okuteekawo browser default font-style
okuva italic
ku normal
. line-height
nayo kati yasikira, era margin-bottom: 1rem
eyongerwako. <address>
s ziri za kwanjula ebikwata ku bantu abakwatagana ne jjajja asinga okumpi (oba omubiri gwonna ogw’omulimu). Kuuma ensengeka ng'omaliriza ennyiriri ne <br>
.
Market St, Suite 900
San Francisco, CA 94103
P: (123) 456-7890. Enkola y’okukozesa eddagala lino Erinnya mu bujjuvu
[email protected]
Blockquote nga bwe kiri
Ekisookerwako margin
ku blockquotes kiri 1em 40px
, kale tuddamu okuteeka ekyo ku 0 0 1rem
ku kintu ekisinga okukwatagana n'ebintu ebirala.
Lorem ipsum dolor okutuula amet, okusengejja amasavu elit. Namba enzijuvu posuere erat a ante.
Ebintu ebiri mu layini
Element <abbr>
efuna sitayiro enkulu okugifuula eyawukana mu biwandiiko by’akatundu.
Okubumbako
Ekisookerwako cursor
ku bufunze kiri text
, kale tuddamu okuteeka ekyo ku pointer
okutuusa nti elementi esobola okukwatagana nayo nga tuginyigako.
Ebimu ku bikwata ku nsonga eno
Ebisingawo ku bikwata ku nsonga eno.
Ebisingawo n’okusingawo
Wano waliwo ebisingawo ku bikwata ku nsonga eno.
[hidden]
Ekintu ekiyitibwa HTML5
HTML5 eyongerako ekintu ekipya eky'ensi yonna ekiyitibwa[hidden]
, ekikoleddwa nga display: none
bwe kibadde. Borrowing an idea from PureCSS , tulongoosa ku default eno nga tukola [hidden] { display: none !important; }
okuyamba okuziyiza yaayo display
okuva mu butanwa overridden. Wadde [hidden]
nga si natively supported by IE10, okulangirira okw'olwatu mu CSS yaffe kwetoloola ekizibu ekyo.
jQuery obutakwatagana
[hidden]
tekwatagana na jQuery's $(...).hide()
n'enkola $(...).show()
. N’olwekyo, mu kiseera kino tetuwagira naddala [hidden]
ku bukodyo obulala obw’okuddukanya display
eby’ebintu.
Okukyusakyusa kwokka okulabika kw’ekintu, ekitegeeza nti kyayo display
tekikyusiddwa era ekintu ekyayinza okukosa entambula y’ekiwandiiko, kozesa kiraasi mu.invisible
kifo ky’ekyo.