<!--
try translating the website to another language
-->
<aside class="controls">
<div>
<h3>
Document Direction <small>(block axis)</small>
</h3>
<select data-for="direction">
<option value="ltr">left to right (ltr)</option>
<option value="rtl">right to left (rtl)</option>
</select>
</div>
<div style="text-align:end;">
<h3>
Writing Mode <small>(inline axis)</small>
</h3>
<select data-for="writing-mode">
<option value="horizontal-tb">horizontal top to bottom (horizontal-tb)</option>
<option value="vertical-rl">vertical right to left (vertical-rl)</option>
<option value="vertical-lr">vertical left to right (vertical-lr)</option>
</select>
</div>
</aside>
<main>
<section>
<article>
<h2>user experience agile development</h2>
<p>Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition.</p>
<p>Capitalize on low hanging fruit to identify a ballpark value added activity to beta test. Override the digital divide with additional clickthroughs from DevOps.</p>
</article>
<figure>
<img src="https://picsum.photos/350/500?1" alt="" loading="lazy" width="350" height="500">
<figcaption>A random image</figcaption>
</figure>
</section>
<section>
<article>
<h2>Monetization launch party</h2>
<p>Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment. Bring to the table win-win survival strategies to ensure proactive domination.</p>
</article>
<figure>
<img src="https://picsum.photos/600/500?2" alt="" loading="lazy" width="600" height="500">
<figcaption>A random image</figcaption>
</figure>
</section>
<section>
<article>
<h2>MVP graphical user interface gamification</h2>
<p>At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring.</p>
</article>
<figure>
<img src="https://picsum.photos/500/500?3" alt="" loading="lazy" width="500" height="500">
<figcaption>A random image</figcaption>
</figure>
</section>
<section>
<article>
<h2>niche market bandwidth</h2>
<p>Capitalize on low hanging fruit to identify a ballpark value added activity to beta test. Override the digital divide with additional clickthroughs from DevOps. Nanotechnology immersion along the information highway will close the loop on focusing solely on the bottom line.</p>
<p>Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinkingoverall value proposition.</p>
</article>
<figure>
<img src="https://picsum.photos/600/400?4" alt="" loading="lazy" width="600" height="400">
<figcaption>A random image</figcaption>
</figure>
</section>
</main>
@use postcss-nested;
body {
/* direction: rtl; */
/* writing-mode: vertical-rl; */
}
/*
Notes:
- uses flexbox gap: try Chrome Canary or Firefox that have support
- try changing the direction and writing modes
*/
h2 {
line-height: 1.5;
max-inline-size: 25ch;
text-transform: capitalize;
color: hsl(0 0% 20%);
font-size: clamp(1.75rem, 3vw, 2.25rem);
}
p {
line-height: 2;
max-inline-size: 45ch;
color: hsl(0 0% 25%);
font-size: clamp(1.1rem, 1.5vw, 1.25rem);
}
main {
--container-gap: clamp(1rem, 5vw, 10vw);
display: grid;
gap: var(--container-gap);
}
section {
display: flex;
flex-flow: row wrap;
align-items: center;
gap: var(--container-gap);
--column: 30ch;
& > article {
flex: 1 var(--column);
}
&:nth-child(odd) {
flex-direction: row-reverse;
}
&:nth-child(even) {
text-align: end;
& > article {
align-items: flex-end;
}
}
}
article {
display: grid;
align-items: flex-start;
gap: 2ch;
& > :is(p,h2) {
margin: 0;
}
}
figure {
margin: 0;
flex: 1 1 var(--column);
}
figure > img {
inline-size: 100%;
block-size: 100%;
object-fit: contain;
}
img {
max-inline-size: 100%;
}
/* demo styles */
.controls {
position: sticky;
top: 5vw;
display: flex;
/* display: none; */
flex-wrap: wrap;
gap: 2ch;
justify-content: space-between;
padding: 2ch;
background: white;
border: 1px solid lightgray;
margin-block-end: 5vmin;
writing-mode: horizontal-tb;
direction: ltr;
& :is(h1,h2,h3,p) {
margin: 0;
}
}
body {
font-family: system-ui, sans-serif;
margin: 0;
padding: 5vw;
display: grid;
justify-content: center;
}
figcaption {
font-size: .9rem;
text-align: center;
}
View Compiled
import $ from 'https://unpkg.com/[email protected]/src/index.js'
const [main] = $('body')
$('select').on('change', e => {
const prop = $(e.target).attr('data-for')
main.style[prop] = e.target.value
})
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.