Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
The HTML and CSS Workshop

You're reading from   The HTML and CSS Workshop Learn to build your own websites and kickstart your career as a web designer or developer

Arrow left icon
Product type Paperback
Published in Nov 2019
Publisher Packt
ISBN-13 9781838824532
Length 700 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Authors (4):
Arrow left icon
Matt Park Matt Park
Author Profile Icon Matt Park
Matt Park
Brett Jephson Brett Jephson
Author Profile Icon Brett Jephson
Brett Jephson
Marian Zburlea Marian Zburlea
Author Profile Icon Marian Zburlea
Marian Zburlea
Lewis Coulson Lewis Coulson
Author Profile Icon Lewis Coulson
Lewis Coulson
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Introduction to HTML and CSS 2. Structure and Layout FREE CHAPTER 3. Text and Typography 4. Forms 5. Themes, Colors, and Polish 6. Responsive Web Design and Media Queries 7. Media – Audio, Video, and Canvas 8. Animations 9. Accessibility 10. Preprocessors and Tooling 11. Maintainable CSS 12. Web Components 13. The Future of HTML and CSS Appendix

10. Preprocessors and Tooling

Activity 10.01: Converting the Video Store Home Page into SCSS

Solution

  1. Get a copy of your code from Chapter 6, Responsive Web Design and Media Queries, Activity 6.01, Refactoring the Video Store Product Cards into a Responsive Web Page, and save it as a new file within your Chapter10 project folder called Activity 10.01.html. Remove the CSS code from within the <style> tags and save it as activity1.scss within your SCSS subfolder in the project. Add a link to the activity1.css file in your document from the CSS subfolder of your project.

    Activity 10.01.html can be found in https://packt.live/36YzkXZ.

    activity1.scss code can be found in https://packt.live/32FW5fY.

  2. Update the SCSS to use nesting and color variables, keeping the media queries within the relevant tags, instead of at the end of file. Here's the updated activity1.scss file:
    $primary-color: black;
    $secondary-color: white;
    $hover-color: red;
    $bg-color: lightgray;
    $saving...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime