Digital Library
Architecting CSS (The Programmerâ__s Guide to Effective Style Sheets) (Dowden, Martine Dowden, Michael)(Z-Library)
Dowden, Martine, Dowden, Michael
Architecting CSS (The Programmerâ__s Guide to Effective Style Sheets) (Dowden, Martine Dowden, Michael)(Z-Library)
HTML/CSS/JS
No Description
16
Views
0
Downloads
0.00
Total Donations
Text Preview (First 20 pages)
Registered users can read the full content for free
Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.
Page
1
Architecting CSS The Programmer’s Guide to Effective Style Sheets — Martine Dowden Michael Dowden
Page
2
Architecting CSS The Programmer’s Guide to Effective Style Sheets Martine Dowden Michael Dowden
Page
3
Architecting CSS ISBN-13 (pbk): 978-1-4842-5749-4 ISBN-13 (electronic): 978-1-4842-5750-0 https://doi.org/10.1007/978-1-4842-5750-0 Copyright © 2020 by Martine Dowden and Michael Dowden This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein. Managing Director, Apress Media LLC: Welmoed Spahr Acquisitions Editor: Louise Corrigan Development Editor: James Markham Coordinating Editor: Nancy Chen Cover designed by eStudioCalamar Cover image designed by Freepik (www.freepik.com) Distributed to the book trade worldwide by Springer Science+Business Media New York, 1 New York Plaza, New York, NY 10004. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation. For information on translations, please e-mail rights@apress.com, or visit http://www.apress.com/ rights-permissions. Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales web page at http://www.apress.com/bulk-sales. Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the book’s product page, located at www.apress.com/9781484257494. For more detailed information, please visit http://www.apress.com/source-code. Printed on acid-free paper Martine Dowden Brownsburg, IN, USA Michael Dowden Brownsburg, IN, USA
Page
4
This book is dedicated to all of the CSS professionals who have ever been told they were “not real programmers.”
Page
5
v Table of Contents Chapter 1: Cascading Style Sheets ��������������������������������������������������������������������������� 1 Classification ��������������������������������������������������������������������������������������������������������������������������������� 1 Language Features ������������������������������������������������������������������������������������������������������������������ 2 Structure ���������������������������������������������������������������������������������������������������������������������������������� 3 Software Architecture ������������������������������������������������������������������������������������������������������������������� 4 Separation of Concerns ����������������������������������������������������������������������������������������������������������� 5 Nontechnical Factors ��������������������������������������������������������������������������������������������������������������� 8 Best Practices ������������������������������������������������������������������������������������������������������������������������ 10 Web Architecture ������������������������������������������������������������������������������������������������������������������������� 11 HTML ������������������������������������������������������������������������������������������������������������������������������������� 13 Document Object Model �������������������������������������������������������������������������������������������������������� 16 History of CSS ����������������������������������������������������������������������������������������������������������������������������� 17 Creation of CSS ���������������������������������������������������������������������������������������������������������������������� 20 Early Adoption������������������������������������������������������������������������������������������������������������������������ 22 Early Advocates ��������������������������������������������������������������������������������������������������������������������� 22 CSS Today ������������������������������������������������������������������������������������������������������������������������������ 25 Summary������������������������������������������������������������������������������������������������������������������������������������� 26 Chapter 2: Rules and Selectors ������������������������������������������������������������������������������ 27 Selectors ������������������������������������������������������������������������������������������������������������������������������������� 27 Basics ������������������������������������������������������������������������������������������������������������������������������������ 27 Combinators �������������������������������������������������������������������������������������������������������������������������� 35 About the Authors ���������������������������������������������������������������������������������������������������� ix About the Technical Reviewer ��������������������������������������������������������������������������������� xi Foreword ��������������������������������������������������������������������������������������������������������������� xiii Acknowledgments ���������������������������������������������������������������������������������������������������xv
Page
6
vi Pseudo Elements ������������������������������������������������������������������������������������������������������������������� 37 Pseudo Classes ��������������������������������������������������������������������������������������������������������������������� 42 Declarations �������������������������������������������������������������������������������������������������������������������������������� 47 Properties ������������������������������������������������������������������������������������������������������������������������������ 47 Units �������������������������������������������������������������������������������������������������������������������������������������� 49 Functions ������������������������������������������������������������������������������������������������������������������������������� 50 Variables �������������������������������������������������������������������������������������������������������������������������������� 54 At-Rules �������������������������������������������������������������������������������������������������������������������������������������� 55 @import ��������������������������������������������������������������������������������������������������������������������������������� 55 @supports ����������������������������������������������������������������������������������������������������������������������������� 56 @media ��������������������������������������������������������������������������������������������������������������������������������� 57 Summary������������������������������������������������������������������������������������������������������������������������������������� 58 Chapter 3: Order of Importance ������������������������������������������������������������������������������ 59 Inheritance ���������������������������������������������������������������������������������������������������������������������������������� 59 Global Values ������������������������������������������������������������������������������������������������������������������������� 62 Specificity ����������������������������������������������������������������������������������������������������������������������������������� 67 Precedence ��������������������������������������������������������������������������������������������������������������������������������� 69 Cascading ����������������������������������������������������������������������������������������������������������������������������������� 70 Value Processing ������������������������������������������������������������������������������������������������������������������� 71 Summary������������������������������������������������������������������������������������������������������������������������������������� 72 Chapter 4: Layouts �������������������������������������������������������������������������������������������������� 73 Box Model ����������������������������������������������������������������������������������������������������������������������������������� 73 Box Sizing ������������������������������������������������������������������������������������������������������������������������������ 74 Display ���������������������������������������������������������������������������������������������������������������������������������������� 87 Inline �������������������������������������������������������������������������������������������������������������������������������������� 87 Block Elements ���������������������������������������������������������������������������������������������������������������������� 90 Inline-Block ��������������������������������������������������������������������������������������������������������������������������� 94 Float ��������������������������������������������������������������������������������������������������������������������������������������� 96 Flexbox �������������������������������������������������������������������������������������������������������������������������������� 103 Grid �������������������������������������������������������������������������������������������������������������������������������������� 111 Table of ConTenTs
Page
7
vii Responsive Design �������������������������������������������������������������������������������������������������������������������� 120 Summary����������������������������������������������������������������������������������������������������������������������������������� 126 Chapter 5: Compatibility and Defaults ������������������������������������������������������������������ 127 Browser Support ����������������������������������������������������������������������������������������������������������������������� 127 Browser Defaults ���������������������������������������������������������������������������������������������������������������������� 129 CSS Reset ���������������������������������������������������������������������������������������������������������������������������� 130 Normalize ���������������������������������������������������������������������������������������������������������������������������� 130 Browser Compatibility ��������������������������������������������������������������������������������������������������������������� 131 Vendor Prefixes ������������������������������������������������������������������������������������������������������������������� 131 Fallbacks ����������������������������������������������������������������������������������������������������������������������������� 136 Supports At-Rule ����������������������������������������������������������������������������������������������������������������� 138 Project Defaults ������������������������������������������������������������������������������������������������������������������������� 141 Summary����������������������������������������������������������������������������������������������������������������������������������� 143 Chapter 6: Interactions and Transitions ��������������������������������������������������������������� 145 User Interaction Response �������������������������������������������������������������������������������������������������������� 145 Transform ���������������������������������������������������������������������������������������������������������������������������� 147 Transitions ��������������������������������������������������������������������������������������������������������������������������� 149 Keyframe Animations ���������������������������������������������������������������������������������������������������������� 151 Timing Functions ����������������������������������������������������������������������������������������������������������������� 157 Performance Considerations ����������������������������������������������������������������������������������������������������� 163 Summary����������������������������������������������������������������������������������������������������������������������������������� 164 Chapter 7: Preprocessors ������������������������������������������������������������������������������������� 165 Implications for Architecture ����������������������������������������������������������������������������������������������������� 165 Nesting �������������������������������������������������������������������������������������������������������������������������������� 166 Color Functions and Variables ��������������������������������������������������������������������������������������������������� 168 Mixins���������������������������������������������������������������������������������������������������������������������������������������� 171 Simple Mixin ������������������������������������������������������������������������������������������������������������������������ 171 Parameters �������������������������������������������������������������������������������������������������������������������������� 171 Arguments ��������������������������������������������������������������������������������������������������������������������������� 172 Table of ConTenTs
Page
8
viii @extend ������������������������������������������������������������������������������������������������������������������������������������ 176 @Import ������������������������������������������������������������������������������������������������������������������������������������ 179 Summary����������������������������������������������������������������������������������������������������������������������������������� 180 Chapter 8: Frameworks, Libraries, and JavaScript ���������������������������������������������� 181 JavaScript ��������������������������������������������������������������������������������������������������������������������������������� 181 Manipulating CSS Using JS ������������������������������������������������������������������������������������������������� 183 Component-Based Architecture ������������������������������������������������������������������������������������������������ 186 Libraries and Frameworks �������������������������������������������������������������������������������������������������������� 187 Web Components����������������������������������������������������������������������������������������������������������������� 194 Styling Applications That Use Web Components ����������������������������������������������������������������� 201 Summary����������������������������������������������������������������������������������������������������������������������������������� 203 Chapter 9: Architectural Patterns ������������������������������������������������������������������������� 205 Approach ����������������������������������������������������������������������������������������������������������������������������������� 205 Goals ������������������������������������������������������������������������������������������������������������������������������������ 206 Guidelines ���������������������������������������������������������������������������������������������������������������������������� 207 Methodologies �������������������������������������������������������������������������������������������������������������������������� 208 OOCSS ��������������������������������������������������������������������������������������������������������������������������������� 209 BEM ������������������������������������������������������������������������������������������������������������������������������������� 212 SMACSS ������������������������������������������������������������������������������������������������������������������������������� 216 ITCSS ����������������������������������������������������������������������������������������������������������������������������������� 219 Processes ���������������������������������������������������������������������������������������������������������������������������������� 220 Decision Making ������������������������������������������������������������������������������������������������������������������ 221 Linting ���������������������������������������������������������������������������������������������������������������������������������� 223 Testing ��������������������������������������������������������������������������������������������������������������������������������� 223 Code Review ������������������������������������������������������������������������������������������������������������������������ 224 Summary����������������������������������������������������������������������������������������������������������������������������������� 225 Index ��������������������������������������������������������������������������������������������������������������������� 227 Table of ConTenTs
Page
9
ix About the Authors Martine Dowden is the CTO of Andromeda, Founder and Lead Developer at FlexePark, and an international speaker. She focuses on web interfaces that are beautiful, functional, accessible, and usable, approaching user experience from both art and science, drawing from her degrees in psychology and visual communications. Martine is a 2019 Google Developer Expert in Web Technologies, a 2019 Microsoft MVP in Developer Technologies, and the author of Programming Languages ABC++ and Approachable Accessibility: Planning for Success. Michael Dowden is the CEO of Andromeda, Founder and Product Architect at FlexePark, an international speaker, a 2019 Google Developer Expert in Firebase, and a 2019 Microsoft MVP in Developer Technologies. For more than 20 years, he has been writing code and geeking out over technology. He is passionate about keeping things simple and focusing on what provides real value to the end user. Michael is the author of Programming Languages ABC++ and Approachable Accessibility: Planning for Success.
Page
10
xi About the Technical Reviewer Phil Nash is a developer evangelist for Twilio and a Google Developer Expert. He’s been in the web industry for more than 10 years building applications and integrating APIs with JavaScript and Ruby. He’s British, but currently enjoying life in Melbourne, Australia. He can be found hanging out at meetups and conferences, playing with new technologies, or writing open source code. Phil tweets at @philnash, and you can find him elsewhere online at https://philna.sh.
Page
11
xiii As an international community, the W3C starts with a mission statement: Web for All, Web on Everything. This means the Web is a medium designed to adapt to the needs and preferences of every user, and the constraints of every device. But that poses a problem for design. To quote the very first website: “This implies no device-specific markup, or anything which requires control over fonts or colors, for example.”1 In the early days of the Internet, web design seemed impossible. How could we have planned for every possible combination of user-needs and device capabilities into the future—from text-only terminals to smart speakers, watches, HD displays, and accessibility devices? Nearly 30 years later, CSS is the standard web language of design, used on nearly every website and application we develop. But that broad use, and the low barriers to getting started, can lead us to underestimate this powerful language and the complex problems it is designed to solve. As the web continues to grow its more important than ever for professional developers to understand how and why CSS works, and how we can get the most out of it. In this book, Martine and Michael bring their experience and teaching expertise to the topic – leading us through every layer of the language: from cascade and inheritance, to progressive enhancement, web layout, responsive design, and architecture. This book is packed with guidance to keep your CSS resilient and organized. Miriam Suzanne 1 http://info.cern.ch/hypertext/WWW/MarkUp/HTMLConstraints.html (Retrieved 2020) Foreword
Page
12
xiv Miriam Suzanne is a project manager, user-experience designer, and front-end architect. An accomplished writer and novelist, she authored “ Jump Start Sass” and is a staff-writer for CSS Tricks (https://css-tricks.com/). Suzanne is a member of the Sass core team, and creator of popular open-source tools including Susy, True, and Herman. She is an Invited Expert with the W3C CSS Working Group and a teacher for the Mozilla Developer channel, producing resources for web professionals including tools, videos, articles, and demos. Suzanne is an international conference speaker and in 2017 she won the “Best Of” speaker award at CSS Dev Conference. foreword
Page
13
xv Acknowledgments Writing a book is a project of passion and commitment and takes a tremendous amount of time and support from friends and family, doubly so when writing multiple books in a single year. We would like to thank our children, Brook and Xander, for their patience during this process. And of course their grandparents, Marc and Elisabeth Ebtinger, for making it possible for us to dedicate time to writing and conferences. Without the support of the technology and speaking community, we would not be where we are today. Lee Brandt and Kevin Miller were instrumental in getting Martine to start speaking at conferences. Along with Lee, Jeff Strauss and Jon Mills helped us expand our conference presence and meet a large number of other generous people. Nate Taylor prompted Michael to start speaking about CSS. Michael first met Chris DeMars because of CSS and Chris later nominated us for the GDE, which was significantly helpful. And of course we must mention Philip Japikse, fellow speaker and Apress author, who has been tremendously supportive and without whom this book would not have happened. Many of those who influenced us on CSS are already mentioned within the pages of this book, but it’s important to note the early and long-lasting influence that Dave Shea and Molly Holzschlag have had on our understanding of CSS. Finally, we must mention those who contributed directly to the pages you’re about to read. The Apress team of Louise Corrigan, Nancy Chen, and Phil Nash has been supportive the whole way, from walking through the proposal process to ensuring the quality of the finished book. Our last thanks goes to the many people who went above and beyond to support our research on the history of accessibility and the people involved, including Sarah Bourne, Fred de Villamil, Jon Baggaley, Andy Budd, Eric Meyer, Steven Pemberton, Dylan Wilbanks, Chris Wilson, and Chris Lilley.
Page
14
1 © Martine Dowden and Michael Dowden 2020 M. Dowden and M. Dowden, Architecting CSS, https://doi.org/10.1007/978-1-4842-5750-0_1 CHAPTER 1 Cascading Style Sheets This book on Cascading Style Sheets (CSS) takes a very different approach from most. It isn’t trying to teach you how to design web pages and, aside from a cursory overview, isn’t focused on teaching you how to use CSS. This chapter introduces the focus of this book, which is how (and why) to treat CSS as a programming language. Classification Cascading Style Sheets (CSS) are a web technology that allows layout, theme, and style to be applied to a document. In most common cases the document in question is a Hypertext Markup Language (HTML) file and the rendering is performed by a web browser. Often CSS is seen as a design tool since it allows the author or designer of a web page to determine the visual look of that page. Because of its control over the final look of a web page, CSS has a direct impact on both usability and accessibility. Due to these factors, creating style sheets and writing CSS are sometimes assumed to be design tasks, and it may be the designer on a software team who is tasked with maintaining the style sheets. It’s interesting to note that before CSS became the dominant styling language of the Web, there were a number of other competing proposals. However, “CSS had one feature that distinguished it from all the others: It took into account that on the Web, the style of a document couldn’t be designed by either the author or the reader on their own, but that their wishes had to be combined, or cascaded, in some way; and, in fact, not just the reader’s and the author’s wishes, but also the capabilities of the display device and the browser.”1 1 Bert Bos (December 17, 2016). A brief history of CSS until 2016. WorldWideWeb Consortium. Retrieved August 9, 2019, from www.w3.org/Style/CSS20/history.html
Page
15
2 At its core, then, CSS puts control in the hands of both authors and readers. This makes it somewhat interactive and subjects it to the will of the reader of a web page, since they are able to influence the final look of a page based upon their own preferences. Most often when author intent meets the end-user influence to create a unique hybrid output, this is known as programming. So this begs the question: Exactly what is CSS? Should writing style sheets be considered programming, and should those who write CSS be considered programmers? For starters, just like popular programming languages such as JavaScript and Python, CSS is a language. As shown in the “Structure” section, CSS has a specific syntax that must be followed and the rules you write cause actions to be performed. Additionally, the WorldWideWeb Consortium (W3C) refers to CSS as a language.2 One measure of a programming language is to ask if it is Turing complete. Skipping the formal definition, the simple explanation of a Turing complete language is one that can solve any arbitrary computation. Note that this isn’t a strict requirement and there are some very useful programming languages that are not Turing complete, most notably Structured Query Language (SQL) and Regular Expressions (RegEx). However, if a language can be shown to be Turing complete, it should remove all doubt about its classification. The combination of CSS + HTML has received the formal proof necessary to be classified as Turing complete.3 This means that CSS + HTML meets the requirements for any general-purpose programming language, and that writing CSS and HTML counts as programming. This means that you are most definitely a programmer (or web developer, if you prefer). Language Features Despite the classification of CSS as a programming language, we can probably agree that using CSS + HTML for general programming tasks wouldn’t be particularly convenient. That is because this really isn’t the point of CSS (or HTML). 2 WorldWideWeb Consortium. HTML & CSS. Retrieved July 30, 2019, from www.w3.org/ standards/webdesign/htmlcss 3 Lara Schenck (May 25, 2019). Is CSS Turing Complete? Retrieved July 31, 2019, from https://notlaura.com/is-css-turing-complete/ Chapter 1 CasCading style sheets
Page
16
3 Regardless, there are many interesting features of the language that are similar to more traditional programming languages, including • Variables • Functions • Calculations • Imports • Scope • Comments • Polymorphism When utilizing CSS precompilers, you gain access to even more programming language features, such as • Mixins • Extension • Namespaces • List and map data structures • Mathematical expressions See Chapter 2 for a more in-depth exploration of the CSS language features and Chapter 7 for more on CSS precompilers. Structure It is important to note that CSS is a declarative language rather than an imperative one. This means that rather than writing code that tells a web browser how to apply styles to a page, we instead tell the browser what styles to apply and where to apply them. These declarations are called rulesets in the specification, but may be referred to simply as rules. Each rule in CSS is comprised of one or more selectors and one or more declarations, as shown in Figure 1-1. Chapter 1 CasCading style sheets
Page
17
4 Each declaration is made up of a property-value pair. As of this writing, the CSS Working Group listed 564 possible properties. Each property must be supported by the user agent (typically a web browser) for it to have any effect. Unsupported properties are simply ignored. Rulesets may be further grouped and modified by at-rules such as @media or @supports and are collected into style sheets. A style sheet is simply a text file with a .css extension that contains any number of rules which describe the presentation of a document or web page. Software Architecture Once we accept that CSS has all the sophistication of a programming language, we need to accept the implication that we must treat style sheets like code. This means that we can take advantage of many principles, best practices, and design patterns of software architecture and apply them when writing CSS. Figure 1-1. CSS Ruleset Chapter 1 CasCading style sheets
Page
18
5 Note you may find the term software architecture used interchangeably with the term software design. this is common within the industry and both terms refer to the same high-level design thinking and process methodology. since Css is often used for visual design, we chose the term architecture throughout this book to avoid any confusion between these concepts. Software architecture looks at the structure and components of a system and weighs the pros and cons of various possible combinations and approaches. The strengths, weaknesses, and limitations of various systems and approaches should all be considered. The architect’s approach is much more of the high-level bird’s-eye view than a developer’s (although often the same person will do both). For example, if you wanted to animate an image moving across the page when a button is clicked, how would you implement that functionality? Would you use CSS or JavaScript? Would you use an <img> element, Scalable Vector Graphics (SVG), or Canvas? Which will yield the smoothest visual animation? Which approach will be the easiest to maintain when requirements change? These are the types of questions that software architecture attempts to evaluate. You do not have to start from scratch when making these types of decisions. There are some well-established principles of software architecture and best practices that can guide you on your journey to more strategic decision making with regard to CSS. Separation of Concerns The term separation of concerns is credited to Edsger Dijkstra4 and refers to the idea that it is very helpful for us to focus on one aspect of a problem at a time. As shown later in the “Web Architecture” section, a web application separates content, style, and actions and even uses different technologies for each of these concerns. Looking at separation of concern as it pertains to CSS, what are some of the concerns we might find in a ruleset? As shown in Figure 1-2, we see that layout, theme, typography, and interaction are all aspects of a web page that can be controlled using CSS. See Figure 1-2. 4 Dijkstra, Edsger W (August 30, 1974). On the role of scientific thought. Retrieved August 12, 2019, from www.cs.utexas.edu/users/EWD/transcriptions/EWD04xx/EWD447.html Chapter 1 CasCading style sheets
Page
19
6 Now, let’s say you have a style sheet with 20,000 rulesets. This is clearly unmanageable and these rulesets need to be split into multiple files. How do you determine how many files you need and which rulesets go into each file? One approach is to split files based upon concern (e.g., layout vs. theme), while another approach would be to group rulesets based upon the specific components to which they apply. This question is quite fundamental to the discussion of different CSS architecture models in Chapter 10. Two of the most widely accepted principles of software architecture, cohesion and coupling, serve to better define the idea of separation of concerns. These metrics were first published in Structured Design5 and have since become standards in software engineering. Cohesion Cohesion can be described as a measure of responsibility. It is a qualitative measure of the breadth of different tasks or effects a given unit of code is responsible for and the nature of the relationship between those tasks or effects. Traditionally there are seven levels of cohesion ranked from coincidental (worst) to functional (best). Figure 1-2. CSS Areas of Concern 5 W. P. Stevens, G. J. Myers and L. L. Constantine, “Structured Design,” in IBM Systems Journal, vol. 13, no. 2, pp. 115-139, 1974. doi: 10.1147/sj.132.0115 Chapter 1 CasCading style sheets
Page
20
7 Another popular principle that is related to cohesion is the single responsibility principle (SRP). The idea is that every function and module should have just one responsibility. There are two important goals that derive from this: 1. Lack of side effects – If a function does just one thing, then there is little risk of side effects or unintended consequences from its use. 2. Only one reason to change – Every time code changes, it increases the risk of introducing errors and bugs. If we reduce the number of changes, we can diminish risk. Additionally, this helps avoid side effects from system-wide change. The goals of both cohesion and single responsibility are to promote simplicity and reduce risk, which are important goals for all of our architectural decisions. Coupling Coupling describes the interdependence between two or more units of code. Loose coupling is associated with good cohesion and generally describes a module with good reusability that may be updated independently of other modules with minimal impact on the overall system. This is an important attribute of robust and flexible systems. Tight coupling is associated with poor cohesion and describes modules that are hard to test or modify independently. Such modules generally cannot be reused freely and may require larger testing efforts when changed. Favor looser coupling whenever possible. When building web applications, we will find a lot of value in decreasing the coupling between content and design. Ideally we should be able to create style sheets that work for a wide range of content without adjustment. When we achieve this, we may say we have orthogonality. Orthogonality While an important and common term when discussing system design, the word orthogonality has accumulated some disfavor in recent years. This is likely due to a combination of misuse and poor definitions leading to it sometimes being described Chapter 1 CasCading style sheets
The above is a preview of the first 20 pages. Register to read the complete e-book.
Recommended for You
{{#thumbnailUrl}}
{{/thumbnailUrl}}
{{^thumbnailUrl}}
📚
{{/thumbnailUrl}}
Loading recommended books...
Failed to load, please try again later