0:00
hope everyone's doing great get some uh confirmation in the chat
0:06
that uh we're good to go hopefully we are
0:12
live boom there we go I see some people now
0:27
they I was working on some uh some new Stacks today maybe I can uh give you a quick sneak peek in a little
0:35
bit
0:41
Mr Cole Dave Mr Francis
0:46
Dr Bob is in the house okay
0:52
see quite a few people that uh were on the hangout on Friday so you're gonna see a little bit of what we did on
0:58
Friday but I'll probably build upon that and play around and yeah
1:04
um I have an idea what I'm gonna do but yeah I'd uh I thought it would be more fun as usual just to fly by the seat of
1:11
my pants right so uh Phil how you doing
1:20
excellent hopefully uh everyone's getting back into the swing of things from the holidays
1:27
it is cold here this morning my hands are freezing actually it's making me uh fat finger type things wrong all over
1:34
the place okay so today we're going to be talking
1:39
about circles right um seems like kind of a boring thing but
1:45
uh not everything on the web is a circle right I mean by default everything is
1:51
kind of a square so how can we uh how can we make circles and
1:58
um after that we'll probably just uh play around I have some cool ideas of some stuff I've actually done in
2:03
previous demos of other Stacks that I think would be fun to play around with some circles so uh not sure how that's
2:11
gonna all pan out but we'll have some fun
2:16
oh Fernando going rowing nice okay
2:22
um let's see let's uh share my screen
2:31
this probably be a quick one today I think uh probably won't go too long I don't know we'll see I say that now but
2:36
once I get going and you guys start asking questions we just go and go and go right
2:42
um so let's go ahead and launch wrap Weaver I'm actually just I'm gonna create a new project we're just gonna
2:48
start from scratch
2:53
okay so
2:59
total CMS Fernando not sure what your question of TCMS is
3:05
um well I show off to Total CMS today I don't know maybe we'll play around with whole CMS with circles not sure
3:12
um maybe in a blog list or something like that we'll play around okay um
3:18
so who knows in chat let me know hopefully
3:23
our delay isn't too big um in order to create a circle
3:28
what do we want to start with okay so um I'm gonna go ahead and uh let's
3:35
just throw in a Chuck in a container and a one column which is kind of like our my default uh starting point for things
3:43
okay so as we know um or we should know probably
3:49
um everything inside a rectangle okay so let's start off with a rectangle everything everything is a
3:56
rectangle right um so let's have this one column I'm going to Chuck in a background here
4:02
um so let's just do BG primary why not okay which is a
4:08
um class all right uh actually we need to add a uh so by default uh this one column I
4:17
preview this page right and we see nothing on the page um and that's because that one column
4:22
has zero um content into it right so let's just
4:27
give it a little bit height I'm just going to use some utility classes here I'm just going to do H uh 256 right oops
4:34
256 not 156. two
4:41
oops isn't 256 a number oh I need site styles on the page it's kind of a requirement isn't it
4:49
all right uh let's just let's just slim this bad boy down
4:55
I'll keep the sizing chart actually and we're going to streamline it mode okay uh I I think that it's tough for some
5:02
people all right there we go now I see my print my BG primary background and my
5:07
height 256. okay there we go rookie move I know right Jesus
5:20
thanks goat Prince you are the king of the internet today president of the internet sorry president of the internet
5:26
okay um so I have I started with a rectangle
5:32
okay um which is the starting point okay
5:37
let's just add some uh some gutters on here so we have a little bit of uh oh that adds it on the I'm just gonna
5:45
add some margin to this container really quick just so we can have some spacing uh margin I don't know let's do like 64.
5:52
why not okay let's do my Mt
5:57
okay so I have this rectangle okay
6:03
um so how can we make this rectangle a Circle well it as I've probably you've
6:11
probably heard me say man there is so many ways to accomplish things so we're we're gonna look at multiple different
6:17
ways to accomplish creating a circle today and the first one is not necessarily the
6:24
starting from a rectangle but starting from a square okay
6:29
um because I can add I can't really turn a rectangle into a circle so what we need
6:36
to do is we need to get it into a square because this circle ha has the same height and width correct so the closest
6:43
thing in a rectangle world to that is a square okay so let's go to this this one
6:49
column um and let's add a uh let's just do like with colon 256.
6:56
because I already set a height on it okay sweet
7:03
all right um I am using some utility classes here um we could just let's go ahead and uh
7:10
some of you want to see that I know some of you are scared of of SWAT of utility swatches so I'm going to redo all of
7:17
this that I just did with this background color and these inside of some swatches okay so we're gonna go
7:23
over here and uh I'm gonna use the height Swatch okay and let's just call this circle
7:30
okay and um let's just do a simple height of I
7:36
did 256 okay um and then we're going to create a with Swatch I'm also going to give this a
7:43
class of circle okay and simple we're just going to go
7:48
ahead and make it the same exact um size is the height okay which is 256
7:54
pixels and we need to give it a background color so let's go ahead and do background and again we're gonna We want this all
8:01
to be a part of circle so I'm gonna make this also apply to the classic circle
8:07
now I know uh some of you um might be confused here you can add the
8:13
same class across multiple swatches okay because whenever I add a circle
8:18
class it's going to get this height this width and a background so let's give it a background color
8:24
I'm sure let's make the default a boring gray okay let's make a default the boring Gray
8:31
um okay because we're gonna we're gonna Jazz it up a little bit later on
8:36
um so let's go ahead and in order to apply those to my column here I'm going to add a class of circle
8:47
and voila hopefully you see that we have a gray Square
8:54
fun times how exciting is that now okay I have a square how do I turn that
9:01
square into a actually no let's go ahead and I'm going
9:08
to shrink this down because we're playing with this square and we got big enough screens here let's uh hide that
9:14
let's just hide that oops all right that all right the stacks we don't need that right now all right
9:20
we're gonna that way we can kind of see everything in one strategize this a little bit better
9:26
okay so now I have a square let's go ahead and uh do a Swatch one more Swatch
9:33
and any anyone any bonus points how can I turn a
9:39
square into a circle we want to make the edges instead of sharp we want to round them off right so
9:47
funny enough guess what Swatch we're going to use we're going to use a rounding Swatch okay
9:54
excellent and then uh we're gonna do a class of circle on that
10:00
okay and basically what we want is um we're gonna do a percentage
10:08
um well there's let me just show you something so if I go ahead and do a radius of 10 pixels okay let's preview
10:14
that we'll see that I get a nice rounded Corner Square okay and if you know the unit here is
10:21
pixels okay and one thing I could do is I can make this like 5 000 I can make
10:26
this super big okay and when I do that that gets me a circle okay because this this
10:34
Square um is only 256 pixels so technically if I go up to
10:40
um 128 actually okay it still gets a circle but if I
10:46
start going less than let's do like 96 okay you'll see that I now start getting more
10:52
of a a very round square right okay so if you do pixels the pixel has to be 50
10:59
of the width and height now instead of having to do all that crazy math in our
11:05
heads let's just go ahead and use percentages and we're going to set the radius to be 50 percent
11:12
okay so that way um no matter out no matter the size of
11:18
our Square we will always get a radius of 50 percent
11:23
okay so again I just set the uh rounding to use percentages and then I set the
11:29
radius to be 50. okay so that way basically what that does is it goes 50
11:35
the width and height it makes it completely round all the way around okay now you can actually go larger than
11:41
if you did like 60 it doesn't matter it will still look like a square right um
11:48
but 50 is is the minimum if you did 49 let's see what 49 even looks like
11:56
it still kind of looks like a circle but it actually isn't okay so um 50 is what
12:02
we want sweet so now we have the recipe to make a
12:09
circle super simple it's just making sure it has a width and a height and a
12:16
background and rounding okay now this is cool but like this circle is
12:26
it's always it's static right uh and that's okay for for certain
12:32
layouts right um it works really really well let's say for example
12:39
um I wanted two circles okay let's just go ahead and um I'm gonna add a two column in here
12:46
okay and uh we're gonna go there and we're
12:51
gonna go there okay let's preview that okay so now I have two circles but if
12:57
you notice like the circles never change right they're always the same size they're always 256 pixels
13:05
and and again that that is okay for some layouts maybe you want them to be a fixed size but what if we wanted to make
13:12
these circles responsive okay um so actually you know what I can do
13:17
I'm going to go ahead and cut we'll kind of do this in stages we're gonna do this step one so that way
13:23
when I share this project you guys can see okay so now we're gonna do step two
13:31
okay that way I yeah I like that let's do that okay so now we're in step two
13:36
okay yeah and let's go ahead and save this project so that uh make sure we save it
13:45
let's do circles Circle fun
13:51
I say that on my desktop okay so now we have this now now let's go
13:58
ahead and in this we're going to make these circles responsive okay [Music]
14:05
um so right now in order to make something responsive like we can't give it a static width right so I'm going to
14:10
go ahead and ditch that okay I I don't want it to have a static width what does that do for us
14:16
okay well that doesn't necessarily do what we want because now I no longer
14:22
have circles I have ovals okay which is if you know if you wanted an oval guess
14:27
what if you give a rectangle okay a
14:33
border radio or a rounding a 50 guess what you get you get an oval
14:38
okay but they are responsive look look at that they're they're responsive ovals
14:44
that's cool okay but how can we make sure that
14:51
um that we still get circles so essentially these ovals always have a
14:56
height of 256 pixels okay but that's not what we want
15:02
okay so let's go ahead I'm going to add actually a little bit of gutter here just for fun okay just so there's a little bit of separation between these
15:08
bad boys all right so now I have these two eggs that at some point they start looking like
15:14
circles okay um they're not exactly circles but at some point they're probably A Perfect
15:19
Circle somewhere around there okay but we don't need we can't give it a static
15:25
height okay so we need to ditch that we need to ditch the static height
15:32
so what do we need to do now okay so there is a if you have a Swatch
15:38
pack there is an aspect racing ratio Swatch
15:45
okay and let's apply this to be Circle
15:50
and what we want is we want the aspect ratio to be one to one
15:58
okay so on a circle I always want the width to be the same as the height
16:06
so one to one says whenever we have a width of one or let's say a width of 100
16:13
make the height 100. whenever we have a width of 200 make the height 200. so
16:19
this is essentially ensures that um a circle is always a one-to-one ratio
16:29
voila there we go we got circles but let's verify that it's going to be responsive they grow and they shrink
16:36
well they shrink right so now we have responsive circles
16:44
[Music] sweet
16:49
okay uh another thing that we could do um let's play around with some circles okay
16:55
um let's go ahead and uh I guess we'll do step three I'm not sure uh when is
17:02
going to be a proper place to so we'll just keep going step three okay
17:07
step three is we're just gonna add some content here okay and kind of make it um make it interesting
17:15
okay [Music] um so let's say I want to have text in my
17:21
circle okay and I want it to be centered sounds reasonable right okay so let's go
17:28
ahead and let's just get like a header header I'm going to add a header into
17:34
there and all of a sudden I am like crazy hungry okay let's go there
17:43
uh let's close that okay let's go ahead and preview this
17:50
okay so here is my content and if you look at hey the content is automatically
17:57
Centered for me that's kind of cool um and if you're curious why that is actually the aspect ratio ratio Swatch
18:04
is doing that for us okay because we have content align middle set on the aspect ratio okay
18:12
um if you're using the the fixed size circles like we were doing before and you're not using aspect ratio
18:19
um well first off actually um here here's here's some fun let's do
18:26
I'm gonna duplicate step one we're gonna go back to these fixed size ones okay and let's do a step 1.5
18:34
okay uh because I'm going to show you how you can still get static height but then get
18:39
the uh get that aspect ratio kind of working as well um there's so many ways to skin a cat
18:45
here um so we're gonna we're gonna ditch this height
18:51
okay and then I can do aspect ratio and we're going to do Circle
19:00
um one to one okay and at that point that's going to be the same
19:06
right um because I I'm statically setting my width I can then use aspect ratio now
19:13
these aren't going to make it responsive because we still have the the width is still static okay I just wanted to show
19:19
you that um but actually what I really wanted to show you uh or let's go back to give me my height
19:26
Swatch back see how many undo's I did in Stacks five Great Stuff dude okay
19:34
um so I wanted to show you a how we could center content okay
19:39
um inside these circles
19:45
uh I'm just gonna do the text a little bit shorter because these are smaller circles here
19:58
all right so here I have live and we have our fixed width circles
20:04
oops oh no I deleted my rounding Swatch all right oops it's easy to put that
20:11
back Circle percentage 50.
20:18
50 boom okay now you might be thinking what the heck Joe that is uh
20:25
that text is at the top left corner right and that's because that's where text starts by default
20:31
right um so text starts at the top left corner but we want it dead smack in the center
20:39
Okay so if we go to our one columns okay you'll
20:44
notice that we we have content alignment options here as well as column alignment
20:49
options okay and so what I'm going to do is I'm going to do
20:55
um vertical alignment middle okay and let's preview that
21:01
and voila if we look at that we have dead smack in the in the
21:06
vertical middle we're going to do that and then next I'm going to set my content alignment which is like text alignment because this is just text I'm
21:13
going to set that to be centered okay and voila
21:20
okay um that's how you would do it again without aspect ratio because that aspect
21:26
ratio Swatch has that content alignment middle for us I wanted to show you how you can do that
21:32
um in this method okay using the columns because columns have that same setting
21:38
as the aspect ratio which is vertical alignment and you set that to Middle then we Center our text with content
21:44
alignment Okay so um there's that let's go back to step three okay
21:51
and let's have a look at this bad boy again so here we had two circles and ours we vertically aligned uh by default
21:58
that's aspect ratio does that for us okay but we still need to Center our text or our content so let's go to these
22:05
one columns and I'm just going to set uh Center for Content alignment
22:14
and voila pretty slick right so there is a circle with some text
22:23
okay um so let's start playing around with these things let's um
22:28
let's say I want to have different color circles okay so um you know but I wanna
22:37
I don't want to recreate let's say I want to make this first one A blue circle and I want to make this second
22:43
one a red circle okay so you might be thinking well okay so
22:49
now I need to create a red circle class and then on this second column I need to create a blue circle class
22:56
and does that mean I need to duplicate all of these swatches here and create
23:01
two of them no okay remember we we're Foundation six is all about efficiency
23:08
okay um I'm gonna get rid of that we don't we don't need sizing chart okay
23:14
so I'm gonna keep these circles because this defines what a circle is
23:21
okay a circle is about has a this background color by default um it has a rounding and it has aspect
23:27
ratio all right pretty cool
23:34
so let's go ahead and start creating um some color variations of our Circle
23:41
okay and so I'm just going to duplicate uh let's go ahead and I'm going to move these
23:47
up to the front Okay now we have this is our default color for a circle but let's
23:52
say I want to add if Circle also has the red class
23:58
okay um I'm gonna do something else so what I'm going to do is I'm going to do Circle dot red
24:07
okay so if if a circle if it something has a class of circle
24:13
and a class of red we're going to get this color Okay so we're going to go ahead and do red
24:21
okay and I said I wanted a blue one as well okay so I'm going to do Circle dot
24:26
blue okay and let's go ahead and set a blue color
24:35
let's do that color blue all right so down here
24:41
um what I'm going to do is I'm going to do Circle space red
24:48
okay so I'm adding two classes here I have Circle and red
24:54
and then in this one instead of now this one is still gray because I said the default color for us of a circle is gray
25:02
so when it's just a circle it's going to be Gray when it has Circle and red the
25:07
background color is red when it's Circle and blue it's going to be blue so if I want to make this one blue I'm going to
25:13
do Circle space blue
25:20
okay now this is different if you notice in this Swatch I did Circle dot red not
25:25
space red okay and that's because in CSS I I'm the
25:31
thing that defines a class is a DOT okay so um I'm saying to this Swatch find
25:39
something that has a class of circle and a class of red
25:48
okay so if we look at these obviously these are going to be a blue circle or a red
25:55
circle and a blue circle which pillar you going to take Neo right
26:00
so if we want to do pills let's do I don't know what would that be like a four by three something like that
26:09
needs to be and Border radius needs to be a little less to make these look like pills but oh well it's okay we won't do
26:15
the Matrix let's let's stick with circles getting off on a tangent here all right
26:21
stick with our circles okay glad you're learning something new Mark
26:27
okay um no we we could do something completely
26:33
different we can add background images we could do all kinds of stuff right here right so um
26:41
let's do I'm going to duplicate this let's do um
26:50
I'm pretty much just kind of doing let's do step four
26:56
okay now just to say for step three I mean you can now create this infinite right you can have a million different
27:01
Circle colors okay that's red blue purple green whatever
27:07
okay um and I should say probably an interesting use case this is a great use
27:13
case for pen okay so if we go ahead and add pen into here
27:18
um we can say um Circle Styles okay
27:25
and then what I do is I'm going to create I'm going to add all of these into a pen and voila there I have a pen that has
27:33
all of my circle styles okay I Define what a circle is it has a
27:40
border radius of 50 percent has an aspect ratio of one by one okay and then
27:45
I have different customizations you can even do borders you can do all kinds of stuff you can style these things to your
27:51
heart's content okay now this I should say that this this
27:57
little circle.red thing while I'm doing this for circles you can take this knowledge and apply it to all kinds of
28:03
different things okay we're just using it for circles right now so think how you can take what
28:10
you're what you just learned and apply it to other things okay
28:18
okay let's go ahead and go to step four okay oops
28:26
um I'm not gonna do background colors here I'm gonna I want to play around with some other stuff
28:32
all right so um let's go ahead and start adding um background image why not
28:39
so um let's do Circle dot
28:45
um Golden Gate
28:52
okay um and then I'm gonna do a background image I know I have a picture of the Golden
28:59
Gate Bridge somewhere around here there we go Golden Gate
29:04
okay so now if I add a class of Golden Gate okay um and let's just copy that copy and
29:12
paste that and uh we're gonna do um Circle dot downtown
29:21
okay Circle that downtown all right so down here I'm gonna do
29:26
Circle uh whoops oops my goodness what am I doing today
29:32
um all right we're gonna do Circle and golden Dash gate
29:39
and here we're gonna do Circle and downtown
29:44
okay oh I forgot to change the image for that let's go ahead and get a downtown image
29:50
here we go all right let's uh let's preview that
29:58
all right so now I have um my circle I have some background images okay boom all right let's go ahead and
30:06
uh we're gonna do um text colors
30:12
and um for circles I'm just gonna do header is gonna be
30:18
white okay
30:24
so now my headers are white okay but some these headers aren't necessarily easy to read
30:30
right okay so um what can we do there okay and
30:36
text color swatch super cool um let me show you another way you could do
30:42
that because really here I'm only messing around with the header color that's it so many ways to skin a cat
30:49
here okay now that we're talking about text colors do I want to go down this rabbit hole okay
30:55
super quick let's go ahead and let's say I wanted to use Font color
31:01
okay instead where my font color is only white okay now if I apply that to Circle
31:11
that is not going to work okay
31:16
because um I've applied font color to my circle but
31:21
the header inside of it is defined in site Styles as being black
31:27
okay now you probably know we have an ALT class as well and man
31:32
I'm really going down a rabbit hole here okay but let's go ahead and if we do
31:38
elements do I have all headers uh
31:43
all right let's go CSS if I just do H3 because this isn't these are h3s parent
31:50
class is circle okay now basically I'm saying all
31:56
all h3s inside of a circle are white okay but let's just keep
32:03
things simple and there's other ways we can even do that you we can even do it more different ways but I'm not even
32:08
going to go there let's just stick with text colors um we're gonna do Circle
32:14
all right and we're going to set headers inside circles to be white there we go
32:22
all right
32:27
what is controlling the size of the circles yeah so right now um our circle is a one column and the
32:34
one column goes full width right so if I were to change the right now this two
32:40
column okay is set to be um Auto auto which is it'll split in two
32:45
columns on medium if I were to change that let's do like four and eight or four and auto right
32:52
let's go ahead and refresh that you'll see that now this circle is bigger than that Circle okay and that's
32:59
because um I changed the size of my two columns and the one column will grow to fill
33:07
that column inside this two column okay hopefully that helps out
33:14
good question all right
33:21
review that again all right so um getting back on track here what I wanted to do was um I want to I want to
33:28
go ahead and make this text more readable how can we do that okay
33:35
um so there's a Swatch called an overlay BG
33:42
okay and what I'm going to do here is I'm going to give this a circle class
33:48
okay and let's give it an opacity of like 75
33:53
percent
33:58
no interesting oh
34:03
bam I didn't expect this one didn't expect this one darn it
34:09
okay
34:16
interesting interesting interesting I know why this is doing that do I want to fully explain why okay
34:24
darn this is good good to see that this
34:29
happened okay um so let's fix this because obviously the
34:36
overlay now the overlay looked good right it overlaid our background and then we are have our text on top but
34:42
what it didn't do is it it kind of cut it gets cut off here so
34:49
all right you know me I gotta explain why okay
34:54
all right so let's go ahead and explain why
35:05
okay let's make this a little bit wider so we can see stuff all right
35:15
so if we look here um
35:24
I wonder if we just need overflow
35:30
well I I just want to test something really quick let's just uh a fish that overflow hitting on this one column that
35:36
might actually fix it oh I saved the day okay
35:43
because my solution to to combat that without that overflow hidden was going to be a lot more complex and I was like
35:48
darn it let's I want to keep things simple okay that makes me feel so much better look
35:54
at that okay so um on that one column because um basically
36:00
we want to con constrain anything so that that block that overlay was
36:06
breaking outside and filling the entire container okay or the entire column and
36:11
we need to tell hey anything that's overflowing outside your borders go ahead and hide it okay so boom overflow
36:19
hidden for the win on there okay um I actually think maybe a little bit of actually here it could be something
36:25
interesting let's say um we can even let's go a little bit farther here
36:31
um well I mean we got ah kind of running low on time let's do some some cool hover effects on here okay so let's go
36:37
ahead and uh play around with some hover effects some water
36:47
I think these circles are a little large but imagine you have like um you know a a row of these a block grid of these
36:53
okay and they all have um you know some sort of hover effect they all have a different background
36:59
image okay but um yeah let's play around what I want to do is I want to have the
37:07
I want to have the see the image and then when I hover over it I want the overlay to come in and the the header to
37:14
fade in as well okay so let's play around with that
37:22
so what I want is I want the header to have an opacity of zero
37:29
okay and then I also want this overlay to have an opacity of Zero by default
37:35
okay so let's go ahead and do that I'm going to go ahead and make that overlay opacity of zero
37:42
okay so okay the overlay is there but I set it to be an opacity of zero now we need to hide these headers
37:49
okay so I'm going to go ahead and add an opacity Swatch okay
37:55
um and what I can do here is I'm actually going to add just to make things a little easier I'm going to add to these headers I'm going to add it a
38:02
um I'm going to add a cert a class in there called Circle Dash header okay
38:07
just to make things a little less confusing with swatches so I have this class on both of these headers called
38:13
Circle header okay and uh what I want to do here is
38:19
I'm going to say Circle header has an opacity of zero
38:25
okay let's go ahead and preview that voila so my header is there but you
38:31
can't see it okay so what we want to do is we now want to start
38:36
animating those things in on Hover okay so first off let's let's do the
38:42
this so on opacity okay um we want to do so let's go ahead and
38:48
do hover okay and we're going to do opacity one
38:58
so when I hover over Circle header we want opacity one now
39:04
um I hover over the circle I didn't get the I didn't get the header yet oh wait
39:09
I when I hover over just where the header is then it comes in that's not what I want
39:16
okay I know some of you know this um the answer to this but let's go ahead and do it so we don't want to hover on Circle
39:23
header we want to hover on the parent right so what you do is I'm going to set a parent
39:29
class of circle okay and you'll notice when I when I do
39:36
that I get this cool little setting in here called hover parent so I'm going to check that okay so what that means is
39:43
when I hover over Circle make a circle header opacity one
39:51
so I'm going to go ahead and hover over the circle boom you'll see that I now get
39:58
the header sweet okay so let's do the same thing
40:03
for overlay BG let's copy and paste that
40:09
and what I'm going to do here is I'm going to do um hover actually okay so
40:17
if you notice here overlay BG is
40:22
um circle before okay um so what I want to do is
40:28
hmm interesting oh nice man I'm clever sometimes so what
40:36
we want to do is we want to do a pseudostate of hover apparently I already thought about this Edge case I
40:41
was going to tell you something else but never mind okay um so when we hover over that we want it
40:46
to be opacity to like 62 how about that
40:53
all right let's go ahead and preview that
41:00
boom look at that all right
41:06
now that works but it's very instant right we we need we need some we need to
41:12
add a little bit of um animation to it okay so when we when we
41:19
are transitioning hint from one state to another there is a Swatch
41:27
called a transition swatch
41:32
okay and so there's a couple things so first we want to do a transition on the
41:37
header actually let's do the the um overlay BG okay um so here we'll see that the overlay BG
41:46
is circled before all right so we need to transition that so I'm going to go ahead and
41:52
um I need to do Circle okay now how do I Target the before
41:59
element on this overlay so in pseudo state I'm going to do before
42:06
okay and I'm going to transition for let's do like 500 milliseconds
42:13
and we'll do um ease out okay here's just various timing algorithms
42:20
okay I won't dive into that for right now let's let's preview that
42:27
there we go if you notice there we go the the header still comes in immediately we'll Rectify that but the
42:34
overlay comes in very nicely right sweet all right
42:41
so let's go ahead and we're going to add one more transition okay and we're going to transition
42:47
Circle header and let me just copy that class
42:54
okay um and let's do 500 milliseconds as well
43:00
and uh we'll do ease out as well so it kind of Animation matches
43:08
there we go all right now a couple things uh with
43:13
transition I know for a fact the only thing that I'm animating is the opacity
43:18
okay so what I'm going to do is instead of uh allowing CSS to look for all everything I know I'm only doing opacity
43:25
so I'm going to tell it that these two things you're only going to animate the opacity this is a minor thing but a every little
43:32
bit of performance counts okay so by limiting things
43:37
um you know we're going to uh make our experience in the browser a little bit nicer okay
43:44
now what if I wanted to do some what if I added a little bit of delay to that
43:50
header so the so the background sort of Fades in and a little bit later the header fades in right so what you do is
43:56
I'm going to add a delay to this one so I'm going to add 250 milliseconds
44:02
of a delay so now you'll see that the header starts
44:09
animating after the overlay
44:15
pretty cool
44:27
so someone was saying it should not hover in the four corners outside of the circle right so it it does okay
44:38
um and that is because
44:47
unfortunately so here if we if we look at this let's go ahead and
45:00
make this a little bit bigger text wise all right so if you
45:05
look here in the code this is our Circle okay
45:11
that is our Circle okay um
45:16
so this circle if you look while it has a border radius okay
45:23
um and we've limited the contents of within it okay
45:28
the circle itself is still a square the browser still sees it as a square
45:34
okay so good point uh you did see I think it was Gunter right that even when
45:41
you hover over this invisible part where to the human eye that isn't the circle
45:47
to the browser it still is right it's still the circle element on the page okay now
45:54
to get around that it's actually quite complex because then you'd have to
46:00
you basically have to duplicate your entire work and do the animations on elements that are inside of this and um
46:08
yeah I I would say live with it okay I mean
46:13
chances are yes it's in and now these are large circles um a lot of times you're gonna have an
46:19
interface where these circles are much smaller where the that is not going to be an issue okay
46:25
um how can you solve that um that's more than more time than I I don't have time to do that right now
46:31
okay solving that um play around with it basically you're gonna have to rebuild and Target
46:38
elements within here um it's it's not gonna be easy okay
46:45
um this is easy um and uh yeah I'll admit even a lot of the animations I build
46:52
um yeah I think you're the amount of time and effort it would
46:58
take to do that I think you could spend doing something more important um Gunter I'll be perfectly honest with
47:04
you but hey um there we go but it was a great question
47:11
um and it is potentially fixable I just don't have time to teach you how to do that um and I'd have to play around with
47:17
probably an hour or so myself um to figure out a way around it okay I'm sure it's probably possible
47:25
um do I know how to do it straight off the top of my head just by going wham bam bam bam bam no I'd have to figure that out
47:32
okay um man I already I thought I would have so
47:39
much extra time today and like I've already gone almost an hour um there there's one more I thought it
47:44
would be kind of fun uh I'm gonna do one more animation here okay
47:50
um and then we're gonna we're gonna play around with some stuff let's duplicate that
47:59
um instead of uh transforming the um opacity of this header I'm going to
48:05
do something different okay um so let's find where those were that
48:11
was this so I'm going to delete that and that okay and that
48:19
okay so instead of Transit instead of changing the opacity of the header what
48:24
I'm going to do is I'm going to like make it kind of expand and shrink and do something a little bit different okay so
48:31
I'm going to do is uh we're gonna use a transform Swatch which is from the swag
48:36
okay and I'm gonna do a circle Dash
48:41
header here okay and I'm going to use scale
48:48
okay and I'm going to choose the default scale to be zero
48:55
so I'm gonna do zero zero zero okay and what that does is that shrinks
49:01
it down so it is it shrinks it down to nothing okay and let's go ahead and
49:08
um on Hover okay and I'm going to do Circle hover parent we're going to
49:15
change that scale to 1. okay
49:21
and then as we know I want to transition between two states so we're going to do Transition of
49:28
Circle Dash header um we're gonna I'm only gonna do
49:33
transform and we'll do 500 milliseconds as well
49:39
he's out is my favorite okay
49:47
look at that
49:52
and we can play with all kinds of stuff with transforms right so let's say I want to do I want to move it
49:59
um I'm gonna move it down by default we're going to move it down
50:07
30 pixels okay
50:12
um and then here I'm gonna move it to zero pixels
50:17
all right so now over over if you notice now it it
50:24
actually it doesn't come straight out at you it actually comes up and I think here let's do a little bit more so a little more drastic let's do like um
50:31
negative 100 pixels
50:38
you see that hopefully you see it's scaling and moving from the top right pretty cool
50:48
um here let's just set a negative let's do uh positive 100
51:00
actually it looks like it's I wonder if I need to do like uh
51:19
interesting
51:26
looks like it's getting cut off a little bit oh and that's because this column here oh because I have overflow hidden
51:32
set oh man interesting look at that
51:55
there we go okay so um combat that
52:01
um I'm going to use an overflow Swatch I thought we had an overflow Swatch there is Overflow
52:07
um and then I'm going to do Circle and I'm going to
52:14
Target child elements and overflow visible okay
52:19
I'm not gonna necessarily explain that but you'll have this project file and that's what I did there okay
52:32
do I need to force that
52:38
there it goes thank you I think that's a little much I like more
52:45
subtle but hopefully you guys are let's do like uh 30 again I think 30 probably
52:53
yeah see how it comes up and it out a little bit and you can do opacity as
52:58
well right so uh but yeah here let's add opacity back in
53:03
so it's going to start at um Circle Dash header
53:11
opacity is zero and then
53:16
um Circle hover parent opacity one
53:22
okay and as transition I need to make sure that this is all now because I'm now transitioning more than just the
53:28
transform um now there there is a transform multi here which allows you to transfer
53:35
different properties at different times you could do all kinds of stuff oh I won't dive into that now
53:42
um but let's go ahead and play with this here so now oh yeah it's the opacity fades in
53:52
um I like that that's really nice um let's do the I want to do that a little bit darker
54:03
pretty slick right maybe even going from maybe starting
54:08
from scale zero is too much let's do like [Music] um 30
54:15
something like that oh I hit 30 oh well that's an
54:21
interesting one as well I did that by accident okay so it's going it's scaling from
54:26
basically three thousand percent um down to 100 right okay I needed point
54:33
three point three point three
54:41
yeah that's better so it doesn't go all it does it starts at thirty percent and kind of comes up a little bit so
54:48
um I think it's great really love it hope you know transforms and transitions you can do a
54:55
lot of really cool stuff okay and uh yeah fun with circles
55:00
I think we did more about non-circles today than anything but it was fun to learn about circles too
55:06
okay um man I really did not get to uh some cool
55:11
stuff I wanted to do um but uh let's play around with it anyway
55:16
all right we're gonna do I'm gonna do a new one or actually gonna
55:22
duplicate or is it this one we do the colors
55:27
where's the one I did the colors this one I'm going to duplicate this one
55:33
okay and uh let's do step six
55:39
okay so
55:45
let's get rid of some of these all right
55:51
um let's do a couple other um I want to do a couple other variations of color in here
55:56
um so we're going to do green
56:01
oh and then we need to set the green okay and then we're going to do
56:08
uh uh we're gonna do purple
56:18
okay let's set it to purple all right and one more orange
56:26
all right we're going to set it to Orange
56:36
all right and then um there we go and I'm going to
56:47
so I now I have Circle and then I want also on classes for different sizes of
56:52
circles okay so um go ahead here I'm going to go ahead and I'm going to trash this okay and
57:00
we're just gonna do a bunch of a bunch of stuff here so it's I'm gonna do a circle on this container
57:07
and uh I'm just going to set a let's do a width Swatch
57:13
okay um and oops
57:21
I'm going to set Circle I don't want these to be responsive
57:26
circles I want these to be static circles for what I'm going to be playing around with Okay so let's do us
57:33
um the default size of a circle is 64. how about that okay
57:39
um right
57:44
Perfect all right I'm good with that
57:49
um and then here I want to do Circle dot um small
57:55
right and let's do 32 okay
58:00
and I'm going to do Circle Dot um about extra small and that is uh 12. or no 16
58:12
okay and then we'll do actually let's say this one Circle dot
58:17
medium okay and then
58:25
um and then we have circled uh large
58:33
okay and that one is going to be 64. and we'll do one more we'll do extra
58:39
large extra large and that's going to be
58:45
uh we'll do 96 instead of 128 okay so now I got all these classes okay
58:52
um and it can have red blue green purple orange and it can have various sizes
58:59
okay so I'm going to have this container and let's see if I do red guess what it gets red if I do small uh well you're
59:08
not going to see it here let's go ahead and pre do a quick preview so there is my
59:13
small okay okay so now I have a small circle if I
59:21
want that to be a large Circle guess what
59:26
boom and I now have a large red circle and if I want a large uh purple circle I
59:33
just change the red class to purple and guess what voila I get a large purple circle okay
59:38
so what's the purpose of this I want to have a little bit of fun I thought this would be kind of a cool thing to play
59:43
around with um we're going to look at slot machine
59:53
and we're going to get the particle generator okay so particle generator voila so since I use this okay
1:00:05
oops close that okay um so the particle generator allows us
1:00:12
to um take some content okay and uh we're gonna it's gonna generate a lot of of
1:00:19
something okay um so what I want to do is I want to
1:00:25
randomly assign a class or um a color to a circle okay so
1:00:32
um here we're going to do um color and my available colors are red
1:00:38
green blue um
1:00:44
purple and orange okay
1:00:50
um and then I'm also going to do um size
1:00:56
and that was extra small small
1:01:03
medium large extra large
1:01:09
okay um and then in particle generator you just say how many of those things you
1:01:14
want to create right you can also say no sequential duplicates but let's say I want to create 20 of these
1:01:21
preview
1:01:27
oh wait oh okay I need to use these macros inside my thing so here it just
1:01:33
created 20 purple large circles because I didn't have those so I need to add in um the color macro
1:01:39
into there as well as the size macro into the class so it's going to it's
1:01:46
going to take those values and randomly apply them to a class okay kind of a key stop
1:01:52
boom so now I have 20 randomly generated circles um now one thing I want to do is we're
1:01:58
going to do um I want these to be displayed in line do I have a setting for that no I'm just
1:02:04
going to use the utility class for display Dash in line
1:02:14
oops display Dash inline
1:02:19
oh display block it has to have display block interesting because of the aspect ratio
1:02:25
interesting okay but we can create all a ton of these right so I I can create 200 of
1:02:32
these if I wanted and so I created a bunch of circles
1:02:39
all right now what what can we do with circles um so
1:02:46
um I have another kind of a cool stack called Drift okay and uh
1:02:52
I I have to admit it's been a while since I've played with drift as well I just released it was one of my big releases this year
1:02:59
um let's add actually let's just add drift Pro
1:03:12
drift timeline
1:03:21
I wonder if we can do I want to see I want to wonder if we can do it with just drift animate I'm wondering animate yeah it's the only trigger once
1:03:29
on scroll
1:03:34
no that's not gonna work out we need drift timeline okay
1:03:40
okay so first off I want to I want to make it so all these circles aren't like this right we need them
1:03:46
um we need them positioned differently so I'm going to do a position Swatch
1:03:52
and I'm going to make them uh we're going to Target all circles
1:03:58
okay I'm going to make them position fixed relative to the browser okay
1:04:04
and I want them to be on the bottom of the screen bottom zero
1:04:10
um left 50 percent
1:04:16
or Center the origins actually no we're just gonna leave it like that
1:04:21
I think that's I think that's all we need
1:04:27
all right so I have 200 circles right here okay
1:04:33
um it's kind of crazy okay um and I want to we're going to animate
1:04:40
these things I'm going to animate them all okay um
1:04:48
so on drift timeline let's just animate it on scroll which we'll do on page load
1:04:53
because they're visible on page load okay um start paused
1:05:09
I think you can just do Circle here
1:05:18
I enter your position let's just do zero zero for fun
1:05:23
it's just so it loads directly on page load okay so now let's do the animate stuff so now we're going to
1:05:31
um we're going to trigger on we're going to animate a circle okay
1:05:37
um hold on I did I did a demo of this I gotta refresh my brain a little bit on
1:05:45
that uh oh it's the page particle generator
1:05:53
hey
1:06:03
oh I use the advanced one yeah because we have to randomly do it I'm gonna copy this all right this is if you have uh
1:06:10
this is the slot machine demo file but it'll be in this file too I'm gonna send this one out
1:06:17
is that animating box we're going to animate um Circle
1:06:27
uh well we don't need to rotate because there's you're not going to be able to see rotation on a circle anyway
1:06:48
I don't know if you can see that it interesting uh all right let's
1:07:00
it's interesting as I scrolled it just keeps animating them for a while huh it
1:07:05
didn't do exactly what I what I thought um let's change this to hover
1:07:31
it's just randomly and here let's go ahead and slow the animation down a little bit duration let's do like two
1:07:38
seconds it's gonna staggerum 0.02
1:07:45
how did I do the slot machine one let's see what I did here I did
1:07:50
oh and click oh I'd click the button okay let's see this one
1:07:58
I know we're kind of going over a little bit guys sorry let's say animates boom
1:08:03
yeah I just thought it would be fun to play
1:08:09
around maybe another time we oh I can refine this and basically I thought it'd be fun to like do like make the make the
1:08:16
circles kind of like that'd be kind of fun but it would take it would take me a little while to play
1:08:21
around with that to get that get the animations on this done just right um
1:08:27
but as you see it does it does work um you know it's a way of creating these out these circles and then just kind of
1:08:32
use them as like confetti on the page or something like that imagine if you were to scroll down the page and boof use
1:08:38
particle generator to generate 200 of these things of random sizes and colors and uh yeah pretty slick
1:08:45
okay well guys I think uh I think we'll call
1:08:52
it a day um hopefully you guys enjoyed that um it was just mostly some playing
1:08:58
around um I mean I I think playing around with stuff like
1:09:03
this is um we kind of learned the most sometimes right
1:09:08
um another thing is I mean I didn't even get into you know you can use
1:09:13
what I showed you in styling those circles use those in blog lists or when
1:09:19
you're using your feeds right you can generate all that stuff um and you know you can use the data
1:09:27
from feeds to populate classes or or the data from Total CMS like the categories
1:09:33
and the tags to populate classes of your stuff so you can change your Styles like I did these circles to make them
1:09:39
randomly blue green red large colors right again try to
1:09:45
the things I showed you today were are very you can take them very literally like oh I I know how to change the color
1:09:51
of a circle but think bigger than that right think how you can take that you
1:09:57
can take a class from Total CMS blog post to customize that particular blog
1:10:03
post with a special Style I just use sizing colors but you can do
1:10:09
whatever you want there's uh there's a hundred different swatches that you can do all kinds of stuff with
1:10:14
right so while the examples I showed today were
1:10:20
super simple you can use these in an infinite amount of ways to do so many powerful things
1:10:29
again try to take these Concepts and don't take them literally
1:10:34
apply them in different ways play around with this stuff playing around like I
1:10:39
did today just playing around with some circles super powerful because you can take that
1:10:45
same exact concept to apply to so many other things in your designs so take
1:10:51
that that was really what I wanted to you know teach you today yes we learned about
1:10:57
circles and we learned how we can change the colors and sizes and animate them
1:11:02
but hopefully we you can take these simple examples of just a circle and
1:11:07
apply it to so many other things so anyway um have a great day
1:11:13
um hopefully we'll see you on Friday at the Hangouts always a fun time and uh take care see you on the Weaver space
1:11:20
community