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 Pseudo Classes
Search
Frontend NE
August 29, 2015
Technology
0
430
CSS Pseudo Classes
Elizabeth Gardiner take Frontend NE through CSS pseudo selectors and pseudo classes
Frontend NE
August 29, 2015
Tweet
Share
More Decks by Frontend NE
See All by Frontend NE
Standardizing 'select': What the future holds for HTML - Stephanie Stimac @ FrontendNE
frontendne
4
350
CSS Regression testing - James A Lambert @ FrontendNE
frontendne
1
300
Building a design system for Lloyds Banking - Lilly Dart @ FrontendNE
frontendne
0
1.3k
What I learnt about hiring diverse teams from conducting a fully-anonymous recruitment process - Bethan Vicent
frontendne
0
240
Web Design that Doesn't Make Trans People Uncomfortable - Jessica Kelsall
frontendne
0
690
Contain yourself - Docker for developers
frontendne
2
240
Design process of a website
frontendne
0
260
What the JAMstack?
frontendne
1
860
Talking the talk
frontendne
0
450
Other Decks in Technology
See All in Technology
今だから言えるセキュリティLT_Wordpress5.7.2未満を一斉アップデートせよ
cuebic9bic
2
170
ロールが細分化された組織でSREは何をするか?
tgidgd
1
440
Four Keysから始める信頼性の改善 - SRE NEXT 2025
ozakikota
0
420
AWS Well-Architected から考えるオブザーバビリティの勘所 / Considering the Essentials of Observability from AWS Well-Architected
sms_tech
1
380
Amazon SNSサブスクリプションの誤解除を防ぐ
y_sakata
3
190
20250708オープンエンドな探索と知識発見
sakana_ai
PRO
4
1.1k
セキュアなAI活用のためのLiteLLMの可能性
tk3fftk
1
370
クラウド開発の舞台裏とSRE文化の醸成 / SRE NEXT 2025 Lunch Session
kazeburo
1
620
対話型音声AIアプリケーションの信頼性向上の取り組み
ivry_presentationmaterials
3
1.1k
Figma Dev Mode MCP Serverを用いたUI開発
zoothezoo
0
250
[SRE NEXT] ARR150億円_エンジニア140名_27チーム_17プロダクトから始めるSLO.pdf
satos
5
3.1k
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
13k
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
Visualization
eitanlees
146
16k
Git: the NoSQL Database
bkeepers
PRO
430
65k
The World Runs on Bad Software
bkeepers
PRO
70
11k
GraphQLとの向き合い方2022年版
quramy
49
14k
Building Applications with DynamoDB
mza
95
6.5k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
Into the Great Unknown - MozCon
thekraken
40
1.9k
Practical Orchestrator
shlominoach
189
11k
Designing for humans not robots
tammielis
253
25k
Transcript
Pseudo-classes Elizabeth Gardiner {@libwella}
http://www.w3schools.com/css/css_pseudo_classes.asp “A pseudo-class is used to define a special state
of an element.”
http://www.thefreedictionary.com/Psuedo pseu•do (ˈsu doʊ) adj., n., pl. -dos. adj. 1.
false or spurious; sham; pretended. n. 2. a false or pretentious person.
None
Dynamic Pseudo-classes
:hover
:link :visited :hover :active
https://flic.kr/p/3ruY7o
:link o :visited e :hover :active t e
:link :visited :hover :active
:link :visited :hover :active :focus
:link :visited :hover :active :focus
None
:link :visited :hover :active :focus
:link :visited :hover :active :focus } :any-link (proposed CSS4)
:link :visited :hover :active :focus :local-link } :any-link (proposed CSS4)
(proposed CSS4)
Structural Pseudo-classes
THE DOM!
https://flic.kr/p/9GVpoG
<ul> <li> <li> <li> <li> <li> <li> https://flic.kr/p/9GVpoG
HTML BODY UL li li li li li li
:nth-child
:nth-child(n)
:nth-child(3) <ul> <li> <li> <li> <li> <li> <li> https://flic.kr/p/9GVpoG
:first-child :last-child :first-of-type :nth-last-child :nth-of-type :nth-last-of-type :only-child :only-of-type :empty :blank
(CSS4 proposed)
:matches(CSS4 proposed) https://css-tricks.com/almanac/selectors/m/matches/
:target
BROWSER SUPPORT
DEMOS http://lea.verou.me/demos/ nth.html https://css-tricks.com/examples/ nth-child-tester/#
THE negation pseudo-class :not
Pseudo Elements
http://www.growingwiththeweb.com/2012/08/pseudo-classes-vs-pseudo- elements.html “A pseudo-element […] allows us to create items
that do not normally exist in the document tree”
::first-line ::first-letter ::before ::after
::first-line ::first-letter ::before ::after
https://css-tricks.com/pseudo- element-roundup/ http:// www.smashingmagazine.com/ 2011/07/13/learning-to-use-the- before-and-after-pseudo- elements-in-css/
Thanks! Elizabeth Gardiner {@libwella}