CSS
Nico Abel Laia
Front End Web Developer
In Depth
CSS Syntax
What is it?
What is it?
CSS selectors define the pattern to select elements to
which a set of CSS rules are then applied.
Selector
This is
Selector
What is it?
The class selector sets the target element based on the
value of the class attribute applied to the element. To
write a selector, start with a period (.) then continue with
the class name.
Class Selector
Class
Selector
What is it?
The ID selector is same like a class, sets the target
element based on the value of the id attribute applied to
the element, but we have to use # to select the id.
ID Selector
ID
Selector
What is it?
The tag selector selects HTML elements based on the
element name.
Tag Selector
Tag
Selector
CSS In UI Desain Aspects
What is it?
Color System
The color system handles the variability of dynamically changing color schemes
that arise as user inputs change.
Color schemes can be considered a cohesive group of relative tones, rather
than a fixed group of constant values.
What is it?
Color System
The color system handles the variability of dynamically changing color schemes
that arise as user inputs change.
What is it?
Primary Color
The primary key color is used to derive roles for key components across the UI,
such as the FAB, prominent buttons, active states, as well as the tint of elevated
surfaces.
What is it?
Secondary Color
The secondary key color is used for less prominent components in the UI such
as filter chips, while expanding the opportunity for color expression.
What is it?
The Tertiary Key Color
The tertiary key color is used to derive the roles of contrasting accents that can
be used to balance primary and secondary colors or bring heightened attention
to an element.
What is it?
Neutral Color
The neutral key color is used to derive the roles of surface and background, as
well as high emphasis text and icons.
What is it?
Examples
Why color schemes is important
What is it?
● Hex
○ Hexadesimal
● RGB
○ Red Green Blue
● RGBA
○ Red Green Blue Alpha
● HSL
○ Hue Saturation Lightness
● HSLA
○ Hue Saturation Lightness Alpha
Color in CSS
What is it?
This is how to make a paragraph
color black
Color in CSS
Typography
Typography
Typography is the art and technique of arranging type on a website. It's not only
about the design or composition of the letters and characters and their
arrangement.
What is it?
Typography Size
What is it?
Typography Style
What is it?
Some font properties in CSS :
1. font-family
2. font-size
3. font-weight
4. line-height
5. text-align
6. text-transform
7. text-decoration
8. font
Typography in CSS
Several values can be written so that if the font
type at value 1 is not supported by the browser
used, then there are alternatives at value 2, value
3, and so on.
Font-family
Font-size
We can define font size units with em, rem, px, mm,
percentage, and so on.
The size of the font weight is determined by the
numbers 100 to 900. However, the thickness of the
text can also be specified by 'normal', 'bold',
'bolder' and 'lighter'.
Font-weight
Shorthand of font-style,
font-weight,
font-variant, font-size
and font-family, so that
the writing of these
properties can be
shortened by using only
one property.
Shorthand
Layouting
Layout Region
Layout regions are the foundation for interactive experiences.
What is it?
Layout Region
Website Chatting App
1. Sidebar
2. Navigation
3. Body
What is it?
Example
Layout Region
Layouting
Definition
Layouting is managing
the position of content in
website.
Box Model
The CSS box model is essentially a box that wraps
around every HTML element. It consists of: margins,
borders, padding, and the actual content.
Box Model
Box Model
Box Model
● Content - The content of the box, where text and images appear
● Padding - Clears an area around the content. The padding is transparent
● Border - A border that goes around the padding and content
● Margin - Clears an area outside the border. The margin is transparent
Explanations
Box Model
div {
width: 300px;
border: 15px solid green;
padding: 50px;
margin: 20px;
}
Padding and Margin
Definition
Padding = the area between element border and content
Margin = the area between border and the edge of
element
Padding and Margin
Flexbox
Subtitle
Flexbox is a flexible box that can be used to set up element with container.
Flexbox
How to Use
Flexbox
flex-direction
Flexbox
flex-direction
Flexbox
flex-grow
Flexbox
flex-grow
Flexbox
flex-shrink
Flexbox
flex-shrink
Flexbox
flex-wrap
Flexbox
flex-wrap
Flexbox
flex-flow
Flexbox
flex-basis
Flexbox
flex-basis
Flexbox
flex
Flexbox
justify-content
Flexbox
justify-content
Flexbox
align-items
Flexbox
align-items
Grid
Subtitle
Grid in CSS almost similar to
flexbox, but grid used to set
the two dimensional layout
because it can handle
column and row
Grid
How to use
Grid
Grid
grid-column
Grid
grid-row
Grid
grid-template-columns
Grid
grid-template-column
Grid
grid-template-rows
Grid
grid-template-row
Grid
grid-gap
Shape
Shapes within the UI help
unite brand expression
across the UI.
Components with unique
shapes can attract attention
so they can be used for
important elements.
Types of Shape Scales
Types of Shape Scales
Elevation
Elevation
Elevation is the relative distance
between two surfaces along the
z-axis or depth.
Definition
Elevation
Elevation
text-shadow
Elevation
text-shadow
Elevation
box-shadow
Elevation
box-shadow
Thankyou
- GDSC Matana University

Bootcamp - Web Development Session 4