text
stringlengths 1
81
| start
float64 0
10.1k
| duration
float64 0
24.9
|
|---|---|---|
is that they too can
be mobile responsive.
| 6,186.82
| 2.4
|
They too can wrap around other
lines if they ever need to.
| 6,189.22
| 3.81
|
So, for example, let me
pull up columns one.html.
| 6,193.03
| 2.83
|
Here, for example, I have a row.
| 6,198.53
| 2.27
|
And let's take a look at
what's going on in here.
| 6,200.8
| 2.05
|
Recall that every row in Bootstrap
is divided up into 12-column units.
| 6,202.85
| 5.04
|
But Bootstrap, in addition to letting
me specify how many units a column
| 6,207.89
| 3.51
|
should take up, also lets me
specify how many units that column
| 6,211.4
| 3.45
|
should take up depending
on the size of the screen.
| 6,214.85
| 3.25
|
So if I'm on a large
screen, as indicated by LG,
| 6,218.1
| 3.95
|
this is saying that on
a large screen, this div
| 6,222.05
| 2.97
|
should take up 3 units of space.
| 6,225.02
| 2.34
|
And this div should also
take up 3 units of space.
| 6,227.36
| 2.42
|
And for each of these four
divs, on a large screen,
| 6,229.78
| 2.98
|
each will take up 3 of the
total 12 units of space.
| 6,232.76
| 3.66
|
So they'll all show up on one row.
| 6,236.42
| 2.91
|
What happens on a small screen, though?
| 6,239.33
| 2.4
|
Well, here col sm, for
column on a small screen,
| 6,241.73
| 3.72
|
I've said on a small screen
each column should only
| 6,245.45
| 2.49
|
take up 6 units of space, 6, or half,
of the total 12 that I have in the row.
| 6,247.94
| 5.7
|
And so I use up 6 here,
6 here for a total
| 6,253.64
| 2.16
|
of 12 in one row, which means
the next two, also a size 6,
| 6,255.8
| 4.29
|
need to go on to a second row.
| 6,260.09
| 2.13
|
And Bootstrap is smart
enough to do this math for me
| 6,262.22
| 2.55
|
and figure out how exactly these
elements should ultimately be laid out.
| 6,264.77
| 4.44
|
So now if I open up columns 1.html and
see what's there, on a large screen,
| 6,269.21
| 8.21
|
I see four columns, all in the same row.
| 6,277.42
| 2.91
|
But as I shrink down
to a smaller screen,
| 6,280.33
| 1.92
|
eventually we'll see that things change.
| 6,282.25
| 3.15
|
I now see the third and fourth
sections move down onto the second row,
| 6,285.4
| 4.14
|
because on a smaller screen
now, when the window is smaller,
| 6,289.54
| 3.9
|
now I only have the ability to show
two elements in any particular row.
| 6,293.44
| 3.91
|
So I get to on the first row and
then two on the row underneath that.
| 6,297.35
| 5.14
|
So all in all, there are
a lot of different ways
| 6,302.49
| 2.32
|
now that we can use CSS in order to make
sure our pages are mobile responsive.
| 6,304.81
| 4.07
|
We can use Bootstrap
column model to make
| 6,308.88
| 2.25
|
sure the columns move around whenever
a size of the window shrinks or grows.
| 6,311.13
| 4.35
|
We can also use things like
flexbox and the grid model,
| 6,315.48
| 2.49
|
writing our own CSS to make sure
that our page is responsive depending
| 6,317.97
| 4.29
|
on the size of the screen that the
user happens to be using in order
| 6,322.26
| 3.3
|
to visit our website page.
| 6,325.56
| 1.69
|
So these are some of the very powerful
features that we get using just CSS.
| 6,327.25
| 5.06
|
But one thing you might imagine is that
as we begin to write more and more CSS,
| 6,332.31
| 3.84
|
there's going to be more and more
repetition, things that appear again
| 6,336.15
| 3.81
|
and again and again.
| 6,339.96
| 1.55
|
And we've already seen some ways that
we can minimize redundancy in CSS.
| 6,341.51
| 3.43
|
We've seen how we can move CSS into
the style section of our web page.
| 6,344.94
| 4.38
|
We've even seen how we can move
CSS to an entirely different file.
| 6,349.32
| 4.15
|
However, what we haven't yet seen is how
to deal with other types of redundancy.
| 6,353.47
| 5.12
|
And so let's take a look
at an example of that now.
| 6,358.59
| 3
|
Let's imagine, for example,
that I want to style
| 6,361.59
| 2.31
|
multiple different elements in different
ways, but using some common properties.
| 6,363.9
| 6.28
|
So, for example, let me create a
new file that I'll, in this case,
| 6,370.18
| 2.75
|
call variables.html.
| 6,372.93
| 2.49
|
And you'll see why in a moment.
| 6,375.42
| 1.86
|
I'll go ahead and copy
hello.html, but I'll get rid
| 6,377.28
| 2.58
|
of all this Bootstrap inside of it.
| 6,379.86
| 2.81
|
Let's imagine that here I have in
maybe two list, an ordered list
| 6,382.67
| 4.67
|
and an unordered list,
where my unordered list has
| 6,387.34
| 5.07
|
an ordered item, maybe
three unordered items,
| 6,392.41
| 4.11
|
and my ordered list also
has three ordered items.
| 6,396.52
| 5.25
|
Again, just for sake
of demonstration, I'm
| 6,401.77
| 1.86
|
showing that we have
these two lists now.
| 6,403.63
| 2.13
|
And I'll open up
variables.html just to give you
| 6,405.76
| 3.42
|
a sense for what that could look like.
| 6,409.18
| 3.09
|
We have three unordered
items in an unordered list,
| 6,412.27
| 2.82
|
three ordered items in our ordered list.
| 6,415.09
| 3.09
|
Let's imagine I wanted to style
these a little bit differently.
| 6,418.18
| 3.28
|
Maybe inside the style
section of my page
| 6,421.46
| 2.33
|
I want to style the unordered list
to have a font size of 14 pixels
| 6,423.79
| 5.13
|
and maybe a color of red.
| 6,428.92
| 2.34
|
And my ordered list, I would like that
to have a font size of maybe larger, 18
| 6,431.26
| 4.47
|
pixels, but also a color of red.
| 6,435.73
| 2.2
|
I want to keep the same
color for all the text,
| 6,437.93
| 2.3
|
but I want the font
sizes to be different.
| 6,440.23
| 2.97
|
Now, if I refresh this
page, here's what I see.
| 6,443.2
| 2.19
|
They are indeed of different sizes.
| 6,445.39
| 1.6
|
The ordered list items are larger
than the unordered list items.
| 6,446.99
| 3.71
|
And they're all red.
| 6,450.7
| 1.66
|
But there was some
redundancy, some repetition
| 6,452.36
| 2.15
|
that was introduced when
I was writing my CSS code.
| 6,454.51
| 3
|
In particular when I
was writing my CSS code,
| 6,457.51
| 3.51
|
I've repeated this
usage of the color red.
| 6,461.02
| 2.7
|
If I ever want to change the color
from red to blue, for example,
| 6,463.72
| 2.88
|
I'm going to have to change my
code in two different places.
| 6,466.6
| 3.66
|
Ultimately, I'd just like for my CSS
to be a little bit more powerful.
| 6,470.26
| 4.28
|
And so that brings us to our last topic
today, which is a language called Sass.
| 6,474.54
| 4.54
|
And Sass is a language that is
essentially an extension to CSS.
| 6,479.08
| 3.78
|
It adds additional
features to what CSS has
| 6,482.86
| 2.46
|
to offer, just to make
it a little bit more
| 6,485.32
| 1.98
|
powerful for us to be able to use
and manipulate CSS in a way that's
| 6,487.3
| 3.72
|
going to be faster and
remove some of the repetition
| 6,491.02
| 3.33
|
that we might have
had in CSS previously.
| 6,494.35
| 2.58
|
And one of the key features of Sass
is the ability to have variables.
| 6,496.93
| 5.26
|
So let's take a look at
an example of this now.
| 6,502.19
| 2.6
|
I'm going to create a new file,
normally when we created our CSS files,
| 6,504.79
| 3.6
|
we called them like
variables.css, something
| 6,508.39
| 3
|
dot CSS to stand for a CSS file.
| 6,511.39
| 3.12
|
Sass is a different language, though.
| 6,514.51
| 2.04
|
So it's going to require
a different extension.
| 6,516.55
| 2.22
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.