Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CSS Fundamentals
Search
Cheesecake Labs
May 14, 2018
Programming
0
46
CSS Fundamentals
Beatriz Silveira
Cheesecake Labs
May 14, 2018
Tweet
Share
More Decks by Cheesecake Labs
See All by Cheesecake Labs
Cats' wellness & care
cheesecakelabs
0
49
How do we create the first impressions?
cheesecakelabs
0
56
Menstrual cup: suit and freedom
cheesecakelabs
0
69
Life is a cycle, better with a bicycle
cheesecakelabs
0
51
Interview Process: how to get the best of people
cheesecakelabs
1
86
My capsule wardrobe experience
cheesecakelabs
3
60
Stonewall Rebellion and its impact on LGBTQIA+ history
cheesecakelabs
1
40
Pregnancy, childbirth and breastfeeding: What do I have to do with it?
cheesecakelabs
0
48
MBTI - Psychological types described by Jung
cheesecakelabs
0
130
Other Decks in Programming
See All in Programming
Using Types to Save Your Code's Future
rollbear
0
100
CSC305 Lecture 11
javiergs
PRO
0
320
理論と実務のギャップを超える
eycjur
0
200
開発組織の戦略的な役割と 設計スキル向上の効果
masuda220
PRO
10
1.9k
pnpm に provenance のダウングレード を検出する PR を出してみた
ryo_manba
1
170
O Que É e Como Funciona o PHP-FPM?
marcelgsantos
0
240
Amazon ECS Managed Instances が リリースされた!キャッチアップしよう!! / Let's catch up Amazon ECS Managed Instances
cocoeyes02
0
110
EMこそClaude Codeでコード調査しよう
shibayu36
0
500
Designing Repeatable Edits: The Architecture of . in Vim
satorunooshie
0
190
TFLintカスタムプラグインで始める Terraformコード品質管理
bells17
2
500
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
340
CSC509 Lecture 08
javiergs
PRO
0
270
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
49
14k
The Language of Interfaces
destraynor
162
25k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Being A Developer After 40
akosma
91
590k
GitHub's CSS Performance
jonrohan
1032
470k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
Navigating Team Friction
lara
190
15k
4 Signs Your Business is Dying
shpigford
186
22k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.7k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Transcript
CSS Fundamentals
Timeline • css1- released in 1996 • css2 - released
in 1998 • css3 - in Development (Split up into independent modules) • https://www.w3.org/TR/
Selectors • Element • Class • ID • Universal •
Attribute
Selection by Element
Selection by Class
Selection by ID
Selection by Attributes
Selection Universal
None
Cascading Style & Specificity Inline Styles #ID .class :pseudo-class [attribute]
<Tag> ::pseudo-element
Combinators • Adjacent Sibling • General Sibling • Child •
Descendant • Group of Selectors
Adjacent Sibling Combinator
General Sibling Combinator
Child Combinator
Descendant Combinator
Group of Selectors
But why Do I need selectors and Combinators ? Spoiler:
To Apply properties
Properties
But how this property interfere in my CSS ?
Every element in HTML is interpreted as a box by
CSS CSS Box Model
Margin Collapsing
Display Property display: block;
Display Property display: inline display: inline-block
Positioning Elements with CSS • Position: • static • Fixed
• Relative • Absolute
Positioning Elements with CSS Position: Static Default value
Positioning Elements with CSS
Positioning Elements with CSS <div> Top Bottom Left Right
Fixed Position
Z-index
Absolute & Relative
Absolute & Relative
Pixel, Percentages & More
How is the size calculated? Absolute Viewport Relative Font Relative
px rem vh em vw %
Rules to remember
REM x EM https://codepen.io/beatriz1304/pen/ELReaJ
vh & vw https://codepen.io/beatriz1304/pen/VxdGKa
Box-sizing box-sizing: content-box; box-sizing: border-box;
Box-sizing
Box-sizing
Some cases not covered • Font Family • pseudo class
and pseudo elements • @media query • Flexbox • Grid Layout • Images • Transition • Animation