Is CSS a simple technology for non programmers? It certainly seems simple at first. Let's explore the boundaries of CSS and cover the ways in which those boundaries are changing and what that means for how we think about ourselves as CSS authors.
G B O U N D A R I E S O F C S S W H E R E W E D R A W T H E L I N E S I S C H A N G I N G : Boundaries are tricky things and when you play with them, people develop feelings. I want us to talk today about the boundaries we’ve drawn around CSS and how I’ve seen and helped them change over the last decade and where I see them going. But I also want to talk about how these boundaries affect us as people; how we see ourselves. how they can affect our lives and careers in real, tangible ways.
S S PA K E T H E C O - C R E A T O R O F C S S Read Full Article Not long after I got involved in Sass, I found this article by Bert Bos, one of the co-creators of CSS. Everyone here should read it. It’s not very long.
G I S : M O V I N G D ATA Programming function fibonacci(n) { if (n == 1 or n == 0) { return n } else { return fibonacci(n - 1) + fibonacci(n - 2) } } Data IN 0 1 2 3 4 5 6 7 … 0 1 1 2 3 5 8 1 3 … Data OUT
I N E A turing machine is a theoretical computer that is constructed of concepts that are convenient to reason about in formal proofs in computer science. It has instructions and an infinitely long tape on which symbols can be written and erased (storage). Someone actually built one recently, but the irony of this is that it takes modern technology and powerful computers to actually realize it as a physical device.
I N G M A C H I N E C A N ’ T D O : • Analyze another Turing machine and determine whether it will ever stop. • In general, computers cannot analyze arbitrary programs and decide if they will do anything in particular without actually running them. Congratulations if you weren’t already, you are now a computer scientist!
S T H I N K D E S I G N I S A N N O Y I N G O R M A Y B E I T ’ S B E C A U S E Change at the design level feels arbitrary and capricious. Would rather it be someone else’s problem. I know! Let’s make the styles the designer’s problem. if we can just make it simple enough…
T Y L I N G T H AT C S S WA S D E S I G N E D F O R , I S E A S Y. O K , L E T ’ S G I V E T H E M T H E B E N E F I T O F T H E D O U B T: B U T T H A T ’ S N O T T H E K I N D O F S T Y L I N G W E A C T U A L LY D O N O W.
N E D S Y S T E M A C C O U N T S F O R T H E I N C R E A S I N G C O M P L E X I T Y O F T H AT S Y S T E M . The creators of CSS are smart people and did plan for the future by adding parsing semantics that can handle unknown parts of a CSS file (progressive enhancement).
A S O N A B O U T A C O M P L E X S Y S T E M W I T H O U T D E C O M P O S I N G I T By shunning all notion of abstraction and indirection, stylesheets quickly become unintelligible.
P T I O N T O T H E D E S I G N O F C S S I S F L A W E D A N D T H O S E D E C I S I O N S M U S T B E R E - E VA L U AT E D S T Y L I N G I S N O T E A S Y but the downsides of this early decision to declare that CSS shall not be “programming” are not just technical.
Designer Java Developer Rubyist Pythonista Data Scientist Kernel Developer CSS Developer There’s a very good chance that you identify as one or more of these.
S C R E AT E A S E N S E O F C O M M U N I T Y A N D B E L O N G I N G These languages and technologies, like all labels, give us something to attach to, they give us power and a sense of belonging.
L E A R N I N G L A D D E R J AVA S C R I P T T E M P L AT I N G O B J E C T M O D E L B U S I N E S S L O G I C D ATA B A S E Many of these technologies have touch points, analogs, and visual similarities that enable learning across boundaries But not CSS, it is purposefully different. This might make sense if CSS was modeled according to how designers work and think about design — but it’s not.
L I VA N , C R E AT O R O O C S S “I had done a little Java but it felt so abstract. Learning Sass connected programming concepts to a domain in which I was already competent. I knew CSS so I could tell if my Sass output was right.” I have heard this story over and over again. “I was *just* a css developer, but once I learned Sass, it unlocked programming for me”.
E D T H E T H I N G S C S S W O U L D N ’ T. Macros Additional Scopes Indirections Symbolic Constants Alternative to CSS Sass appears to be the alternative solution that Bert was recommending. That we keep CSS “simple” and let another technology fill this gap.
H E C S S R E S P O N S E T O T H E E X T E N S I B L E W E B M A N I F E S T O In 2013, I was one of the original co-signers of the extensible web manifesto. I strongly believe in the mission of making the underpinnings of web browsers more accessible to web developers.
U N D A RY O F T H E B R O W S E R E N G I N E T H E E X T E N S I B L E W E B M A N I F E S T O no longer will browser features be across the language divide from javascript to languages like C++ and this is hugely empowering for the web platform.
K E P O S T C S S , P U T S E X T E N S I B I L I T Y I N T H E H A N D S O F J AVA S C R I P T. this makes good sense, especially if you’re great at javascript. Javascript is a great language, certainly far better than SassScript for complex programming tasks. But forcing CSS developers to cross the technology boundary in order to extend their own environment puts many of them back into the same box they have always been.
N E E D S O R WA N T S T O M O V E “ D O W N T H E S TA C K ” T O B E C L E A R there is no *just* about being a CSS developer. Stylesheet development is a rich and rewarding career.
I E S O F C S S A N D T H E W E B A R E M O V I N G The design of CSS can be multi-faceted and serve many goals. We can make CSS more extensible, more organizable, and one side effect of this is that for those who do find joy in more traditional software development, can transition to that.
AT I O N S A R E M U C H B I G G E R T H A N W E M I G H T T H I N K . How many CSS authors are not paid a developers salary because the management doesn’t think it’s “programming”? Why are more women in CSS development than other areas of web technology? Is it because that’s where they want to be or is it because our views of gender and our views of CSS have overlapping stereotypes?
T E R A N D I ’ M C O N F I D E N T T H AT W E W I L L . All the signs are looking up but we can’t just wait for it to happen. Get involved in the spec process. Houdini is a massive step, with our feedback we can make sure it’s in the right direction.