• Complain

Joe Attardi - Modern CSS

Here you can read online Joe Attardi - Modern CSS full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2020, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Joe Attardi Modern CSS
  • Book:
    Modern CSS
  • Author:
  • Genre:
  • Year:
    2020
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

Modern CSS: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Modern CSS" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Joe Attardi: author's other books


Who wrote Modern CSS? Find out the surname, the name of the author of the book and a list of all author's works by series.

Modern CSS — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Modern CSS" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Acknowledgments First of all Id like to thank my wife Liz for putting up with - photo 1
Acknowledgments
First of all, I'd like to thank my wife Liz for putting up with me spending so much time on the computer working on this book, and for encouraging me to keep going on it when I was feeling burned out. Additional thanks go to Stephanie Eckles ( @5t3ph ) and Ellie Baker ( @ellie_html ) for reviewing some of the chapters in the book. Last but not least, thanks to you, the reader, for reading this book. I hope you find it helpful.
Introduction
CSS sometimes gets a bad reputation for being really difficult. There are lots of books, sites, and resources out there that approach the topic from all different angles.

Still, I see a lot of people struggle with CSS. I have struggled with it at times over the years myself. I set out to write this book both to help others, and to help myself learn. In researching the topics for this book, I have learned a lot of new CSS tricks (and gotchas!) that I wasn't aware of before.

Who this book is for
This book is for the beginner web developer just getting their feet wet with CSS. It will teach you the basic fundamental concepts and give plenty of concrete examples.

It's also for experienced developers who are looking for a refresher on CSS, or who want to level up their CSS knowledge.

What this book is not
This book is not meant to be an exhaustive reference to all possible CSS properties and values. There are already excellent resources for that like the Mozilla Developer Network, commonly referred to as MDN ( https://developer.mozilla.org/ ). I will try to focus on the most commonly used ones that will be most helpful with developing your websites and apps.
Code samples
This book contains many CSS code samples. In some of these, I have left out some of the CSS properties being applied so that the example can focus on the properties being discussed.

For example, in a section about flexbox, font and color properties are sometimes omitted for brevity.

What is CSS?
Chances are that you already have some idea of what CSS is, or else you probably wouldnt have been interested in this book. But lets start at the beginning, to make sure were all on the same page. CSS stands for Cascading Style Sheets. Its the way that we style our websites. Without CSS, every website would just be black Times New Roman with tiny buttons.

Its capable of much more than styling text, however. CSS lets us define entire layouts, position elements, and even perform animations. Style sheets is self-explanatory, but what is a cascading style sheet? Because more than one style rule could apply to a given HTML element, there needs to be some way to determine which rule should apply in the event of a conflict. The styles cascade from less specific to more specific selectors, and the most specific rule wins. Specificity is an important concept in CSS, and we will discuss that in more detail later.

Anatomy of a CSS rule
CSS rules target HTML elements by using selectors.

Later, we will have an entire chapter dedicated to selectors. A rule consists of a selector, followed by an opening curly brace. Then there are one or more CSS properties set, delimited with semicolons. Finally, the rule ends with a closing curly brace. Every element in the document that is matched by the selector has the properties in the CSS rule applied to it. Heres an example of a CSS rule: CSS .header { background-color : red ; border : 1px solid blue ; } This rule targets any element with the class header (more on classes later).

Any element with this class will have a red background, and a 1 pixel solid blue border. background-color and border are CSS properties. The border width is specified as 1px . px is a unit in CSS. There are several useful units, including em , rem , or % . We will learn about the different CSS units in an upcoming chapter.

If the same property is used more than once, the later definition wins. Given the following CSS: CSS .header { background-color : red ; background-color : blue ; } The resulting element will have a blue background. CSS can also contain comments: CSS /* This is a comment outside of a rule */ .header { /* This is a comment inside of a rule */ background: red ; }

How CSS is used
There are several ways to use CSS in an HTML document.
Inline styles
The first is by using inline styles . Inline styles are specified as CSS properties in the style attribute of an HTML element: HTML
style= "background-color: red;" > Red background
Any CSS properties specified as inline styles takes precedence over any other rules defined in a style sheet.
Style block
CSS rules can also be specified in a style sheet in the HTML document itself.
Style block
CSS rules can also be specified in a style sheet in the HTML document itself.

This is done by creating a element and adding the CSS rules inside that element: HTML/CSS p { margin-bottom : 0.5em ; }

External style sheet
Lastly, CSS rules can be specified in a file with the .css extension. Then, the style sheet is added to the HTML document with a link tag in the head element: HTML rel= "stylesheet" href= "/path/to/file.css" >
CSS resources
The Mozilla Developer Network, or MDN, has an extensive reference to all CSS properties, including usage, examples, and browser support information. The CSS section can be found at https://developer.mozilla.org/en-US/docs/Web/CSS . You will see references to different MDN pages extensively throughout this book. If you need to quickly check if a feature is supported in your favorite browser, a great resource is https://caniuse.com . Simply type in the name of the CSS property, for example, and see data on what browsers support it.

Speaking of that...

A note on browser support
As this book is titled Modern CSS, it assumes you are writing CSS for modern browsers. I define modern browsers to mean recent versions of Chrome, Firefox, Safari, and Edge. Notably absent from that list is Internet Explorer. Some of the features described in this book are only partially supported, buggy, or not even supported at all. IE11 hasnt been actively developed since 2015, and it has an increasingly small market share.

Many popular websites no longer support IE11. Given this, be warned that many of the CSS features discussed in this book will not work well, or at all, on IE11. You also wont see vendor prefixed CSS properties in this book. This is something that, in the past, browser vendors have used to support experimental features before they are available in all browsers. However, this isnt done as much these days. The trend now is to add these features behind configuration flags in the browser.

If you would still rather use vendor prefixes, there are several CSS processors, such as Autoprefixer ( https://github.com/postcss/autoprefixer ), that can automatically add these prefixes at build time.

How CSS works
The Document Object Model (DOM)
The Document Object Model (DOM) is a data structure in the browser. It is a tree of objects that represent the elements in the document, and their hierarchy. This tree is composed of DOM nodes. The DOM is created by reading the HTML markup, tokenizing it, parsing it, and finally creating the object hierarchy that makes up the DOM. The Document Object Model Source Google Web Fundamentals - photo 2 The Document Object Model.

Source: Google Web Fundamentals ( https://developers.google.com/web/fundamentals/performance/critical-rendering-path/constructing-the-object-model )

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Modern CSS»

Look at similar books to Modern CSS. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Modern CSS»

Discussion, reviews of the book Modern CSS and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.