|
// Tree Photo by Frederick Tubiermont on Unsplash |
|
|
|
// This is the most similar free alternative to original Linsingen Vintage font used in actual street signs in Finland. |
|
@font-face { |
|
font-family: 'VenturisSansADFLt-Bold'; |
|
src:url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/25387/VenturisSansADFLt-Bold.ttf.woff') format('woff'), |
|
url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/25387/VenturisSansADFLt-Bold.ttf.svg#VenturisSansADFLt-Bold') format('svg'), |
|
url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/25387/VenturisSansADFLt-Bold.ttf.eot'), |
|
url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/25387/VenturisSansADFLt-Bold.ttf.eot?#iefix') format('embedded-opentype'); |
|
font-weight: normal; |
|
font-style: normal; |
|
} |
|
|
|
:root { |
|
--camera-x: 0; // will be updated by JS |
|
--camera-y: 0; // will be updated by JS |
|
--row-count: 0; // will be set from JS |
|
--col-count: 0; // will be set from JS |
|
--tile-width: 1em; |
|
--gap-width: calc(var(--tile-width) * 5 / 100); |
|
--total-tile-width: calc(1em + var(--gap-width)); |
|
--gap-color: #666; |
|
} |
|
|
|
@function tile($n) { |
|
@return calc(#{$n} * var(--tile-width)); |
|
} |
|
|
|
@function totalTile($n) { |
|
@return calc(#{$n} * var(--total-tile-width)); |
|
} |
|
|
|
body { |
|
min-height: 100vh; |
|
display: grid; |
|
justify-content: center; |
|
align-items: center; |
|
font-size: 7vmin; |
|
perspective: 150vmin; |
|
background: lighten(cadetblue, 35%); |
|
} |
|
|
|
.wall { |
|
position: relative; |
|
background: var(--gap-color); |
|
transform-style: preserve-3d; |
|
transform: |
|
rotateX( calc(var(--camera-y) * -15deg) ) |
|
rotateY( calc(var(--camera-x) * 15deg) ); |
|
} |
|
|
|
.wall-rain-shield { |
|
position: absolute; |
|
top: tile(-.26); |
|
left: 0; |
|
z-index: 5; |
|
width: 100%; |
|
height: tile(.4); |
|
background: #bbb; |
|
transform-origin: top center; |
|
transform: |
|
translateZ(tile(.6)) |
|
rotateX(30deg); |
|
} |
|
|
|
#wall-half-vertical-tiles { |
|
position: relative; |
|
z-index: 4; |
|
display: grid; |
|
gap: var(--gap-width); |
|
grid-template: 1fr / repeat(calc(3 * var(--col-count)), 1fr); |
|
box-shadow: 0 tile(.25) tile(.1) rgba(#000, .5); |
|
transform: translateZ(tile(.6)); |
|
background: var(--gap-color); |
|
|
|
// Shadow of rain shield ¯\_(ツ)_/¯ |
|
&::before { |
|
content: ""; |
|
position: absolute; |
|
top: 0; |
|
left: 0; |
|
width: 100%; |
|
height: 100%; |
|
box-shadow: inset 0 tile(.2) tile(.1) rgba(#000, .5), |
|
} |
|
} |
|
|
|
#wall-masonry-vertical-tiles { |
|
position: relative; |
|
z-index: 3; |
|
display: grid; |
|
gap: var(--gap-width); |
|
grid-template: 1fr / repeat(calc(3 * var(--col-count)), 1fr); |
|
box-shadow: 0 tile(.25) tile(.1) rgba(#000, .5); |
|
transform: translateZ(tile(.45)); |
|
} |
|
|
|
#wall-half-horizontal-tiles { |
|
position: relative; |
|
z-index: 2; |
|
display: grid; |
|
gap: var(--gap-width); |
|
grid-template: 1fr / repeat(calc(2 * var(--col-count)), 1fr); |
|
box-shadow: 0 tile(.25) tile(.1) rgba(#000, .5); |
|
transform: translateZ(tile(.3)); |
|
} |
|
|
|
#wall-single-horizontal-tiles { |
|
position: relative; |
|
z-index: 1; |
|
display: grid; |
|
gap: var(--gap-width); |
|
grid-template: 1fr / repeat(var(--col-count), 1fr); |
|
box-shadow: 0 tile(.25) tile(.1) rgba(#000, .5); |
|
transform: translateZ(tile(.15)); |
|
} |
|
|
|
#wall-front-tiles { |
|
position: relative; |
|
display: grid; |
|
gap: var(--gap-width); |
|
grid-template: |
|
repeat(var(--row-count), 1fr) / |
|
repeat(var(--col-count), 1fr); |
|
} |
|
|
|
.left-shadow { |
|
position: absolute; |
|
top: 0; |
|
left: 0; |
|
z-index: 1; |
|
width: 100%; |
|
height: 100%; |
|
box-shadow: inset tile(1.65) 0 tile(.08) rgba(#000, .5); |
|
transform: translateZ(1px); |
|
} |
|
|
|
.window { |
|
position: absolute; |
|
top: 0; |
|
left: 50%; |
|
transform: translateX(-50%); |
|
width: totalTile(5); |
|
height: totalTile(6); |
|
overflow: hidden; |
|
background: darken(desaturate(skyblue, 40%), 60%); |
|
perspective: 150vmin; |
|
|
|
.left-shadow { |
|
left: tile(-1.5); |
|
} |
|
} |
|
|
|
.window-reflection-container { |
|
position: relative; |
|
display: block; |
|
width: 100%; |
|
height: 100%; |
|
} |
|
|
|
.window-reflection { |
|
position: absolute; |
|
top: tile(-5); |
|
right: tile(-1); |
|
max-width: 600%; |
|
mix-blend-mode: overlay; |
|
transform: translate( |
|
calc(var(--camera-x) * -2%), |
|
calc(var(--camera-y) * -2%) |
|
); |
|
} |
|
|
|
.window-frame { |
|
position: absolute; |
|
top: 0; |
|
left: 0; |
|
width: 100%; |
|
height: 100%; |
|
box-shadow: |
|
inset 0 0 0 tile(.25) #eae4da, |
|
inset tile(.01) tile(.01) 0 tile(.255) rgba(#000, .5), |
|
inset 0 0 0 tile(.5) #eae4da, |
|
inset 0 0 0 tile(.6) darken(desaturate(orange, 50%), 10%); |
|
} |
|
|
|
.ventilation-grid { |
|
position: absolute; |
|
top: 0; |
|
right: tile(1.2); |
|
width: tile(.8); |
|
height: tile(.8); |
|
background: #777; |
|
|
|
&::after { |
|
content: ""; |
|
position: absolute; |
|
top: 50%; |
|
left: 50%; |
|
width: 80%; |
|
height: 80%; |
|
transform: translate(-50%, -50%); |
|
background: repeating-linear-gradient( |
|
to bottom, |
|
rgba(#000, .8), |
|
transparent tile(.1), |
|
transparent tile(.14) |
|
); |
|
} |
|
} |
|
|
|
.street-signs { |
|
position: absolute; |
|
left: tile(.5); |
|
bottom: tile(1); |
|
height: tile(.5); |
|
} |
|
|
|
.street-sign { |
|
position: relative; |
|
padding: tile(.25) tile(.3); |
|
background: linear-gradient(to bottom, #eae4da, #dad4ca); |
|
font: normal tile(.4)/tile(.6) 'VenturisSansADFLt-Bold', sans-serif; |
|
text-transform: uppercase; |
|
box-shadow: tile(.02) tile(.02) 2px rgba(#000, .5); |
|
|
|
&::before, &::after { |
|
content: ""; |
|
position: absolute; |
|
top: 50%; |
|
transform: translateY(-50%); |
|
width: tile(.15); |
|
height: tile(.15); |
|
background: #333; |
|
border-radius: 100%; |
|
} |
|
|
|
&::before { |
|
left: tile(.01); |
|
} |
|
|
|
&::after { |
|
right: tile(.01); |
|
} |
|
|
|
&.swe { |
|
letter-spacing: tile(.06); |
|
} |
|
} |
|
|
|
.tile { |
|
width: 1em; |
|
height: 1em; |
|
display: grid; |
|
gap: var(--gap-width); |
|
background: var(--gap-color); |
|
|
|
span { |
|
$light-shadow-pos: tile(.02) tile(.02) tile(.06); |
|
$dark-shadow-pos: tile(-.02) tile(-.02) tile(.08); |
|
background: currentColor; |
|
box-shadow: |
|
inset $light-shadow-pos rgba(255, 200, 50, .25), |
|
inset $dark-shadow-pos rgba(30, 10, 0, .5); |
|
} |
|
} |
|
|
|
.tile.half-vertical { |
|
width: tile(.3); |
|
height: tile(.4); |
|
} |
|
|
|
.tile.masonry-vertical { |
|
grid-template: .6fr 1.4fr / 1fr; |
|
width: tile(.3); |
|
|
|
&.odd { |
|
grid-template: 1.4fr .6fr / 1fr; |
|
} |
|
} |
|
|
|
.tile.half-horizontal { |
|
width: tile(.475); |
|
height: tile(.33); |
|
} |
|
|
|
.tile.single-horizontal { |
|
height: tile(.33); |
|
} |
|
|
|
.tile.vertical { |
|
grid-template: 1fr / repeat(3, 1fr); |
|
} |
|
|
|
.tile.horizontal { |
|
grid-template: repeat(3, 1fr) / 1fr 1fr; |
|
|
|
:first-child { |
|
grid-area: 1 / span 2; |
|
} |
|
|
|
:last-child { |
|
grid-area: 3 / span 2; |
|
} |
|
} |
|
|
|
.with-sides { |
|
.side { |
|
position: absolute; |
|
top: 0; |
|
left: 0; |
|
width: tile(3); |
|
height: inherit; |
|
overflow: hidden; |
|
display: inherit; |
|
background: var(--gap-color); |
|
grid-template: inherit; |
|
gap: inherit; |
|
transform-origin: top left; |
|
transform: rotateY(90deg); |
|
|
|
&:last-child { |
|
left: auto; |
|
right: 0; |
|
transform-origin: top right; |
|
transform: rotateY(-90deg); |
|
} |
|
} |
|
} |