[Bootstrap Knowledge] Flashcards

1
Q

How to make no paddings between columns in a row?

A

Use class .no-gutters (on a row?)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do I install boostrap with npm?

A

npm install bootstrap

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to implement themify icon in span.

A

<span></span>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

different font colors

A
class=
text-primary
text-secondary
text-success
text-danger
text-warning
text-info
text-light bg-dark
text-dark
text-body
text-muted
text-white bg-dark
text-black-50
text-white-50 bg-dark
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to define a flex box container which arranges all items in one single row:

1) from the left
2) from the right

A
<div class="d-flex flex-row">
    <div>1</div>
    <div>2</div>
    <div>3</div>
</div>
<div class="d-flex flex-row-reverse">
    <div>1</div>
    <div>2</div>
    <div>3</div>
</div>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to align the content in a flexbox container.

A
justify-content-start,
justify-content-center,
justify-content-end,
justify-content-around,
justify-content-between

If we’re applying those classes to a <b>flex row</b> we’re aligning the content <b>horizontally</b>.

If those classes are applied to a <b>flex column</b> the alignment is done <b>vertically</b>.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to define a flex box container which arranges all items in one single column:

1) from the top
2) from the bottom

A
<div class="d-flex flex-column">
    <div>1</div>
    <div>2</div>
    <div>3</div>
</div>
<div class="d-flex flex-column-reverse">
    <div>1</div>
    <div>2</div>
    <div>3</div>
</div>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the classes for:

Bold text.
Normal weight text.
Light weight text.
Italic text.

Lowercased text.
Uppercased text.
CapiTaliZed text.

A

font-weight-bold
font-weight-normal
font-weight-light
font-italic

text-lowercase
text-uppercase
text-capitalize

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How to make that text should overflow the parent.

A

class=”text-nowrap”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are text alignment classes:

justify
left
center
right

A

class=

text-justify
text-left
text-center
text-right

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the important globals when making new bootstrap project?

A
  • HTML5 doctype
    Bootstrap requires the use of the HTML5 doctype. Without it, you’ll see some funky incomplete styling, but including it shouldn’t cause any considerable hiccups.…
  • Responsive meta tag
    Bootstrap is developed mobile first, a strategy in which we optimize code for mobile devices first and then scale up components as necessary using CSS media queries. To ensure proper rendering and touch zooming for all devices, add the responsive viewport meta tag to your .

You can see an example of this in action in the starter template.

  • Box-sizing
    For more straightforward sizing in CSS, we switch the global box-sizing value from content-box to border-box. This ensures padding does not affect the final computed width of an element, but it can cause problems with some third party software like Google Maps and Google Custom Search Engine.
  • Reboot
    For improved cross-browser rendering, we use Reboot to correct inconsistencies across browsers and devices while providing slightly more opinionated resets to common HTML elements.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the responsive breakpoints in bootstrap?

A

Since Bootstrap is developed to be mobile first, we use a handful of media queries to create sensible breakpoints for our layouts and interfaces. These breakpoints are mostly based on minimum viewport widths and allow us to scale up elements as the viewport changes.

Since we write our source CSS in Sass, all our media queries are available via Sass mixins:

// No media query necessary for xs breakpoint as it's effectively `@media (min-width: 0) { ... }`
@include media-breakpoint-up(sm) { ... }
@include media-breakpoint-up(md) { ... }
@include media-breakpoint-up(lg) { ... }
@include media-breakpoint-up(xl) { ... }
// Example: Hide starting at `min-width: 0`, and then show at the `sm` breakpoint
.custom-class {
  display: none;
}
@include media-breakpoint-up(sm) {
  .custom-class {
    display: block;
  }
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the main utilities for layout?

A

Changing display
Flexbox options
Margin and padding
Toggle visibility

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Bootstrap heading - sizes

A
h1 Bootstrap heading (2.5rem = 40px)
h2 Bootstrap heading (2rem = 32px)
h3 Bootstrap heading (1.75rem = 28px)
h4 Bootstrap heading (1.5rem = 24px)
h5 Bootstrap heading (1.25rem = 20px)
h6 Bootstrap heading (1rem = 16px)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are Bootstrap 4 Default Settings?

A

Bootstrap 4 uses a default font-size of 16px, and its line-height is 1.5.

The default font-family is “Helvetica Neue”, Helvetica, Arial, sans-serif.

In addition, all <p> elements have margin-top: 0 and margin-bottom: 1rem (16px by default).</p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do you can add opacity to the text?

A

You can add 50% opacity for black or white text with the
.text-black-50
.text-white-50
classes.

17
Q

What are the classes for background colors?

A

The classes for background colors are: .bg-primary, .bg-success, .bg-info, .bg-warning, .bg-danger, .bg-secondary, .bg-dark and .bg-light.

18
Q

What can be done for text to stand out more than normal headings (larger font-size and lighter font-weight)?

A

Display headings are used to stand out more than normal headings (larger font-size and lighter font-weight), and there are four classes to choose from: .display-1, .display-2, .display-3, .display-4

19
Q

What are:
<small></small>

<abbr>
<blockquote>
<dl>
<code>
<kbd>
<pre></pre></kbd></code></dl></blockquote></abbr></small>
A

In Bootstrap 4 the HTML <small> element is used to create a lighter, secondary text in any heading.</small>

Bootstrap 4 will style the HTML element with a yellow background color and some padding.

Bootstrap 4 will style the HTML <abbr> element with a dotted border bottom.</abbr>

Add the .blockquote class to a <blockquote> when quoting blocks of content from another source.

Bootstrap 4 will style the HTML <dl> element in the following way.

Bootstrap 4 will style the HTML <code> element in the following way.</code>

Bootstrap 4 will style the HTML <kbd> element in the following way.</kbd>

Text in a pre element is displayed in a fixed-width font, and it preserves both spaces and line breaks.</kbd></code></dl></blockquote></abbr></small>

20
Q

Lists in Bootstrap?

A

Unstyled

Remove the default list-style and left margin on list items (immediate children only). This only applies to immediate children list items, meaning you will need to add the class for any nested lists as well.

Inline

Remove a list’s bullets and apply some light margin with a combination of two classes, .list-inline and .list-inline-item.

Description list alignment

Align terms and descriptions horizontally by using our grid system’s predefined classes (or semantic mixins). For longer terms, you can optionally add a .text-truncate class to truncate the text with an ellipsis.
<dl class="row">
  <dt class="col-sm-3">Description lists</dt>
  <dd class="col-sm-9">A description list is perfect for defining terms.</dd></dl>
21
Q

What are grid breakpoints?

A
<576px 	Extra small
≥576px 	Small
≥768px 	Medium
≥992px 	Large
≥1200px  Extra large