1
0
Fork 0
why-cant-we-deploy-today/css/layout.scss

89 lines
1.5 KiB
SCSS
Raw Permalink Normal View History

2020-05-19 10:22:19 +02:00
/**
* Layout helpers.
*/
// Stretch an element vertically based on available space
.reveal .stretch,
.reveal .r-stretch {
2023-05-23 19:50:14 +02:00
max-width: none;
max-height: none;
2020-05-19 10:22:19 +02:00
}
.reveal pre.stretch code,
.reveal pre.r-stretch code {
2023-05-23 19:50:14 +02:00
height: 100%;
max-height: 100%;
box-sizing: border-box;
2020-05-19 10:22:19 +02:00
}
// Text that auto-fits its container
.reveal .r-fit-text {
2023-05-23 19:50:14 +02:00
display: inline-block; // https://github.com/rikschennink/fitty#performance
white-space: nowrap;
}
2020-05-19 10:22:19 +02:00
// Stack multiple elements on top of each other
.reveal .r-stack {
2023-05-23 19:50:14 +02:00
display: grid;
2020-05-19 10:22:19 +02:00
}
.reveal .r-stack > * {
2023-05-23 19:50:14 +02:00
grid-area: 1/1;
margin: auto;
2020-05-19 10:22:19 +02:00
}
// Horizontal and vertical stacks
.reveal .r-vstack,
.reveal .r-hstack {
2023-05-23 19:50:14 +02:00
display: flex;
2023-05-23 19:50:14 +02:00
img,
video {
min-width: 0;
min-height: 0;
object-fit: contain;
}
2020-05-19 10:22:19 +02:00
}
.reveal .r-vstack {
2023-05-23 19:50:14 +02:00
flex-direction: column;
align-items: center;
justify-content: center;
2020-05-19 10:22:19 +02:00
}
.reveal .r-hstack {
2023-05-23 19:50:14 +02:00
flex-direction: row;
align-items: center;
justify-content: center;
2020-05-19 10:22:19 +02:00
}
2020-05-20 14:33:52 +02:00
// Naming based on tailwindcss
2023-05-23 19:50:14 +02:00
.reveal .items-stretch {
align-items: stretch;
}
.reveal .items-start {
align-items: flex-start;
}
.reveal .items-center {
align-items: center;
}
.reveal .items-end {
align-items: flex-end;
}
2020-05-20 14:33:52 +02:00
2023-05-23 19:50:14 +02:00
.reveal .justify-between {
justify-content: space-between;
}
.reveal .justify-around {
justify-content: space-around;
}
.reveal .justify-start {
justify-content: flex-start;
}
.reveal .justify-center {
justify-content: center;
}
.reveal .justify-end {
justify-content: flex-end;
}