Skip to content

Commit

Permalink
Make more space in embedded view
Browse files Browse the repository at this point in the history
  • Loading branch information
desplesda committed Dec 7, 2024
1 parent 0bcbf62 commit f620f6a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scss/yarnspinner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,6 @@ body {
color: var(--bs-heading-color);
}

#mini-app-header button {

body.embedded {
zoom: 0.8
}
2 changes: 1 addition & 1 deletion src/embed.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<meta name="twitter:creator" content="@YarnSpinnerTool" />
</head>

<body>
<body class="embedded">
<div class="container-fluid h-100 d-flex flex-column">
<div
class="row p-2 flex-shrink-0 align-items-center"
Expand Down
6 changes: 6 additions & 0 deletions src/playground.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ let errorsExist = false;
import * as yarnspinner_language from "./yarnspinner-language";
import { scriptStorageKey } from "./constants";

function isEmbeddedView() {
return document.body.classList.contains("embedded");
}

class SimpleVariableStorage implements yarnspinner.IVariableStorage {
storage: { [key: string]: string | number | boolean } = {};

Expand Down Expand Up @@ -126,7 +130,9 @@ export async function load(script: string) {
theme: "yarnspinner",
fontFamily: "Inconsolata",
fontSize: 18,
minimap: !isEmbeddedView() ? { enabled: true } : { enabled: false },
wordWrap: "on",
lineNumbers: !isEmbeddedView() ? "on" : "off",
wrappingIndent: "same",
padding: {
top: 10,
Expand Down

0 comments on commit f620f6a

Please sign in to comment.