Design in the Background

A presentation at Talk.CSS in November 2020 in Singapore by Eric A. Meyer

Slide 1

Slide 1

Talk.CSS #56 4 November 2020 DESIGN IN THE BACKGROUND

Slide 2

Slide 2

THE BODY’S MANY LAYERS

Slide 3

Slide 3

Styling the <body>

Slide 4

Slide 4

Styling the <body>

Slide 5

Slide 5

Styling the <body> hsla(34deg,38%,99%,1)

Slide 6

Slide 6

Styling the <body> url(i/hamonshu/bg-waves.png) 250px -50px, hsla(34deg,38%,99%,1)

Slide 7

Slide 7

Styling the <body> url(i/hamonshu/bg-waves.png) 0 0, url(i/hamonshu/bg-waves.png) 250px -50px, hsla(34deg,38%,99%,1)

Slide 8

Slide 8

Styling the <body> url(i/hamonshu/bg-waves.png) 0 0, url(i/hamonshu/bg-waves.png) 250px -50px, hsla(34deg,38%,99%,1)

Slide 9

Slide 9

Styling the <body> linear-gradient(0deg, hsla(34deg,38%,99%,1) 23em, hsla(34deg,38%,99%,0) 42em), url(i/hamonshu/bg-waves.png) 0 0, url(i/hamonshu/bg-waves.png) 250px -50px, hsla(34deg,38%,99%,1)

Slide 10

Slide 10

Styling the <body> linear-gradient(179deg, hsla(34deg,38%,99%,1) 11em, hsla(34deg,38%,99%,0) 13em), linear-gradient(0deg, hsla(34deg,38%,99%,1) 23em, hsla(34deg,38%,99%,0) 42em), url(i/hamonshu/bg-waves.png) 0 0, url(i/hamonshu/bg-waves.png) 250px -50px,

Slide 11

Slide 11

Styling the <body> linear-gradient(180deg, hsla(34deg,38%,99%,1) 11em, hsla(34deg,38%,99%,0) 13em), linear-gradient(0deg, hsla(34deg,38%,99%,1) 23em, hsla(34deg,38%,99%,0) 42em), url(i/hamonshu/bg-waves.png) 0 0, url(i/hamonshu/bg-waves.png) 250px -50px,

Slide 12

Slide 12

Styling the <body> linear-gradient(179deg, hsla(34deg,38%,99%,1) 11em, hsla(34deg,38%,99%,0) 13em), linear-gradient(0deg, hsla(34deg,38%,99%,1) 23em, hsla(34deg,38%,99%,0) 42em), url(i/hamonshu/bg-waves.png) 0 0, url(i/hamonshu/bg-waves.png) 250px -50px,

Slide 13

Slide 13

Styling the <body> linear-gradient(90deg, ……… ), linear-gradient(179deg, hsla(34deg,38%,99%,1) 11em, hsla(34deg,38%,99%,0) 13em), linear-gradient(0deg, hsla(34deg,38%,99%,1) 23em, hsla(34deg,38%,99%,0) 42em), url(i/hamonshu/bg-waves.png) 0 0,

Slide 14

Slide 14

Styling the <body>

Slide 15

Slide 15

Styling the <body> linear-gradient(90deg, ……… ), linear-gradient(179deg, hsla(34deg,38%,99%,1) 11em, hsla(34deg,38%,99%,0) 13em), linear-gradient(0deg, hsla(34deg,38%,99%,1) 23em, hsla(34deg,38%,99%,0) 42em), url(i/hamonshu/bg-waves.png) 0 0,

Slide 16

Slide 16

Styling the <body> linear-gradient(180deg, rgba(255,128,0,0.033), 3em, rgba(255,216,0,0) 33em), linear-gradient(90deg, ……… ), linear-gradient(179deg, hsla(34deg,38%,99%,1) 11em, hsla(34deg,38%,99%,0) 13em), linear-gradient(0deg, hsla(34deg,38%,99%,1) 23em,

Slide 17

Slide 17

Styling the <body> body { background: linear-gradient(180deg, rgba(255,128,0,0.033), 3em, rgba(255,216,0,0) 33em), linear-gradient( 90deg, hsla(34deg,0%,96%,0.98) 5%, 10%, hsla(34deg,38%,99%,0.95) 25%, 33%, hsla(34deg,38%,99%,1) 50%, 67%, hsla(34deg,38%,99%,0.975) 75%, 90%, hsla(34deg,0%,96%,0.98) 95% ) 0 0 / 100% 100% no-repeat, linear-gradient(179deg, hsla(34deg,38%,99%,1) 11em, hsla(34deg,38%,99%,0) 13em), linear-gradient(0deg, hsla(34deg,38%,99%,1) 23em, hsla(34deg,38%,99%,0) 42em), url(i/hamonshu/bg-waves.png) 0 0, url(i/hamonshu/bg-waves.png) 250px -50px, hsla(34deg,38%,99%,1); }

Slide 18

Slide 18

WAVES ACROSS THE FOOTER

Slide 19

Slide 19

Footer waves

Slide 20

Slide 20

Footer waves

Slide 21

Slide 21

Footer waves

Slide 22

Slide 22

Footer waves

Slide 23

Slide 23

Footer waves linear-gradient(179.5deg, hsla(34deg,38%,99%,1), hsl(25deg,0%,97%)) 0 0 / 100% 100%

Slide 24

Slide 24

Footer waves linear-gradient(179.5deg, hsla(34deg,38%,99%,1), hsl(25deg,0%,97%)) 0 0 / 100% 100%

Slide 25

Slide 25

Footer waves url(i/hamonshu/footer-wave.png) 0 95% / auto 1.5em repeat-x, linear-gradient(179.5deg, hsla(34deg,38%,99%,1), hsl(25deg,0%,97%)) 0 0 / 100% 100%

Slide 26

Slide 26

Footer waves url(i/hamonshu/footer-wave.png) 0 100% / auto 2em repeat-x, url(i/hamonshu/footer-wave.png) 0 95% / auto 1.5em repeat-x, linear-gradient(179.5deg, hsla(34deg,38%,99%,1), hsl(25deg,0%,97%)) 0 0 / 100% 100%

Slide 27

Slide 27

Footer waves url(i/hamonshu/footer-curl.png) -10px 0 / auto 100% no-repeat, url(i/hamonshu/footer-wave.png) 0 100% / auto 2em repeat-x, url(i/hamonshu/footer-wave.png) 0 95% / auto 1.5em repeat-x, linear-gradient(179.5deg, hsla(34deg,38%,99%,1), hsl(25deg,0%,97%)) 0 0 / 100% 100%

Slide 28

Slide 28

Footer waves footer#global::before { content: “”; display: block; height: 6.5em; background: url(i/hamonshu/footer-curl.png) -10px 0 / auto 100% no-repeat, url(i/hamonshu/footer-wave.png) 0 100% / auto 2em repeat-x, url(i/hamonshu/footer-wave.png) 0 95% / auto 1.5em repeat-x, linear-gradient(179.5deg, hsla(34deg,38%,99%,1), hsl(25deg,0%,97%)) 0 0 / 100% 100%, ; mix-blend-mode: darken; }

Slide 29

Slide 29

SPLITTING THE HEADER

Slide 30

Slide 30

Header waves

Slide 31

Slide 31

Header waves url(i/hamonshu/header-left.png) -9% calc(100% - 4.2vw) / 29% auto no-repeat

Slide 32

Slide 32

Header waves url(i/hamonshu/header-right.png) 100% 100% / 45% auto no-repeat, url(i/hamonshu/header-left.png) -9% calc(100% - 4.2vw) / 29% auto no-repeat

Slide 33

Slide 33

Header waves url(i/hamonshu/header-left.png) 0 100% / 45% auto no-repeat, url(i/hamonshu/header-right.png) 100% 100% / 45% auto no-repeat, url(i/hamonshu/header-left.png) -9% calc(100% - 4.2vw) / 29% auto no-repeat

Slide 34

Slide 34

Header waves url(i/hamonshu/header-left.png) 0 100% / 45% auto no-repeat, url(i/hamonshu/header-right.png) 100% 100% / 45% auto no-repeat, linear-gradient(hsla(34deg,38%,99%,0.5), hsla(34deg,38%,99%,0.8)), url(i/hamonshu/header-left.png) -9% calc(100% - 4.2vw) / 29% auto no-repeat

Slide 35

Slide 35

Header waves url(i/hamonshu/header-left.png) 0 100% / 45% auto no-repeat, url(i/hamonshu/header-right.png) 100% 100% / 45% auto no-repeat, linear-gradient(hsla(34deg,38%,59%,0.5), hsla(34deg,38%,59%,0.8)), url(i/hamonshu/header-left.png) -9% calc(100% - 4.2vw) / 29% auto no-repeat

Slide 36

Slide 36

Header waves

Slide 37

Slide 37

Header waves #sitemast { grid-column: 1 / -1; grid-row: 1; background: url(i/hamonshu/header-left.png) 0 100% / auto 50% no-repeat ; min-height: 13em; position: relative; mix-blend-mode: darken; } @media (min-width: 30em) { #sitemast { background: url(i/hamonshu/header-left.png) 0 100% / 45% auto,

Slide 38

Slide 38

position: relative; mix-blend-mode: darken; Header waves } @media (min-width: 30em) { #sitemast { background: url(i/hamonshu/header-left.png) 0 100% / 45% auto, url(i/hamonshu/header-right.png) 100% 100% / 45% auto, linear-gradient(hsla(34deg,38%,99%,0.5), hsla(34deg,38%,99%,0.8)), url(i/hamonshu/header-left.png) -9% calc(100% - 4.2vw) / 29% auto ; background-repeat: no-repeat; min-height: 9em; } } }

Slide 39

Slide 39

ONE-LINE SEPARATOR

Slide 40

Slide 40

A simple separator

Slide 41

Slide 41

A simple separator margin-top: 2em; padding-top: 1.5em;

Slide 42

Slide 42

A simple separator background: linear-gradient(90deg, rgba(0,0,0,0.25), rgba(0,0,0,0.125), rgba(0,0,0,0.25)) no-repeat 50% 1em / 100% 5px;

Slide 43

Slide 43

A simple separator background: linear-gradient(90deg, rgba(0,0,0,0.25), rgba(0,0,0,0.125), rgba(0,0,0,0.25)) no-repeat 50% 1em / 100% 1px;

Slide 44

Slide 44

FANCY RULE

Slide 45

Slide 45

A fancy horizontal rule

Slide 46

Slide 46

A fancy horizontal rule

Slide 47

Slide 47

A fancy horizontal rule margin: 2em 1em; height: 2.33em;

Slide 48

Slide 48

A fancy horizontal rule margin: 2em 1em; height: 2.33em; border-style: none;

Slide 49

Slide 49

A fancy horizontal rule linear-gradient(90deg, rgba(64,0,0,0.3), rgba(64,0,0,0.5), rgba(64,0,0,0.3)) 0% 50% / 100% 1px no-repeat

Slide 50

Slide 50

A fancy horizontal rule linear-gradient(90deg, rgba(64,0,0,0), rgba(64,0,0,0.5), rgba(64,0,0,0)) 50% 50% / 50% 3px no-repeat, linear-gradient(90deg, rgba(64,0,0,0.3), rgba(64,0,0,0.5), rgba(64,0,0,0.3)) 0% 50% / 100% 1px no-repeat

Slide 51

Slide 51

A fancy horizontal rule url(/ui/i/hamonshu/fountain-trumpet-right.png) calc(50% - 1em) 50% / auto 60% no-repeat, url(/ui/i/hamonshu/fountain-trumpet-left.png) calc(50% + 1em) 50% / auto 60% no-repeat, linear-gradient(90deg, rgba(64,0,0,0), rgba(64,0,0,0.5), rgba(64,0,0,0)) 50% 50% / 50% 3px no-repeat,

Slide 52

Slide 52

A fancy horizontal rule url(/ui/i/hamonshu/hr-disc.png) 50% 50% / auto 67% no-repeat, url(/ui/i/hamonshu/fountain-trumpet-right.png) calc(50% - 1em) 50% / auto 60% no-repeat, url(/ui/i/hamonshu/fountain-trumpet-left.png) calc(50% + 1em) 50% / auto 60% no-repeat, linear-gradient(90deg, rgba(64,0,0,0), rgba(64,0,0,0.5),

Slide 53

Slide 53

A fancy horizontal rule #thoughts article hr { margin: 2em 1em; height: 2.33em; border-style: none; background: url(/ui/i/hamonshu/hr-disc.png) 50% 50% / auto 67%, url(/ui/i/hamonshu/fountain-trumpet-right.png) calc(50% - 1em) 50% / auto 60%, url(/ui/i/hamonshu/fountain-trumpet-left.png) calc(50% + 1em) 50% / auto 60%, linear-gradient(90deg, rgba(64,0,0,0), rgba(64,0,0,0.5), rgba(64,0,0,0)) 50% 50% / 50% 3px, linear-gradient(90deg, rgba(64,0,0,0.3), rgba(64,0,0,0.5), rgba(64,0,0,0.3)) 0% 50% / 100% 1px ; background-repeat: no-repeat; filter: grayscale(0.5) opacity(0.67); }

Slide 54

Slide 54

BLOCKING OUT BLOCKQUOTES

Slide 55

Slide 55

Fancy blockquotes

Slide 56

Slide 56

Fancy blockquotes

Slide 57

Slide 57

Fancy blockquotes

Slide 58

Slide 58

Fancy blockquotes

Slide 59

Slide 59

Fancy blockquotes

Slide 60

Slide 60

Fancy blockquotes

Slide 61

Slide 61

Fancy blockquotes background-image: url(i/hamonshu/quote-open.png), url(i/hamonshu/quote-close.png), linear-gradient(90deg, transparent 1.25em, currentColor 2.5em, transparent), linear-gradient(90deg, transparent, currentColor calc(100% - 2.5em), transparent calc(100% - 1.25em)); background-size: auto 1em, auto 1em, 100% 1px, 100% 1px; background-position: 0% 0%, 100% 100%, 50% 0%, 50% 100%; background-repeat: no-repeat;

Slide 62

Slide 62

BACKGROUND MASKING

Slide 63

Slide 63

Backgrounds as “masks”

Slide 64

Slide 64

Backgrounds as “masks”

Slide 65

Slide 65

Backgrounds as “masks”

Slide 66

Slide 66

Backgrounds as “masks”

Slide 67

Slide 67

Backgrounds as “masks”

Slide 68

Slide 68

Backgrounds as “masks”

Slide 69

Slide 69

Backgrounds as “masks”

Slide 70

Slide 70

Backgrounds as “masks” background: url(/ui/i/hamonshu/endcap-right.png) 100% 50% / auto 100% no-repeat, url(/ui/i/hamonshu/endcap-left.png) 0% 50% / auto 100% no-repeat, linear-gradient(90deg, #4E4033AA, #4E4033BB) 0 0 / 100% 1px no-repeat, linear-gradient(90deg, #615040AA, #5B4A3BAA) 0 100% / 100% 1px no-repeat, #FED5 ; border-radius: 1em / 50%;

Slide 71

Slide 71

Slide 72

Slide 72

THANK YOU Design in the Background Talk.CSS #56 4 November 2020 @meyerweb