SlideShare une entreprise Scribd logo
1  sur  42
Télécharger pour lire hors ligne
How to Use CSS3 in
WordPress
WordCamp Sacramento 2015
by
Suzette Franck
Who I Am
HTML and CSS teacher for Girl Develop It, 

Los Angeles Chapter
Freelancing Front End Developer
Born in Hollywood, Resides in S. California
Over 20 Years Coding & Web Development
Developed Over 300 WordPress Sites
Spoken at 27 WordCamps in US & Canada
Regular Contributor: WPwatercooler.com
Hobbies: Crocheting & Adult Coloring Books
Twitter:
suzette_franck
My Goal
Teach you at least one thing that
you didn’t know before that will
change how you work forever
What We Will Cover?
What is CSS/CSS3?
Using CSS in WordPress
CSS Resources
What is CSS/CSS3?
CSS/CSS3 Basics
Cascading Style Sheet language written in plain text
Used with HTML to give style/design to HTML elements
CSS3 is he latest evolution of CSS, which is meant to
extend CSS 2.1, the previous version
CSS3 is backwards compatible with all versions of CSS
In WordPress, CSS code is most often put in a style.css
plain text file in the starter, parent, or child theme
folder in wp-content
Most themes have an “Edit CSS” option, or you can
install a plugin to add your own CSS.
Example of CSS Code
Terminology & 

Basic CSS Syntax
CSS Terminology
Syntax refers to the proper format with punctuation for a line of
code
Selectors select the HTML element to be styled and is placed on
the left side of curly braces, which surround the style
declarations
Each declaration includes one property: value(s); pair
Spaces and tabs are ignored in CSS, use often and generously
for easy reading!
p { 

background-color: black;

color: red; 

font-size: 1.5em;

}
CSS Syntax
h1 {
color: deeppink;
font-size: 18px;
font-weight: bold;
}
selector {
property: value;
}
Classes and IDs
CSS selectors can be an HTML element, a class, or an ID, or a
combination of these
Classes add a classification name and are indicated in CSS with a
dot before the class name, there can be repeated on same page
HTML looks like: 

<h3 class=“special”>This is a heading</h3>

Reference in CSS like:

.special { color: red; }
IDs add an identifying name and each ID can only be used once
per page. IDs are indicated in CSS with a #.
HTML looks like:

<h3 id=“theonlyone”>This is a heading</h3>

Reference in CSS like:

#theonlyone { color: yellow; }
Classes and IDs
CSS selectors can be an HTML element, a class, or an ID, or a
combination of these
Classes add a classification name and are indicated in CSS with a
dot before the class name, there can be repeated on same page
HTML looks like: 

<h3 class=“special”>This is a heading</h3>

Reference in CSS like:

.special { color: red; }
IDs add an identifying name and each ID can only be used once
per page. IDs are indicated in CSS with a #.
HTML looks like:

<h3 id=“theonlyone”>This is a heading</h3>

Reference in CSS like:

#theonlyone { color: yellow; }
CSS Properties
browse
http://www.w3schools.com/cssref/
or
google it
CSS Comments
p {
color: #FF0000; /* red */
/* This is a single-line comment */
text-align: center;
}
/* ——————-This is a
xxxxxxxx multi-line xxxxxxxx
comment ————- */
CSS Specificity
More specific overrides less specific
IDs override classes
Inline CSS overrides IDs
!important used at the end of a declaration overrides Inline
CSS
Closest rule or declaration beats out remote declarations
http://www.smashingmagazine.com/2007/07/css-
specificity-things-you-should-know/
CSS Specificity Quiz
a { color: aqua; }
ul { color: deeppink; }
.warning { color: red; }
#mainNav { color: yellow; }
<ul class=“warning” id=“mainNav”>
<li><a href=“/“>Home</a></li>
</ul>
What color is the “Home” text based on below styles?
CSS Specificity Quiz
a { color: aqua; }
ul { color: deeppink; }
.warning { color: red; }
#mainNav { color: yellow; }
<ul class=“warning” id=“mainNav”>
<li><a href=“/“>Home</a></li>
</ul>
What color is the “Home” text based on below styles?
CSS Specificity Quiz
a { color: aqua; }
ul { color: deeppink; }
.warning { color: red; }
#mainNav { color: yellow; }
<ul class=“warning” id=“mainNav”>
<li><a href=“/“>Home</a></li>
</ul>
Bonus: what color is the bullet?
CSS Specificity Quiz
a { color: aqua; }
ul { color: deeppink; }
.warning { color: red; }
#mainNav { color: yellow; }
<ul class=“warning” id=“mainNav”>
<li><a href=“/“>Home</a></li>
</ul>
Bonus: what color is the bullet?
Inspecting CSS
Inspecting CSS w/Chrome
View > Developer > Developer Tools
or right-mouse click on the page > Inspect Element
Inspecting CSS w/Chrome
New CSS3 Modules
New CSS3 Modules
Colors & Transparency
CSS Gradients
Border Radius (Rounded Corners)
Box Shadow & Text Shadow
Transformations and Animations
Web Fonts @font-face
Media Queries (Responsive Design)
CSS3 Colors
CSS2: 17 Color Names / CSS3: 140 Color Names
http://www.w3schools.com/cssref/css_colornames.asp
New Alpha on Reg-Green-Blue Values
rgba( 255, 0, 0, 0.5 );
Specify Hue, Saturation, Lightness, alone or with Alpha Values
hsla( 120, 100%, 50%, 0.5 );
Opacity Property (0 transparent 1 opaque)
http://www.w3schools.com/cssref/css_colors_legal.asp
CSS3 Gradients
.fancy {
background: -webkit-linear-gradient(red, green, blue); /* For Safari 5.1 to 6.0 */
background: -o-linear-gradient(red, green, blue); /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient(red, green, blue); /* For Firefox 3.6 to 15 */
background: linear-gradient(red, green, blue); /* Standard syntax */
}
http://www.w3schools.com/css/
css3_gradients.asp
CSS3 Gradients
http://www.colorzilla.com/gradient-editor/
border-radius
Accepts px or %
Don’t forget to add vendor prefixes!
.rounded {
border-top-left-radius: 5px;
border-top-right-radius: 10px;
border-bottom-right-radius: 20px;
border-bottom-left-radius: 15px;
}
or use the shorthand:
.rounded {
border-radius: 5px 10px 20px 15px;
}
border-radius
http://border-radius.com/
Using CSS3 in WordPress
Where Do You Put CSS in WordPress?
Installed Theme’s Custom CSS Option
Jetpack’s “Edit CSS” Module (my favorite)
Simple Custom CSS Plugin (if not using Jetpack)
Page/Post editor via Inline Styles
Child Theme’s style.css file
Starter Theme’s style.css file
Jetpack’s Edit CSS Module
Once activated, go to Appearance > Edit CSS
Simple Custom CSS
Once activated, go to Appearance > Custom
Inline CSS in Editor
Add style attribute to opening tag in Text view
<p style=“property: value; property: value;”>
Considered hacky/janky/ bad practice, but works in a fix!
Child Theme’s style.css
Child Themes inherit Parent Theme’s functionality
Modifications not overwritten when Parent Theme updates
Best method for extensive modifications
More info on creating Child Themes on the Codex:



https://codex.wordpress.org/Child_Themes
Child Theme Plugins (Orbisius, One-click, Configurator)
Starter Theme’s style.css
Starter Themes include basic theme files
Make your own custom theme from them
Where Do You Not Put CSS?
Linked to a stylesheet in the header.php (use wp_enqueue)
Using the native WordPress Theme Editor to edit style.css
directly ( No undo or version history! )
CSS Resources
CSS Resources
http://www.csszengarden.com/
http://www.w3schools.com/css/css3_intro.asp
https://css-tricks.com/+ https://css-tricks.com/almanac
http://girldevelopit.com Take an HTML/CSS class
CSS3 Code Demo
Q & A
Any Questions?
Thank you for being here!
Suzette Franck
Twitter: @suzette_franck

linkedin & speakerdeck & slideshare

Contenu connexe

Tendances

Intro to css & sass
Intro to css & sassIntro to css & sass
Intro to css & sassSean Wolfe
 
CSS For Backend Developers
CSS For Backend DevelopersCSS For Backend Developers
CSS For Backend Developers10Clouds
 
6 Steps to Make Your CSS Code More Maintainable
6 Steps to Make Your CSS Code More Maintainable6 Steps to Make Your CSS Code More Maintainable
6 Steps to Make Your CSS Code More Maintainable10Clouds
 
Organize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS TricksOrganize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS TricksAndolasoft Inc
 
Css best practices style guide and tips
Css best practices style guide and tipsCss best practices style guide and tips
Css best practices style guide and tipsChris Love
 
Spectrum 2015 going online with style - an intro to css
Spectrum 2015   going online with style - an intro to cssSpectrum 2015   going online with style - an intro to css
Spectrum 2015 going online with style - an intro to cssNeil Perlin
 
Basics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPointBasics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPointSahil Gandhi
 
Front End Tooling and Performance - Codeaholics HK 2015
Front End Tooling and Performance - Codeaholics HK 2015Front End Tooling and Performance - Codeaholics HK 2015
Front End Tooling and Performance - Codeaholics HK 2015Holger Bartel
 
How to dominate a free theme WCTO 2014
How to dominate a free theme WCTO 2014How to dominate a free theme WCTO 2014
How to dominate a free theme WCTO 2014James Strang
 
From PSD to WordPress Theme: Bringing designs to life
From PSD to WordPress Theme: Bringing designs to lifeFrom PSD to WordPress Theme: Bringing designs to life
From PSD to WordPress Theme: Bringing designs to lifeDerek Christensen
 
Web standards pragmatism - from validation to the real world / Web Developers...
Web standards pragmatism - from validation to the real world / Web Developers...Web standards pragmatism - from validation to the real world / Web Developers...
Web standards pragmatism - from validation to the real world / Web Developers...Patrick Lauke
 
[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 WorkshopChristopher Schmitt
 
Links and Navigation
Links and NavigationLinks and Navigation
Links and Navigationsdireland
 
Responsive Web Design (April 18th, Los Angeles)
Responsive Web Design (April 18th, Los Angeles)Responsive Web Design (April 18th, Los Angeles)
Responsive Web Design (April 18th, Los Angeles)Thinkful
 
Visualizing The Code
Visualizing The CodeVisualizing The Code
Visualizing The Codesdireland
 

Tendances (20)

CSS Systems
CSS SystemsCSS Systems
CSS Systems
 
Intro to css & sass
Intro to css & sassIntro to css & sass
Intro to css & sass
 
CSS Best practice
CSS Best practiceCSS Best practice
CSS Best practice
 
CSS For Backend Developers
CSS For Backend DevelopersCSS For Backend Developers
CSS For Backend Developers
 
6 Steps to Make Your CSS Code More Maintainable
6 Steps to Make Your CSS Code More Maintainable6 Steps to Make Your CSS Code More Maintainable
6 Steps to Make Your CSS Code More Maintainable
 
CSS Reset
CSS ResetCSS Reset
CSS Reset
 
Less css
Less cssLess css
Less css
 
Class
ClassClass
Class
 
Organize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS TricksOrganize Your Website With Advanced CSS Tricks
Organize Your Website With Advanced CSS Tricks
 
Css best practices style guide and tips
Css best practices style guide and tipsCss best practices style guide and tips
Css best practices style guide and tips
 
Spectrum 2015 going online with style - an intro to css
Spectrum 2015   going online with style - an intro to cssSpectrum 2015   going online with style - an intro to css
Spectrum 2015 going online with style - an intro to css
 
Basics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPointBasics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPoint
 
Front End Tooling and Performance - Codeaholics HK 2015
Front End Tooling and Performance - Codeaholics HK 2015Front End Tooling and Performance - Codeaholics HK 2015
Front End Tooling and Performance - Codeaholics HK 2015
 
How to dominate a free theme WCTO 2014
How to dominate a free theme WCTO 2014How to dominate a free theme WCTO 2014
How to dominate a free theme WCTO 2014
 
From PSD to WordPress Theme: Bringing designs to life
From PSD to WordPress Theme: Bringing designs to lifeFrom PSD to WordPress Theme: Bringing designs to life
From PSD to WordPress Theme: Bringing designs to life
 
Web standards pragmatism - from validation to the real world / Web Developers...
Web standards pragmatism - from validation to the real world / Web Developers...Web standards pragmatism - from validation to the real world / Web Developers...
Web standards pragmatism - from validation to the real world / Web Developers...
 
[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop[Worskhop Summits] CSS3 Workshop
[Worskhop Summits] CSS3 Workshop
 
Links and Navigation
Links and NavigationLinks and Navigation
Links and Navigation
 
Responsive Web Design (April 18th, Los Angeles)
Responsive Web Design (April 18th, Los Angeles)Responsive Web Design (April 18th, Los Angeles)
Responsive Web Design (April 18th, Los Angeles)
 
Visualizing The Code
Visualizing The CodeVisualizing The Code
Visualizing The Code
 

En vedette (7)

Basic WordPress for Beginner ppt
Basic WordPress for Beginner pptBasic WordPress for Beginner ppt
Basic WordPress for Beginner ppt
 
Crear un blog en wordpress
Crear un blog en wordpressCrear un blog en wordpress
Crear un blog en wordpress
 
Bollywood Wedding Look
Bollywood Wedding LookBollywood Wedding Look
Bollywood Wedding Look
 
GDI - Intro to WordPress
GDI - Intro to WordPressGDI - Intro to WordPress
GDI - Intro to WordPress
 
Eid Gift Ideas for Women
Eid Gift Ideas for WomenEid Gift Ideas for Women
Eid Gift Ideas for Women
 
WordPress Complete Tutorial
WordPress Complete TutorialWordPress Complete Tutorial
WordPress Complete Tutorial
 
Teaching Students with Emojis, Emoticons, & Textspeak
Teaching Students with Emojis, Emoticons, & TextspeakTeaching Students with Emojis, Emoticons, & Textspeak
Teaching Students with Emojis, Emoticons, & Textspeak
 

Similaire à How to use CSS3 in WordPress - Sacramento

waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.pptwaxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.pptIsmaciil2
 
LIS3353 SP12 Week 13
LIS3353 SP12 Week 13LIS3353 SP12 Week 13
LIS3353 SP12 Week 13Amanda Case
 
CSS Methodology
CSS MethodologyCSS Methodology
CSS MethodologyZohar Arad
 
Unit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.pptUnit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.pptTusharTikia
 
Web topic 15 1 basic css layout
Web topic 15 1  basic css layoutWeb topic 15 1  basic css layout
Web topic 15 1 basic css layoutCK Yang
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Erin M. Kidwell
 
9- Learn CSS Fundamentals / Pseudo-classes
9- Learn CSS Fundamentals / Pseudo-classes9- Learn CSS Fundamentals / Pseudo-classes
9- Learn CSS Fundamentals / Pseudo-classesIn a Rocket
 
Internet tech &amp; web prog. p4,5
Internet tech &amp; web prog.  p4,5Internet tech &amp; web prog.  p4,5
Internet tech &amp; web prog. p4,5Taymoor Nazmy
 
CSS: How To Learn Easily
CSS: How To Learn EasilyCSS: How To Learn Easily
CSS: How To Learn Easilyshabab shihan
 
Introduction to css by programmerblog.net
Introduction to css by programmerblog.netIntroduction to css by programmerblog.net
Introduction to css by programmerblog.netProgrammer Blog
 

Similaire à How to use CSS3 in WordPress - Sacramento (20)

Pfnp slides
Pfnp slidesPfnp slides
Pfnp slides
 
css1.ppt
css1.pptcss1.ppt
css1.ppt
 
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.pptwaxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
waxaada canshuurahaiyosiyaaddaguudeexamarwaaardaydaDAALBADAN.ppt
 
CSS Introduction
CSS IntroductionCSS Introduction
CSS Introduction
 
Css ms megha
Css ms meghaCss ms megha
Css ms megha
 
LIS3353 SP12 Week 13
LIS3353 SP12 Week 13LIS3353 SP12 Week 13
LIS3353 SP12 Week 13
 
CSS Methodology
CSS MethodologyCSS Methodology
CSS Methodology
 
Unit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.pptUnit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.ppt
 
Css
CssCss
Css
 
Rational HATS and CSS
Rational HATS and CSSRational HATS and CSS
Rational HATS and CSS
 
David Weliver
David WeliverDavid Weliver
David Weliver
 
INTRODUCTIONS OF CSS
INTRODUCTIONS OF CSSINTRODUCTIONS OF CSS
INTRODUCTIONS OF CSS
 
Web topic 15 1 basic css layout
Web topic 15 1  basic css layoutWeb topic 15 1  basic css layout
Web topic 15 1 basic css layout
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
 
9- Learn CSS Fundamentals / Pseudo-classes
9- Learn CSS Fundamentals / Pseudo-classes9- Learn CSS Fundamentals / Pseudo-classes
9- Learn CSS Fundamentals / Pseudo-classes
 
Internet tech &amp; web prog. p4,5
Internet tech &amp; web prog.  p4,5Internet tech &amp; web prog.  p4,5
Internet tech &amp; web prog. p4,5
 
CSS: How To Learn Easily
CSS: How To Learn EasilyCSS: How To Learn Easily
CSS: How To Learn Easily
 
Css
CssCss
Css
 
Css
CssCss
Css
 
Introduction to css by programmerblog.net
Introduction to css by programmerblog.netIntroduction to css by programmerblog.net
Introduction to css by programmerblog.net
 

Plus de Suzette Franck

WCOC Plugin Palooza Entry: WP Art Store
WCOC Plugin Palooza Entry: WP Art StoreWCOC Plugin Palooza Entry: WP Art Store
WCOC Plugin Palooza Entry: WP Art StoreSuzette Franck
 
"Which WordPress Job Is Right For You?" WordCamp Orange County 2015
"Which WordPress Job Is Right For You?" WordCamp Orange County 2015"Which WordPress Job Is Right For You?" WordCamp Orange County 2015
"Which WordPress Job Is Right For You?" WordCamp Orange County 2015Suzette Franck
 
Introduction to Backups and Security
Introduction to Backups and SecurityIntroduction to Backups and Security
Introduction to Backups and SecuritySuzette Franck
 
WP Super Cache - Topanga WordPress Meetup
WP Super Cache - Topanga WordPress MeetupWP Super Cache - Topanga WordPress Meetup
WP Super Cache - Topanga WordPress MeetupSuzette Franck
 
Buddypress Pasadena Meetup
Buddypress Pasadena MeetupBuddypress Pasadena Meetup
Buddypress Pasadena MeetupSuzette Franck
 
Design Best Practices for WordPress
Design Best Practices for WordPressDesign Best Practices for WordPress
Design Best Practices for WordPressSuzette Franck
 

Plus de Suzette Franck (9)

WCOC Plugin Palooza Entry: WP Art Store
WCOC Plugin Palooza Entry: WP Art StoreWCOC Plugin Palooza Entry: WP Art Store
WCOC Plugin Palooza Entry: WP Art Store
 
"Which WordPress Job Is Right For You?" WordCamp Orange County 2015
"Which WordPress Job Is Right For You?" WordCamp Orange County 2015"Which WordPress Job Is Right For You?" WordCamp Orange County 2015
"Which WordPress Job Is Right For You?" WordCamp Orange County 2015
 
Introduction to Backups and Security
Introduction to Backups and SecurityIntroduction to Backups and Security
Introduction to Backups and Security
 
WP Super Cache - Topanga WordPress Meetup
WP Super Cache - Topanga WordPress MeetupWP Super Cache - Topanga WordPress Meetup
WP Super Cache - Topanga WordPress Meetup
 
Buddypress Pasadena Meetup
Buddypress Pasadena MeetupBuddypress Pasadena Meetup
Buddypress Pasadena Meetup
 
WordPress Security
WordPress SecurityWordPress Security
WordPress Security
 
Design Best Practices for WordPress
Design Best Practices for WordPressDesign Best Practices for WordPress
Design Best Practices for WordPress
 
Jetpack 2.0
Jetpack 2.0Jetpack 2.0
Jetpack 2.0
 
BuddyPress OCWC 2010
BuddyPress OCWC 2010BuddyPress OCWC 2010
BuddyPress OCWC 2010
 

Dernier

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 

Dernier (20)

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 

How to use CSS3 in WordPress - Sacramento

  • 1. How to Use CSS3 in WordPress WordCamp Sacramento 2015 by Suzette Franck
  • 2. Who I Am HTML and CSS teacher for Girl Develop It, 
 Los Angeles Chapter Freelancing Front End Developer Born in Hollywood, Resides in S. California Over 20 Years Coding & Web Development Developed Over 300 WordPress Sites Spoken at 27 WordCamps in US & Canada Regular Contributor: WPwatercooler.com Hobbies: Crocheting & Adult Coloring Books Twitter: suzette_franck
  • 3. My Goal Teach you at least one thing that you didn’t know before that will change how you work forever
  • 4. What We Will Cover? What is CSS/CSS3? Using CSS in WordPress CSS Resources
  • 6. CSS/CSS3 Basics Cascading Style Sheet language written in plain text Used with HTML to give style/design to HTML elements CSS3 is he latest evolution of CSS, which is meant to extend CSS 2.1, the previous version CSS3 is backwards compatible with all versions of CSS In WordPress, CSS code is most often put in a style.css plain text file in the starter, parent, or child theme folder in wp-content Most themes have an “Edit CSS” option, or you can install a plugin to add your own CSS.
  • 9. CSS Terminology Syntax refers to the proper format with punctuation for a line of code Selectors select the HTML element to be styled and is placed on the left side of curly braces, which surround the style declarations Each declaration includes one property: value(s); pair Spaces and tabs are ignored in CSS, use often and generously for easy reading! p { 
 background-color: black;
 color: red; 
 font-size: 1.5em;
 }
  • 10. CSS Syntax h1 { color: deeppink; font-size: 18px; font-weight: bold; } selector { property: value; }
  • 11. Classes and IDs CSS selectors can be an HTML element, a class, or an ID, or a combination of these Classes add a classification name and are indicated in CSS with a dot before the class name, there can be repeated on same page HTML looks like: 
 <h3 class=“special”>This is a heading</h3>
 Reference in CSS like:
 .special { color: red; } IDs add an identifying name and each ID can only be used once per page. IDs are indicated in CSS with a #. HTML looks like:
 <h3 id=“theonlyone”>This is a heading</h3>
 Reference in CSS like:
 #theonlyone { color: yellow; }
  • 12. Classes and IDs CSS selectors can be an HTML element, a class, or an ID, or a combination of these Classes add a classification name and are indicated in CSS with a dot before the class name, there can be repeated on same page HTML looks like: 
 <h3 class=“special”>This is a heading</h3>
 Reference in CSS like:
 .special { color: red; } IDs add an identifying name and each ID can only be used once per page. IDs are indicated in CSS with a #. HTML looks like:
 <h3 id=“theonlyone”>This is a heading</h3>
 Reference in CSS like:
 #theonlyone { color: yellow; }
  • 14. CSS Comments p { color: #FF0000; /* red */ /* This is a single-line comment */ text-align: center; } /* ——————-This is a xxxxxxxx multi-line xxxxxxxx comment ————- */
  • 15. CSS Specificity More specific overrides less specific IDs override classes Inline CSS overrides IDs !important used at the end of a declaration overrides Inline CSS Closest rule or declaration beats out remote declarations http://www.smashingmagazine.com/2007/07/css- specificity-things-you-should-know/
  • 16. CSS Specificity Quiz a { color: aqua; } ul { color: deeppink; } .warning { color: red; } #mainNav { color: yellow; } <ul class=“warning” id=“mainNav”> <li><a href=“/“>Home</a></li> </ul> What color is the “Home” text based on below styles?
  • 17. CSS Specificity Quiz a { color: aqua; } ul { color: deeppink; } .warning { color: red; } #mainNav { color: yellow; } <ul class=“warning” id=“mainNav”> <li><a href=“/“>Home</a></li> </ul> What color is the “Home” text based on below styles?
  • 18. CSS Specificity Quiz a { color: aqua; } ul { color: deeppink; } .warning { color: red; } #mainNav { color: yellow; } <ul class=“warning” id=“mainNav”> <li><a href=“/“>Home</a></li> </ul> Bonus: what color is the bullet?
  • 19. CSS Specificity Quiz a { color: aqua; } ul { color: deeppink; } .warning { color: red; } #mainNav { color: yellow; } <ul class=“warning” id=“mainNav”> <li><a href=“/“>Home</a></li> </ul> Bonus: what color is the bullet?
  • 21. Inspecting CSS w/Chrome View > Developer > Developer Tools or right-mouse click on the page > Inspect Element
  • 24. New CSS3 Modules Colors & Transparency CSS Gradients Border Radius (Rounded Corners) Box Shadow & Text Shadow Transformations and Animations Web Fonts @font-face Media Queries (Responsive Design)
  • 25. CSS3 Colors CSS2: 17 Color Names / CSS3: 140 Color Names http://www.w3schools.com/cssref/css_colornames.asp New Alpha on Reg-Green-Blue Values rgba( 255, 0, 0, 0.5 ); Specify Hue, Saturation, Lightness, alone or with Alpha Values hsla( 120, 100%, 50%, 0.5 ); Opacity Property (0 transparent 1 opaque) http://www.w3schools.com/cssref/css_colors_legal.asp
  • 26. CSS3 Gradients .fancy { background: -webkit-linear-gradient(red, green, blue); /* For Safari 5.1 to 6.0 */ background: -o-linear-gradient(red, green, blue); /* For Opera 11.1 to 12.0 */ background: -moz-linear-gradient(red, green, blue); /* For Firefox 3.6 to 15 */ background: linear-gradient(red, green, blue); /* Standard syntax */ } http://www.w3schools.com/css/ css3_gradients.asp
  • 28. border-radius Accepts px or % Don’t forget to add vendor prefixes! .rounded { border-top-left-radius: 5px; border-top-right-radius: 10px; border-bottom-right-radius: 20px; border-bottom-left-radius: 15px; } or use the shorthand: .rounded { border-radius: 5px 10px 20px 15px; }
  • 30. Using CSS3 in WordPress
  • 31. Where Do You Put CSS in WordPress? Installed Theme’s Custom CSS Option Jetpack’s “Edit CSS” Module (my favorite) Simple Custom CSS Plugin (if not using Jetpack) Page/Post editor via Inline Styles Child Theme’s style.css file Starter Theme’s style.css file
  • 32. Jetpack’s Edit CSS Module Once activated, go to Appearance > Edit CSS
  • 33. Simple Custom CSS Once activated, go to Appearance > Custom
  • 34. Inline CSS in Editor Add style attribute to opening tag in Text view <p style=“property: value; property: value;”> Considered hacky/janky/ bad practice, but works in a fix!
  • 35. Child Theme’s style.css Child Themes inherit Parent Theme’s functionality Modifications not overwritten when Parent Theme updates Best method for extensive modifications More info on creating Child Themes on the Codex:
 
 https://codex.wordpress.org/Child_Themes Child Theme Plugins (Orbisius, One-click, Configurator)
  • 36. Starter Theme’s style.css Starter Themes include basic theme files Make your own custom theme from them
  • 37. Where Do You Not Put CSS? Linked to a stylesheet in the header.php (use wp_enqueue) Using the native WordPress Theme Editor to edit style.css directly ( No undo or version history! )
  • 41. Q & A Any Questions?
  • 42. Thank you for being here! Suzette Franck Twitter: @suzette_franck
 linkedin & speakerdeck & slideshare