-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding code highlight and some meta data
- Loading branch information
Showing
5 changed files
with
292 additions
and
37 deletions.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,203 @@ | ||
html { | ||
font-family: system-ui; | ||
font-size: 12px; | ||
} | ||
|
||
body, | ||
h1, | ||
p, | ||
pre, | ||
textarea { | ||
margin: 0; | ||
} | ||
|
||
body { | ||
display: flex; | ||
flex-flow: row nowrap; | ||
flex-flow: column nowrap; | ||
box-sizing: border-box; | ||
height: 100svh; | ||
margin: 0; | ||
padding: 10px; | ||
gap: 10px; | ||
} | ||
|
||
header { | ||
display: grid; | ||
grid-template: | ||
'title nav' | ||
'description .' / 1fr; | ||
gap: 10px; | ||
|
||
h1 { | ||
grid-area: title; | ||
} | ||
|
||
p { | ||
grid-area: description; | ||
} | ||
|
||
nav { | ||
grid-area: nav; | ||
display: flex; | ||
flex-flow: row nowrap; | ||
gap: 5px; | ||
|
||
img { | ||
height: 1.5em; | ||
} | ||
} | ||
} | ||
|
||
main { | ||
flex: 1 1 0; | ||
display: flex; | ||
flex-flow: row nowrap; | ||
gap: 10px; | ||
|
||
@media (orientation: portrait) { | ||
flex-direction: column; | ||
} | ||
} | ||
|
||
h1, | ||
p { | ||
margin: 0; | ||
} | ||
|
||
h1 { | ||
font-size: 1.5em; | ||
} | ||
|
||
a:visited { | ||
color: currentcolor; | ||
} | ||
|
||
button, | ||
fieldset { | ||
all: unset; | ||
} | ||
|
||
fieldset { | ||
position: relative; | ||
box-sizing: border-box; | ||
flex: 1 1 0; | ||
|
||
height: 100%; | ||
width: 0; | ||
|
||
@media (orientation: portrait) { | ||
height: 0; | ||
width: 100%; | ||
} | ||
} | ||
|
||
button, | ||
legend, | ||
code::after { | ||
font: 0.8em/1 system-ui; | ||
text-transform: uppercase; | ||
} | ||
|
||
button { | ||
position: fixed; | ||
inset: auto auto 20px 20px; | ||
padding: 5px 10px; | ||
border-radius: 3px; | ||
background: #ccc; | ||
cursor: pointer; | ||
|
||
&:hover { | ||
background-color: #dcdcdc; | ||
} | ||
} | ||
|
||
legend { | ||
padding: 0 0 3px; | ||
} | ||
|
||
#input > div, | ||
textarea, | ||
pre { | ||
height: 100%; | ||
width: 100%; | ||
} | ||
|
||
textarea, | ||
pre { | ||
flex: 1 1 0; | ||
width: 0; | ||
margin: 0; | ||
border: 0; | ||
box-sizing: border-box; | ||
resize: none; | ||
} | ||
|
||
textarea, | ||
pre > code { | ||
padding: 10px; | ||
border: 1px solid #ccc; | ||
border-radius: 5px; | ||
border-radius: 6px; | ||
font: 1em/1.5 monospace; | ||
} | ||
|
||
pre { | ||
display: flex; | ||
flex-flow: column nowrap; | ||
gap: 10px; | ||
|
||
@media (orientation: portrait) { | ||
flex-direction: row; | ||
} | ||
|
||
> code { | ||
flex: 1 1 0; | ||
position: relative; | ||
display: block; | ||
box-sizing: border-box; | ||
max-height: 100%; | ||
padding: 10px; | ||
overflow: hidden; | ||
overflow-y: auto; | ||
|
||
&::after { | ||
content: attr(data-label); | ||
position: absolute; | ||
inset: 10px 10px auto auto; | ||
padding: 3px 5px; | ||
border-radius: 3px; | ||
background: #ccc; | ||
} | ||
} | ||
} | ||
|
||
@media (orientation: portrait) { | ||
body { | ||
flex-direction: column; | ||
code { | ||
position: relative; | ||
|
||
&[data-label]::after { | ||
content: attr(data-label); | ||
position: absolute; | ||
inset: 3px 3px auto auto; | ||
padding: 3px 5px; | ||
border-radius: 3px; | ||
background: #ccc; | ||
} | ||
} | ||
|
||
#input { | ||
position: relative; | ||
|
||
pre { | ||
flex-direction: row; | ||
white-space: pre-wrap; | ||
} | ||
|
||
textarea { | ||
position: absolute; | ||
inset: 0; | ||
z-index: 1; | ||
|
||
background: transparent; | ||
border-color: transparent; | ||
color: transparent; | ||
|
||
caret-color: #000; | ||
|
||
&:focus { | ||
outline: 1px solid #ccc; | ||
outline-offset: -2px; | ||
} | ||
} | ||
|
||
nav { | ||
position: absolute; | ||
inset: auto auto 10px 10px; | ||
z-index: 2; | ||
|
||
display: flex; | ||
flex-flow: row nowrap; | ||
gap: 10px; | ||
} | ||
} |
Oops, something went wrong.