-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
361 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
--- | ||
import Snippet from '@components/Snippet.astro' | ||
--- | ||
|
||
<Snippet title='Interaktive Demo'> | ||
<Fragment slot='settings'> | ||
<div class='sn-settings'> | ||
<div class='sn-value'> | ||
<label for='el-size-input'>Box-Breite:</label> | ||
<input | ||
type='range' | ||
name='size' | ||
id='el-size-input' | ||
min='50' | ||
max='100' | ||
step='10' | ||
value='100' | ||
list='el-size-markers' | ||
/> | ||
<span> | ||
<output id='el-size-output'>100</output>% | ||
</span> | ||
|
||
<datalist id='el-size-markers'> | ||
<option value='50'></option> | ||
<option value='60'></option> | ||
<option value='70'></option> | ||
<option value='80'></option> | ||
<option value='90'></option> | ||
<option value='100'></option> | ||
</datalist> | ||
</div> | ||
</div> | ||
</Fragment> | ||
|
||
<Fragment> | ||
<div class='demo-umbrueche'> | ||
<div class='sn-element title'> | ||
Der | ||
Donau­dampf­schiff­fahrts­gesell­schafts­kapitän | ||
sticht mit seiner Mann­schaft wieder in See | ||
</div> | ||
</div> | ||
</Fragment> | ||
</Snippet> | ||
|
||
<style> | ||
@scope (.demo-umbrueche) { | ||
:scope { | ||
.title { | ||
--width: 100%; | ||
|
||
font-family: var(--ff-headings); | ||
font-size: clamp(2.5rem, 4vw, 4.3rem); | ||
line-height: 1.2; | ||
font-weight: var(--fw-bold); | ||
max-width: var(--width); | ||
transition: max-width ease-out 120ms; | ||
} | ||
} | ||
span { | ||
border: 2px solid red; | ||
} | ||
} | ||
|
||
@scope (.sn-settings) { | ||
:scope { | ||
#el-size-output { | ||
display: inline-block; | ||
inline-size: 3ch; | ||
text-align: end; | ||
margin-inline-end: 0.2em; | ||
} | ||
} | ||
} | ||
</style> | ||
|
||
<script is:inline> | ||
;(function () { | ||
const snInput = document.querySelector('#el-size-input') | ||
const snOnput = document.querySelector('#el-size-output') | ||
const demoContainer = document.querySelector('.title') | ||
|
||
snOnput.textContent = snInput.value | ||
|
||
snInput.addEventListener('input', (event) => { | ||
snOnput.textContent = event.target.value | ||
demoContainer.style.setProperty('--width', `${event.target.value}%`) | ||
}) | ||
})() | ||
</script> |
261 changes: 261 additions & 0 deletions
261
src/content/tutorials/grundlagen-der-mikrotypografie.mdx
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters