Be the browser’s mentor, not its micromanager

A presentation at Smashing Conference Freiburg 2022 in September 2022 in Freiburg, Germany by Andy Bell

Slide 1

Slide 1

Be the browser’s mentor, not its micromanager SmashingConf Freiburg 2022 Andy Bell - @hankchizljaw https://set.studio

Slide 2

Slide 2

I’m going to change how you write CSS

Slide 3

Slide 3

Fluid Type Fluid Space Flexible Layouts Progressive Enhancement

Slide 4

Slide 4

We build for everyone Not just for ourselves, or our peer groups

Slide 5

Slide 5

Everyone should get an excellent user experience

Slide 6

Slide 6

No one will ever complain about getting a good baseline experience

Slide 7

Slide 7

Let’s take a look at what we are building buildexcellentwebsit.es

Slide 8

Slide 8

#SmashingConf buildexcellentwebsit.es

Slide 9

Slide 9

Slide 10

Slide 10

The “C” in CSS stands for “Come on, Andy, get on with the good stuff”

Slide 11

Slide 11

Slide 12

Slide 12

CUBE CSS is a CSS methodology that’s orientated towards simplicity, pragmatism and consistency. It’s designed to work with the medium that you’re working in—often the browser—rather than against it.

Slide 13

Slide 13

cube.fyi

Slide 14

Slide 14

Global CSS Composition Utilities Blocks Exceptions

Slide 15

Slide 15

Global CSS Composition Utilities Blocks Exceptions

Slide 16

Slide 16

Global CSS Composition Utilities Blocks Exceptions

Slide 17

Slide 17

Global CSS Composition Utilities Blocks Exceptions

Slide 18

Slide 18

Global CSS Composition Utilities Blocks Exceptions

Slide 19

Slide 19

Home is where the HTML is

Slide 20

Slide 20

It gives tools that help others consume the information on websites a head start.

Slide 21

Slide 21

If the CSS doesn’t load, the website still makes sense!

Slide 22

Slide 22

Old browsers will still get a good baseline experience

Slide 23

Slide 23

Get the HTML right and you’ve built a solid foundation. If not, you’re building on sand.

Slide 24

Slide 24

Slide 25

Slide 25

Slide 26

Slide 26

Let’s get stuck into some CSS Programming

Slide 27

Slide 27

https://piccalil.li/blog/a-modern-css-reset/

Slide 28

Slide 28

Slide 29

Slide 29

Slide 30

Slide 30

Slide 31

Slide 31

Global CSS Composition Utilities Blocks Exceptions

Slide 32

Slide 32

Slide 33

Slide 33

Slide 34

Slide 34

Slide 35

Slide 35

Slide 36

Slide 36

Fluid type and fluid space

Slide 37

Slide 37

Slide 38

Slide 38

https://www.opensignal.com/sites/opensignal-com/files/data/reports/global/data-2015 08/2015_08_fragmentation_report.pdf

Slide 39

Slide 39

Slide 40

Slide 40

Slide 41

Slide 41

Slide 42

Slide 42

Slide 43

Slide 43

.my-element { font-size: clamp(2rem, calc(1rem + 5vw), 10rem); }

Slide 44

Slide 44

Slide 45

Slide 45

Size and space scales

Slide 46

Slide 46

Slide 47

Slide 47

Step Step Step Step Step 0: 1: 2: 3: 4: 1rem 1.25rem 1.56rem 1.95rem 2.43rem (1 * 1.25) (1.25 * 1.25) (1.56 * 1.25) (1.95 * 1.25)

Slide 48

Slide 48

Slide 49

Slide 49

Slide 50

Slide 50

Slide 51

Slide 51

Slide 52

Slide 52

Slide 53

Slide 53

Slide 54

Slide 54

Slide 55

Slide 55

Slide 56

Slide 56

Back to our CSS

Slide 57

Slide 57

Slide 58

Slide 58

Slide 59

Slide 59

Slide 60

Slide 60

Slide 61

Slide 61

Slide 62

Slide 62

Global CSS Composition Utilities Blocks Exceptions

Slide 63

Slide 63

Slide 64

Slide 64

Hello I am a heading Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Donec id elit non mi porta gravida at eget metus. A subheading Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Donec id elit non mi porta gravida at eget metus. 1em

Slide 65

Slide 65

Slide 66

Slide 66

Hello I am a heading Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla. A subheading Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Donec id elit non mi porta gravida at eget metus. 10rem

Slide 67

Slide 67

Slide 68

Slide 68

Slide 69

Slide 69

Slide 70

Slide 70

Slide 71

Slide 71

Global CSS Composition Utilities Blocks Exceptions

Slide 72

Slide 72

Slide 73

Slide 73

Slide 74

Slide 74

Slide 75

Slide 75

Slide 76

Slide 76

Slide 77

Slide 77

Slide 78

Slide 78

Global CSS Composition Utilities Blocks Exceptions

Slide 79

Slide 79

Slide 80

Slide 80

Slide 81

Slide 81

Slide 82

Slide 82

Slide 83

Slide 83

Slide 84

Slide 84

Slide 85

Slide 85

Slide 86

Slide 86

Slide 87

Slide 87

Slide 88

Slide 88

Slide 89

Slide 89

Slide 90

Slide 90

Slide 91

Slide 91

Slide 92

Slide 92

Slide 93

Slide 93

https://glitch.com/edit/#!/build-excellent-websites

Slide 94

Slide 94

We’ve never had it better with browsers

Slide 95

Slide 95

Build the whole website with Tailwind

Slide 96

Slide 96

Slide 97

Slide 97

Slide 98

Slide 98

Slide 99

Slide 99

Glitching and flashing

Slide 100

Slide 100

Slide 101

Slide 101

Go forth and build excellent websites

Slide 102

Slide 102

Thank you Andy Bell - @hankchizljaw https://set.studio - @setstudiotweets https://swop.link/set-studio